URDF vs MJCF for ROS 2
URDF is the canonical ROS robot description; MJCF is MuJoCo's native format. With MuJoCo + ROS 2 integrations now mainstream, the choice is less obvious than it used to be. Here is how the two formats compare and the workflow most teams converge on.
Updated 2026-06-05
URDF is the ROS 2 default, supported by MoveIt 2, ros2_control, Gazebo/Ignition, and most existing tooling. MJCF is more expressive on contact, articulation, and actuator modelling, which matters for RL policy training in MuJoCo. Most teams author URDF as the source of truth and convert to MJCF where the policy stack needs it.
Side-by-side comparison
| Dimension | URDFROS-native robot description | MJCFMuJoCo-native XML format |
|---|---|---|
| Origin | Willow Garage / ROS, 2009 | MuJoCo / DeepMind, 2012 |
| Native ecosystem | ROS / ROS 2, Gazebo, MoveIt | MuJoCo, dm_control, Isaac Lab via MJX |
| Joint types | Revolute, prismatic, fixed, floating, planar, continuous | Hinge, slide, ball, free + composite joint groups |
| Inertial properties | Mass + inertia tensor per link | Mass + inertia + auto-recompute from geometry |
| Sensors | Via Gazebo plugins, not in core spec | First-class sensor declarations in MJCF |
| Contacts & friction | Single coefficient per pair, no per-geom tuning | Per-geom friction, solref, solimp, condim with full control |
| Collision shapes | Mesh, box, cylinder, sphere | Mesh, box, cylinder, sphere, capsule, ellipsoid, plane, hfield |
| Composability | xacro for macros and includes | Native include, default, class-based templating |
| ROS 2 tooling support | First-class (MoveIt 2, ros2_control, Gazebo, RViz) | Growing (mujoco_ros2_control, mujoco_simulator, conversion bridges) |
| RL training in MuJoCo | Needs conversion to MJCF first | Native, no conversion step |
| Best fit | Production ROS 2 stack, MoveIt, classical control | RL / IL training, contact-rich tasks, dexterous manipulation |
URDF in ROS 2: the default, still
URDF (Unified Robot Description Format) is the ROS-native XML schema for describing kinematic chains. It has been the ROS robot description standard since 2009 and remains the format MoveIt 2, ros2_control, Gazebo, RViz, and the broader ROS 2 ecosystem consume by default. Its strengths are tooling depth (almost any ROS 2 package that needs a robot description reads URDF), composability via xacro macros, and a mature debugging story. Its limitations show up at the edges of expressivity: contact modelling is coarse (one friction coefficient per pair), sensors are not in the core spec (Gazebo plugins fill the gap), and physical accuracy of contact-rich manipulation is bounded by the underlying simulator. For most production ROS 2 work, navigation, MoveIt-driven manipulation, classical control, URDF is still the right answer.
MJCF in ROS 2: from MuJoCo-only to mainstream
MJCF (MuJoCo XML format) is MuJoCo's native schema. It is more expressive than URDF on the dimensions that matter for contact-rich simulation: per-geom friction, configurable solref and solimp contact parameters, native sensor declarations, additional collision primitives (capsule, ellipsoid, hfield), and class-based templating. MuJoCo became open-source under DeepMind in 2021, and the integration story with ROS 2 has matured fast: mujoco_ros2_control wraps MuJoCo in the ros2_control framework, mujoco_simulator provides a Gazebo-style ROS 2 simulation interface, and Isaac Lab (via MJX) consumes MJCF for GPU-parallel RL training. For RL policy work, dexterous manipulation, or any task where contact modelling dominates policy quality, MJCF is the better authoring substrate.
The practical decision: author URDF, convert to MJCF
Most teams converge on a hybrid: URDF as the single source of truth (because the ROS 2 tooling ecosystem assumes it), with MJCF generated on demand for the training pipeline. Conversion tools (mjcf_from_urdf, dm_control's URDF importer, MuJoCo Menagerie's scripts) handle most cases automatically; the edge cases that need manual MJCF tuning, per-geom friction overrides, custom solref values for contact-rich tasks, are added as a post-conversion edit. Authoring MJCF as the source of truth is also valid if your stack is MuJoCo-first and ROS 2 is only an inference-time runtime; in that case, URDF conversion happens at deploy time. The wrong move is dual authoring: keep one source of truth and convert.
When to choose each
Production ROS 2 stacks, MoveIt 2, ros2_control with Gazebo, classical control, and any team where the ROS 2 tooling ecosystem is the centre of gravity.
RL and IL policy training, contact-rich manipulation, dexterous tasks, MuJoCo-first stacks, or any workflow where contact-modelling fidelity dominates outcomes.
Where Rigyd fits
Rigyd outputs OpenUSD and MJCF natively. For ROS 2 stacks that need URDF, the OpenUSD output can be converted via community USD→URDF tools while preserving the underlying physics, so the same source asset can feed Isaac Sim, MuJoCo, and (via conversion) ROS 2 without re-authoring physics from scratch.