ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Inertia is mainly important in simulation. If you are just using a URDF for visualization in RVIZ then it really doesn't matter. If you use a URDF to drive simulation (such as using it in gazebo) then it does matter. inertia tags in a URDF are the 3d tensor moments of inertia. This can be calculated with most mainstream CAD packages for complex geometry. If the geometry is simple you could also calculate it yourself using the formulas from here.

As stated the inertia is a 3d tensor so it should have multiple fields. See example below:

Consider a sphere with mass of 10.5kg, and radius of 0.5 meters.

The tensor for a sphere is:

sphere_tensor

So along the diagonal, the values should be 2/5 * m * r^2 => 2/5 * 10.5 * 0.5^2 = 1.05

The inertial tag for this would look like:

<inertial>
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <mass value="10.5"/>
  <inertia
    ixx="1.05"  ixy="0.00"  ixz="0.00"
    iyx="0.00"  iyy="1.05"  iyz="0.00"
    izx="0.00"  izx="0.00"  izz="1.05"
  />
</inertial>

Hope this helps!

Inertia is mainly important in simulation. If you are just using a URDF for visualization in RVIZ then it really doesn't matter. If you use a URDF to drive simulation (such as using it in gazebo) then it does matter. inertia tags in a URDF are the 3d tensor moments of inertia. This can be calculated with most mainstream CAD packages for complex geometry. If the geometry is simple you could also calculate it yourself using the formulas from here.

EDIT: Some more info is available on the ros wiki as well

As stated the inertia is a 3d tensor so it should have multiple fields. See example below:

Consider a sphere with mass of 10.5kg, and radius of 0.5 meters.

The tensor for a sphere is:

sphere_tensor

So along the diagonal, the values should be 2/5 * m * r^2 => 2/5 * 10.5 * 0.5^2 = 1.05

The inertial tag for this would look like:

<inertial>
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <mass value="10.5"/>
  <inertia
    ixx="1.05"  ixy="0.00"  ixz="0.00"
    iyx="0.00"  iyy="1.05"  iyz="0.00"
    izx="0.00"  izx="0.00"  izz="1.05"
  />
</inertial>

Hope this helps!