Jointly Convert a file

Fixing URDF inertia and collision meshes

A URDF can load fine and still simulate terribly. Nine times out of ten the culprit is the inertial block or the collision mesh. Here's how to get both right.

Guide · ~6 min read

The inertial block

Every link needs an <inertial> block: a mass, a center-of-mass origin, and a 3×3 inertia tensor (given as six values — ixx ixy ixz iyy iyz izz). The simulator integrates the equations of motion from these numbers, so if they're wrong the robot behaves wrong — even though the XML is valid.

<inertial>
  <origin xyz="0 0 0.05" rpy="0 0 0"/>
  <mass value="1.2"/>
  <inertia ixx="0.004" ixy="0" ixz="0"
           iyy="0.004" iyz="0" izz="0.002"/>
</inertial>

Common inertia mistakes

Computing it correctly

The right way is to compute the tensor from the actual geometry and material. For a mesh, Mirtich's algorithm gives the exact mass, center of mass and inertia tensor of a polyhedron in one pass. If you know the real measured mass, scale the density so the computed mass matches — that corrects for hollow parts and infill.

Collision meshes

A link's <visual> mesh is for looks; its <collision> mesh is for physics. Reusing the detailed visual mesh for collision is the second big mistake:

The fix

Replace visual meshes with simplified collision geometry:

Doing it automatically

Jointly computes the full inertia tensor from your CAD with Mirtich's method and generates convex collision meshes as part of the conversion — so the URDF it exports is already simulation-stable, not just syntactically valid.

Skip the manual work

Jointly does everything on this page automatically: drop in your CAD (STEP, mesh, SolidWorks or Onshape), and it infers joints, axes, inertia and collision, then exports a simulation-ready URDF, SDF, MJCF or USD. The first conversions are free.

Try Jointly free →

Validate before you trust it