If you’ve ever tried to get a robot to show up properly in simulation, you’ve probably stared into the abyss of .urdf, .xacro, .sdf, .mjcf, or .usd files.
Let’s unpack what each of these actually is, how they differ, and why the robotics ecosystem can’t seem to settle on just one.
URDF: Unified Robot Description Format
URDF is like the vanilla XML of the robot world. Born out of ROS (Robot Operating System), it’s the lingua franca for describing a robot’s geometry, visuals, and collisions.
You tell it what links (body parts) exist, how joints connect them, and optionally throw in meshes for visuals and collision boxes for simulation.
URDFs are clean and simple — great for small robots, visualizing structures, and setting up basic physics.
But here’s the thing: URDF is limited. It can’t natively describe multiple robots in one file, environment objects, or advanced physics parameters.
So naturally, the community started patching it.
XACRO: URDF with Macros
XACRO came along because people got tired of copying and pasting the same XML blocks a thousand times.
Imagine having four identical wheels on a robot and writing out the same <link> and <joint> blocks for each one. That’s enough to make any roboticist question life choices.
XACRO solves that with macros and variables. It’s basically XML with programming powers. You can define a template for a wheel and instantiate it four times with different parameters.
So the relationship between URDF and XACRO is like HTML and templating engines — XACRO expands into URDF before ROS uses it. You don’t run a XACRO file; you generate a URDF from it.
Simple concept. Huge productivity gain.
SDF: Simulation Description Format
Now, if URDF is your friendly robot blueprint, SDF is your full-blown simulation world manual.
Developed by the Gazebo team, SDF can describe not only robots but entire worlds: terrain, lights, physics, sensors, and multiple interacting robots.
It’s also XML, but with more powerful constructs. For instance:
- You can define multiple models in a single file.
- It supports more detailed physics (inertia, damping, friction).
- You can nest and reuse models elegantly.
SDF became essential as Gazebo evolved beyond “drop one robot in a box” toward “simulate a swarm of robots.”
In short:
- URDF = one robot.
- SDF = the whole scene.
MJCF: MuJoCo’s Format
MuJoCo (Multi-Joint dynamics with Contact) comes from the research side of things — lightweight, fast physics, popular in reinforcement learning circles.
MJCF (MuJoCo XML Format) describes robots and worlds similar to SDF, but it’s tuned for MuJoCo’s engine. It allows compact, expressive descriptions and supports advanced physics (contacts, constraints, actuators) that URDF just can’t handle natively.
The nice thing about MJCF is its focus on dynamics fidelity. You get control over solver parameters, soft contacts, and other fine-grained simulation knobs that make learning agents behave more like they do in the real world.
Downside? It’s not ROS-native out of the box. You’ll often find researchers using MJCF for sim, then exporting to URDF for deployment.
USD: The Modern, Studio-Grade Format
Finally, there’s USD (Universal Scene Description) — Built by Pixar.
USD isn’t just for robots; it’s for everything in a 3D world. It’s hierarchical, extensible, and fast to load. NVIDIA picked it up for Omniverse and Isaac Sim, where USD is now the standard for representing complex environments, assets, and robots.
Unlike XML, USD is not human-friendly. But it’s super efficient for large-scale simulation pipelines. It can store geometry, materials, joints, physics, animations, and references to other files in a way that’s modular and scalable.
In a sense, USD is what you get when robotics starts thinking like a film studio — big worlds, shared assets, and photorealistic rendering with real-time physics.
Why So Many Formats?
Because robotics is a messy ecosystem.
Different communities optimized for different goals — ROS wanted readability, Gazebo wanted realism, MuJoCo wanted speed, NVIDIA wanted Hollywood-level fidelity.
No single format wins because no single format can. Your choice depends on your workflow:
- ROS + Gazebo → URDF/XACRO + SDF
- MuJoCo or RL → MJCF
- Isaac Sim or USD-based stack → USD
Learn the Common Denominator
Every format describes the same physical truths — links, joints, masses, inertia, visuals, collisions. Once you understand those fundamentals, switching formats is just a matter of syntax.
So don’t get too attached to your flavor of XML. Learn why a description exists, not just how it’s written.