Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plugins via URDF not parsing

Hi all,

I've updated my Gazebo that came packaged with ROS Groovy as my laptop graphics card hated it. And am now running Gazebo 1.4.

I can spawn urdf models and have the ros api plugin working fine. When it comes to getting my robot controller plugin working I seem to hit a bit of a wall. Here is an example bit of code that has the same issue, which is taken from this tutorial.

<?xml version="1.0" ?>
<robot name="single_joint">
  <gazebo reference="base">
  <link name="world"/>
  <joint name="link_joint" type="continuous">
    <axis xyz="0 0 1"/>
    <parent link="world"/>
    <origin rpy="0 0 0" xyz="0 0 1"/>
    <child link="link"/>
    <limit effort="100" velocity="100" k_velocity="0" />
    <joint_properties damping="0.1" friction="1.0" />
  <link name="link">
      <mass value="10"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
      <origin rpy="0 0 1" xyz="0 0 0"/>
        <box size="0.2 1.0 0.2"/>
      <origin rpy="0 0 1" xyz="0 0 0"/>
        <box size="0.2 1.0 0.2"/>
  <gazebo reference="link">

    <controller:gazebo_ros_force name="gazebo_ros_force" plugin="">

and running with the usual;

rosmake gazebo_worlds
roslaunch gazebo_worlds empty_world.launch
rosrun gazebo spawn_model -file object.urdf -urdf -z 1 -model my_object

I get;

[ INFO] [1365999923.235584629, 0.076000000]: Starting to spin physics dynamic reconfigure node...
Warning [] SDF has no <sdf> element in file[data-string]
Error [] XML Element[turnGravityOff], child of element[link] not defined in SDF. Ignoring.[link]
Error [] Error reading element <link>
Error [] Error reading element <model>
Error [] Unable to read element <sdf>
Error [] parse as old deprecated model file failed.
Error [] Unable to read sdf string

I have found that the urdf method of getting gazebo to load the plugin seems to fail in the which then results in gazebo falling back to try parse it as a sdf, which it then fails further on.

Now I know the intent is to do away with urdf's eventually, but this method of plugging in the plugin into gazebo seemed to work on my other machine with ROS-Fuerte and Gazebo 1.2, and even seems to work on my colleges laptop with ROS-Groovy and the inbuilt ROS gazebo (1.3).

Bit of a head scratcher. Should I;

  • update my Gazebo to 1.5/1.6 instead? (i.e. is 1.4 a bit of a dog?)
  • revert my gazebo to a standalone 1.3.
  • bite the bullet and figure out a way to convert all my xacro'd urdf's to sdf?