.xml  →  .urdf

MJCF to URDF

Convert a robot description from MJCF to URDF in the browser. Nothing is installed and nothing is queued: the file is read, written in the other format, and handed back with a list of anything that could not be carried across.

Convert a file

MJCF .xml URDF .urdf

Drop your MJCF here

Drop the folder too if the model references meshes.

Files are read on our server and deleted after a day. Nothing is published.

What this conversion costs

These are the things URDF has no place for. They are reported on the converted file as well, as a comment at the top, so the file itself says what is missing from it.

  • Anything MuJoCo adds that a robot description has no place for: solver settings, contact parameters, actuators, sensors, the floor and the lights.
  • Free joints. A URDF has no way to say "this body floats" — the base becomes the root link and whatever held it up is gone.

MJCF describes a scene, URDF describes a robot

Everything in the file that is not the robot — the ground plane, the sky, the cameras — has nowhere to go and is dropped.

A kinematic tree, not a graph

URDF allows exactly one parent per link. A model with a closed loop cannot be written as URDF at all, and we say so rather than quietly cutting the loop.

Read the way MuJoCo reads it

Every orientation form MJCF has — quat, axisangle, xyaxes, zaxis, and euler in whatever eulerseq the file sets — joints placed off their body's origin, shapes stretched between two points, classes, frames and nested includes. The reader was checked against MuJoCo itself on 65 Menagerie robots: every body, joint axis and primitive lands where MuJoCo puts it. A capsule or box that MuJoCo fits to a mesh is carried as the mesh.

Coupled joints become mimic joints

A gripper's second finger tied to its first by an equality constraint is exactly a URDF mimic joint, and is written as one.

A ball joint becomes three hinges

URDF has no joint that turns about a point in every direction. A ball is written as three revolute joints, about x, y and z, through two one-gram links — the form every URDF reader can move, where a floating joint is one KDL and robot_state_publisher hold still. Its range becomes the same limit on each of the three.

The two formats

MJCF .xml
MuJoCo's own format: the same robot, plus everything a solver needs to simulate it. MJCF, explained
URDF .urdf
the ROS description of a robot: links, joints, geometry and inertia, one rigid tree. A URDF file, line by line

Converting is rarely the whole job. Once you have the URDF, the viewer shows what actually came across — collision geometry against visual, joint limits, where the mass sits — and the physics lab answers the question a file cannot: whether the robot stands up when gravity is switched on.

Other directions