ROS Notes: URDF vs. Gazebo SDF

SDFormatOne of the higher-level mysteries to this ROS beginner is why Gazebo, a sibling product, has a separate XML-based description format SDF instead of using the same URDF files of ROS. The answer came in this particular page in Gazebo’s collection of tutorials. “Tutorial: Using a URDF in Gazebo” explains why a different format was invented, but it also outlines Gazebo features to bridge the two worlds. By adding Gazebo-specific tags to URDF files, authors can specify all the information necessary for Gazebo to convert it to a SDF for internal use.

My understanding can be boiled down to this: URDF specifies a robot, but SDF also specifies a world for the robot to live in, which is a much larger set of things. Based on this premise, SDF is designed to represent a superset of everything that can be represented in URDF.

Which leads to the obvious next question: if SDF is a proper superset, why not standardize on SDF across the board? The best answer I could find is the idea being floated (and shot down?) as something to do for ROS2. I can understand the perspective that ROS really only cares about the robot and doesn’t need all the extra features of specifying a simulation world.

And while reading that discussion thread, I also learned Gazebo isn’t the only one unhappy with URDF. There’s also a SRDF file format for describing things not in a URDF, and I have even less of an idea how SRDF relates to SDF. Fortunately, there is an enlighening comment block in the generic example on that page:

This does not replace URDF, and is not an extension of URDF.

So whatever SRDF may be, it’s not yet another way to specify a robot, which is a relief.

Summary of my current understanding:

  • URDF is the established format for describing robot structure in ROS, and it is not going away anytime soon.
  • URDF could not specify information necessary for other robotics domains.
    • SDF was devised by Gazebo to meet simulation needs, but Gazebo can consume URDF when it is augmented by information within <gazebo> tags.
    • SRDF was devised to meet needs of MoveIt! Motion Planning Framework and does not replace URDF.

Given the above, as a beginner I should be safe to start with URDF when I start defining my own physical robots (like Sawppy) for ROS. But that’s a ways down the road, for now it’s back to tutorials.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s