Ask Your Question

Building URDF from scratch, how to calculate inertial values?

asked 2017-04-28 03:45:07 -0500

Auton0mous gravatar image

I've been stuck on this for a while. Most resources online point to complex equations even for the simplest of shapes. Surely there is some sort of software in which I can just build my robot and have it generate inertial values?

edit retag flag offensive close merge delete



I don't know of any software that would "just" do this for you unfortunately. But to make sure: if you are not planning on using any sort of dynamic simulator (Gazebo, V-REP, etc), you don't need to specify any inertial properties.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-28 04:46:17 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-04-28 08:42:29 -0500

Airuno2L gravatar image

I've found the following link to be very helpful:

And I actually just make my inertial values the same as a box the same size as my collision shapes so the inertial values are just calculated using the formula lists for cuboids on this wikipedia page using the values from my collision boxes. Like that gazebo tutorial mentions, if you temporarily set mass = 1, you can view the inertial cube in gazebo and it should be the same as your collision cube.

This is close enough for most applications.

edit flag offensive delete link more

answered 2017-04-28 06:50:01 -0500

spooner-dev gravatar image

Check out the MyBot Tutorial and specifically its xacro file :

<macro name="cylinder_inertia" params="m r h">
      <inertia  ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
                  iyy="${m*(3*r*r+h*h)/12}" iyz = "0"
                  izz="${m*r*r/2}" /> 

<macro name="box_inertia" params="m x y z">
        <inertia  ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
                  iyy="${m*(x*x+z*z)/12}" iyz = "0"
                  izz="${m*(x*x+z*z)/12}" /> 

<macro name="sphere_inertia" params="m r">
        <inertia  ixx="${2*m*r*r/5}" ixy = "0" ixz = "0"
                  iyy="${2*m*r*r/5}" iyz = "0"
                  izz="${2*m*r*r/5}" /> 

These macroses are calculations for basic shapes and could be easily pulled into your project. But if you need inertias for some custom shapes, then you should look into some 3D modeling SW, they have capability to calculate necessary matrices for you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-04-28 03:45:07 -0500

Seen: 1,079 times

Last updated: Apr 28 '17