Home | Tutorials | Wiki | Issues
Ask Your Question
3

SDF vs URDF what should one use?

asked 2012-10-15 17:38:58 -0500

ffurrer gravatar image

Here and here this question was already posted but in my opinion it got never really answered. That's why I would like to start another try to get it clarified.

Could anyone point out what the actual advantages and disadvantages over each other are and when one should use URDF and when SDF, as well as if there's a plan that one of the formats shouldn't be used anymore, as gazebo said URDF are deprecated, for a while?

If anyone knows that there has been some progress in a simplified conversion please state this as well.

Cheers

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2012-10-18 10:57:14 -0500

nkoenig gravatar image

URDF can be used for specifying only the kinematic and dynamic properties of a single robot in isolation. URDF can not specify the pose of the robot itself within a world. It is also not a "universal" description format since it cannot specify joint loops, and it lacks friction and other properties. Additionally, it cannot specify things that are not robots, such as lights, heightmaps, etc.

On an implementation side, the URDF syntax breaks proper formatting with heavy attributes which in turns makes URDF more inflexible. There is also no mechanism for backward compatibility.

SDF solves all these problems. It is a complete description for everything from the world level down to the robot level. It is highly scalable, and extremely easy to add and modify elements. The SDF format is itself described using XML, which facilitates a simple upgrade tool to migrate old versions to new versions. It is also self descriptive.

The only reason to use URDF is because it has been historically used within ROS.

edit flag offensive delete link more

Comments

Thanks for this clarification. So whenever not depending on old models of robots one should use SDF in Gazebo. And for the robot description one still has to use a urdf description, for now.

ffurrer gravatar imageffurrer ( 2012-10-18 13:05:12 -0500 )edit

What about SRDF?

Max Pfingsthorn gravatar imageMax Pfingsthorn ( 2013-01-23 03:50:32 -0500 )edit

@nkoenig If one should use Gazebo with ROS so do I need to stick to URDF or I can work in SDF?

skhan gravatar imageskhan ( 2013-03-15 08:04:08 -0500 )edit
1

You can work in SDF.

nkoenig gravatar imagenkoenig ( 2013-03-17 19:23:47 -0500 )edit
1

@nkoenig How do you upload the robot_description in to the parameter server if you only have .sdf file?

peshala gravatar imagepeshala ( 2013-04-25 05:30:35 -0500 )edit
1

You can specify the SDF filename within the parameter server, just as you do a urdf file.

nkoenig gravatar imagenkoenig ( 2013-04-26 15:48:26 -0500 )edit
4

@nkoenig but doesn't robot_description need <robot> tag, which is not there in .sdf file?

peshala gravatar imagepeshala ( 2013-04-27 09:50:44 -0500 )edit

@nkoenig, is it not true that ROS plugins for Gazebo are only possible with URDF (and not with SDF)?

raequin gravatar imageraequin ( 2018-02-22 09:07:39 -0500 )edit

@raequin, not true, you can have ROS-enabled Gazebo plugins directly inside an SDF `<world>`, `<model>`, `<sensor>` and so on.

chapulina gravatar imagechapulina ( 2018-02-22 11:37:45 -0500 )edit

@chapulina, this is mind-blowing to me! Is it still possible to use xacro for the robot description? Why are there no tutorials on using "ROS-enabled Gazebo plugins" with sdf? Do you agree, then, with the answer here that, "The only reason to use URDF is because it has been historically used within ROS"? That's the only, only reason?

raequin gravatar imageraequin ( 2018-03-02 11:48:04 -0500 )edit
Login/Signup to Answer

Question Tools

5 followers

Stats

Asked: 2012-10-15 17:38:58 -0500

Seen: 11,454 times

Last updated: Oct 18 '12