# Revision history [back]

### Inertia matrices and double precision ODE

Hi All,

I have a problem with the precision of ODE.

The environment that I'm trying to use is:

• Ubuntu trusty
• ROS Indigo
• Gazebo 6

The model of my robot (about 0.4 metre tall) has links as small as this and mass of 0.025kg:

  <geometry>
<box size="0.045 0.022 0.0325"/> // Units in metre
</geometry>


And this is the inertial element, with the real values, for the same link:

   <inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.0243577</mass>
<inertia>
<ixx>3.12641e-06</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>6.25435e-06</iyy>
<iyz>0</iyz>
<izz>5.09279e-06</izz>
</inertia>
</inertial>


So the problem that I have is that the moments of inertia are too small and the model becomes unstable.

I have tried scaling the values for the inertia matrix, but no the geometry, collisions, mass, etc. This had some reasonable behaviour with Gazebo 2.2, but with Gazebo 6 the inertial values are too big and the robot bounces with any slight movement.

I also was thinking in increasing the precision on ODE to double, but I haven't find any tutorial to do this.

I know that converting the measurement units to millimetres consistently across the model and ROS could fix the problem, but I'd prefer some more transparent solution rather than converting units back and forth and managing different units for the physical robot and the simulation.

Do you have any recommendation to deal with this?

Thanks, Germán

### Inertia matrices and double precision ODE

Hi All,

I have a problem with the precision of ODE.

The environment that I'm trying to use is:

• Ubuntu trusty
• ROS Indigo
• Gazebo 6

The model of my robot (about 0.4 metre tall) has links as small as this and mass of 0.025kg:

  <geometry>
<box size="0.045 0.022 0.0325"/> // Units in metre
</geometry>


And this is the inertial element, with the real values, for the same link:

   <inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.0243577</mass>
<inertia>
<ixx>3.12641e-06</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>6.25435e-06</iyy>
<iyz>0</iyz>
<izz>5.09279e-06</izz>
</inertia>
</inertial>


So the problem that I have is that the moments of inertia are too small and the model becomes unstable.

I have tried scaling the values for the inertia matrix, but no the geometry, collisions, mass, etc. This had some reasonable behaviour with Gazebo 2.2, but with Gazebo 6 the inertial values are too big and the robot bounces with any slight movement.

I also was thinking in increasing the precision on ODE to double, but I haven't find any tutorial to do this.

I know that converting the measurement units to millimetres consistently across the model and ROS could fix the problem, but I'd prefer some more transparent solution rather than converting units back and forth and managing different units for the physical robot and the simulation.

Do you have any recommendation to deal with this?

EDIT: After applying debz and hsu recommendations, I also realised that my joint controller was using incorrect method to control the joint position. With all the corrections the model works without problems.

Thanks, Germán