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

URDF link mass inertia properties

asked 2012-07-17 22:15:21 -0500

dbworth gravatar image

updated 2014-01-28 17:13:03 -0500

ngrennan gravatar image

Hi
I'm building a URDF for rviz, and eventually Gazebo. I'm a bit confused about the best values to put in for the Inertia Origin and Moment of Inertia matrix.

Below you should see a screenshot of a robot shoulder in SolidWorks. (Right-click and open to see it in full size)
The origin is the tri-color axis, which I put there because it matches the link origin.
This means I should be able to specify the mesh visual origin as 0,0,0.

The pink axis is the Center of Mass found by SolidWorks.

The URDF XML doc: http://ros.informatik.uni-freiburg.de/roswiki/urdf(2f)XML(2f)inertial.html says the Inertial Origin should be the "Link Center of Mass".

So I could use the SolidWorks Center of Mass x,y,z co-ordinates as the Inertial Origin.
But I don't know which Ix,Px, Lxx, or Ixx values from SolidWorks to use?

Or, why can't I just set the Inertial Origin to 0,0,0 and use the very last set of values from SolidWorks: Ixx, Ixy, Ixz, etc.
Will Gazebo/ODE get confused because the Inertial Origin is not the Center of Mass of the link?

These two posts provided some info, but no complete explanation:
http://answers.ros.org/question/11407/what-is-the-origin-of-the-inertia-tensor-in-urdf/
http://answers.ros.org/question/30539/choosing-the-right-coefficients-for-gazebo/


Thanks.

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-12-19 08:03:46 -0500

brawner gravatar image

updated 2013-01-04 11:10:52 -0500

The origin of the inertial element of the URDF must be taken from the center of mass of the link. So the XYZ of the inertial origin is the offset from the link's origin to the center of mass. Currently, the orientation of the inertial element is assumed to match the orientation of link's origin and RPY for the inertial origin is not supported. Therefore if you were pulling values from SolidWorks mass properties, you should probably use the moment of inertia taken at the center of mass and aligned with the output coordinate system (Lxx).

However, a few caveats. Make sure the 'output coordinate system' you choose aligns with the coordinate system in the URDF. Many times in SW, the default coordinate system has Y pointing upward, but in URDF and Gazebo, Z is assumed to be pointing upward. Place your 'output coordinate system' by inserting a reference coordinate system in SolidWorks at either the origin location of the joint connecting this link with its parent link, or in the case of the base_link, place the output coordinate system at the collision/visual origin (typically the default origin for the model).

I'm going to toot my own horn here and plug the SolidWorks to URDF exporter for exactly this. Though, I realize answering this question four months after you asked it is of little help.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-07-17 22:15:21 -0500

Seen: 10,072 times

Last updated: Jan 04 '13