Gazebo | Ignition | Community
Ask Your Question

Using SDF tags in URDF (gazebo extension) directly?

asked 2014-09-20 06:22:18 -0600

Felix gravatar image

This questions is related to the previous thread: urdf-to-sdf-conversion [1].

Now, I'm reporting my observations when trying to use SDF tags from sdf1.4 in the URDF directly.

As mentioned in [1], it should be possible to use SDF within the gazebo tags referencing a link or joint within the URDF directly.

SDF tags for links

For setting most of the SDF tags relevant for links, URDF does not need the gazebo extensions, i.e. pose, ├Čnertial, visual and collision related tags are correctly set up using urdf-xml-link.

  1. gravity and self_collide
    It's the same result as mentioned in this issue

  2. kinematic
    It is converted to sdf. But seems to have no effect according to this thread

  3. velocity_decay
    The following can be used to set velocity_decay of a link.
    With this, it's possible to set different values for linear and angular (in contrast to using the gazebo tag dampingFactor).

    <gazebo reference="${name}_base_link">

SDF tags for joints

Similar to the above mentioned, tags that can correctly be set up using urdf-xml-joint are not considered here.

  1. damping and friction (dynamics)
    damping of an axis can only be set using the URDF tag dynmaics -> damping.
    All the following variants are not converted into the SDF file:

    <gazebo reference="${name}_1_joint">

    friction cannot be set from anywhere as it is currently (not yet) supported (see PullRequest)

  2. physics for ode (ode)
    Both following variants are not converted into the SDF file:

    <gazebo reference="${name}_1_joint">

Thus, it seems that using SDF tags directly within a URDF file is not supported - at least the way I tried to use them. In case I used them in the wrong way, please let me know! I'd be happy to test again then...

The only tags that are converted into the SDF file are gravity, self_collide (however, not considered due to issue), kinematic (however, see thread) and velocity_decay.

edit retag flag offensive close merge delete


For the friction and damping there is something in URDF, explained here but it doesn't seem to affect my links as they keep sliding.

mehdi gravatar imagemehdi ( 2015-06-17 04:45:49 -0600 )edit

2 Answers

Sort by ┬╗ oldest newest most voted

answered 2016-09-22 05:43:30 -0600

Franzisdrak gravatar image

updated 2016-09-22 05:44:38 -0600

Hi there,

i know this feed is a little outdated but i currently have issues when trying to go from xacro->urdf->sdf into gazebo. I have a fairly complex setup and need to change friction of models in my simulation.

Currently in my xacro i set up a wheel like this:

>   <link name="wheel_f_l">
>     <collision name="collision">
>       <geometry>
>         <cylinder radius="${wheel_radius}"
>              length="${wheel_length}"/>
>       </geometry>
>     </collision>
>     <visual name="visual">
>       <geometry>
>         <cylinder radius="${wheel_radius}"
>           length="${wheel_length}"/>
>       </geometry>
>     </visual>
>     <xacro:solid_cylinder_inertial
>       radius="${wheel_radius}" height="${wheel_length}"
>       mass="${wheel_mass}" gcx="${0}" gcy="${0}" gcz="${0}"/>   
>     </link>

I then create a reference like this:

<gazebo reference="wheel_r_l">

but for some reason my parameters dont survive the conversion to sdf via. gz sdf -p test.urdf > test.sdf.

I should mention i am using ODE and want to create a "realistic" wheel.

Help would very much be appreciated!

edit flag offensive delete link more

answered 2015-06-17 05:00:46 -0600

mehdi gravatar image

Considering the friction, this works for me :

  <gazebo reference="link2">

Some examples are explained here

edit flag offensive delete link more


Are you sure that these values are even set? Even with ROS kinetic and gazebo 7.8 there is now chance. Check it with `gz model -m <your model="" name=""> -i`!

tik0 gravatar imagetik0 ( 2017-06-20 20:59:56 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-09-20 06:22:18 -0600

Seen: 4,347 times

Last updated: Sep 22 '16