Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can do it. There are some differences in URDF and SDF so you will probably need to modify the SDF to be compatible with the URDF and then just make a link in the place you want to attach the new model to. This outlines some of the differences in URDF and SDF http://gazebosim.org/tutorials?tut=ros_urdf

If you are making complex URDFs you proably should look into xacro a bit as well. Once you have it set up properly it is easier to understand and modify. xacro

One example of a project that is using xacros Clearpath Jackal

There are lots more tutorials and examples of xacro just some googling away.

Some things to help verify the process. You can run:

rosrun xacro xacro --inorder -o model.urdf model.urdf.xacro

to verify that the xacro would be converted to a valid URDF.

To easily visualize the model you could install the package urdf_tutorial mentioned in the beginning of this tutorial and then launch roslaunch urdf_tutorial display.launch model:=your_model.urdf.xacro in the folder where you have the urdf/xacro files. If you don't want to install the package you can grab the launch files and rviz config from the package and put them in some other package of your choice.

You can do it. There are some differences in URDF and SDF so you will probably need to modify the SDF to be compatible with the URDF and then just make a link in the place you want to attach the new model to. to. need to convert the SDF and include it in your existing URDF.

This outlines some of the differences in URDF and SDF http://gazebosim.org/tutorials?tut=ros_urdf

If you are making complex URDFs you proably should look into xacro a bit as well. Once you have it set up properly it is easier to understand and modify. xacro

One example of a project that is using xacros Clearpath Jackal

There are lots more tutorials and examples of xacro just some googling away.

Some things to help verify the process. You can run:

rosrun xacro xacro --inorder -o model.urdf model.urdf.xacro

to verify that the xacro would be converted to a valid URDF.

To easily visualize the model you could install the package urdf_tutorial mentioned in the beginning of this tutorial and then launch roslaunch urdf_tutorial display.launch model:=your_model.urdf.xacro in the folder where you have the urdf/xacro files. If you don't want to install the package you can grab the launch files and rviz config from the package and put them in some other package of your choice.


As gvdhoorn said SDF to URDF conversion is lossy. There are atributes in SDF that can not be used in URDF.

Aslo, it seems there is a package for converting SDF to URDF. Link found from this youtube video

I have not tested that package.