Gazebo | Ignition | Community
Ask Your Question
1

Problem with reading inertia values from sdf in Gazebo

asked 2017-08-18 07:54:19 -0600

Fiddle gravatar image

Hi there, I have a problem with defining inertia in the model sdf file. Everything is as in the code below, but when I import the model into Gazebo, it seems as if the program disregards everything in the intertial tags and inserts its own values. Is there something very obvious that I am missing?

image description

<?xml version='1.0'?>
<sdf version="1.4">
<model name="Mymodel">
    <pose>0 0 0.0 0 0 0</pose>
    <static>true</static>
        <link name="body">
            <inertial>
                <mass>0.002</mass>
                <inertia>
                    <ixx>0.000000420478</ixx> 
                    <ixy>0.0</ixy>         
                    <ixz>0.0</ixz>         
                    <iyy>0.000000091134</iyy>      
                    <iyz>0.0</iyz>        
                    <izz>0.000000404044</izz>      
                </inertia>
            </inertial>
            <collision name="collision">
                <geometry>
                    <box>
                        <size>0.015 0.047 0.018</size>
                    </box>
                </geometry>
             </collision>
             <visual name="visual">
                <geometry>
                   <mesh>
                       <uri>model:///mymodel/meshes/mymodel.stl</uri>
                   </mesh>
                </geometry>
             </visual>
      </link>
</model>
</sdf>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-18 22:27:27 -0600

alienmon gravatar image

It's actually fine. Gazebo has some limit decimal numbers.

If you load your model using gazebo GUI and enter the edit model feature. You can see that the inertial and mass are just as you specified image description

To reassure, you can try changing the number in SDF with higher number such as 5, then you can see that it actually matches the one you see in GUI.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-08-18 07:54:19 -0600

Seen: 339 times

Last updated: Aug 18 '17