Skip to main content

SDF vs URDF

When working with robot models, you will encounter two main file formats: SDF (Simulation Description Format) and URDF (Unified Robot Description Format). While both are used to describe robots, they have different capabilities and are used in different contexts.

URDF (Unified Robot Description Format)​

  • URDF is an XML format used in ROS to describe all elements of a robot.
  • It is a tree structure, with the base of the robot being the root element.
  • It is primarily used for kinematics and dynamics, but it has limited capabilities for describing the robot's environment.
  • URDF is commonly used for visualization in RViz and for robot state publishing.

SDF (Simulation Description Format)​

  • SDF is also an XML format, but it is designed specifically for simulation in Gazebo.
  • It is a more comprehensive format that can describe not only robots, but also the entire simulation environment, including lighting, physics, and sensors.
  • SDF is a superset of URDF, and you can often convert a URDF file to an SDF file.

Key Differences​

FeatureURDFSDF
Primary UseRobot model description in ROSSimulation description in Gazebo
StructureTree structureWorld description, including multiple models
EnvironmentLimited support for environmentFull support for environment description
SensorsLimited sensor supportRich sensor support for simulation
PhysicsBasic physics propertiesDetailed physics properties

🤖 𝐻𝓊𝓂𝒶𝓃𝑜𝒱𝑒𝓇𝓈𝑒