Home | Tutorials | Wiki | Issues
Ask Your Question
0

Warning [parser.cc:536] XML Attribute[***] in element[***] not defined in SDF, ignoring.

asked 2018-11-29 06:17:06 -0600

ivan gravatar image

I try to set inertial parameters of the imported object in sdf. It seems it works for other people, however for me it results in warnings. Neither mass, nor moments of inertia, nor CoM are set in Gazebo. I use ROS Kinetic and Gazebo 7.0.0 under Ubuntu 16.04. What could be a problem here?

sdf file

<?xml version="1.0" ?>
<sdf version="1.6">
  <model name="kitchen_spatula">
    <static>false</static>
    <link name="link">
      <pose>0 0 0 0 0 0</pose>
      <inertial>
    <origin rpy="0 0 0" xyz="0.13606 0.00000 0.02002"/>
    <mass value="0.14867"/>
    <inertia ixx="0.00016"
             ixy="0.00000"
             ixz="0.00030"
             iyy="0.00113"
             iyz="0.00000"
             izz="0.00106"/>
      </inertial>
      <visual name="visual">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <mesh>
        <uri>model://kitchen_spatula/low_poly_paddle.STL</uri>
        <!-- Whatever unit you use in stl, it will be treated as meters by Gazebo:
        http://answers.gazebosim.org/question/8294/mesh-scale-huge-for-stl-file/ -->
        <scale>0.001 0.001 0.001</scale>
      </mesh>
    </geometry>
    <material>
      <script>
        <uri>file://media/materials/scripts/gazebo.material</uri>
        <name>Gazebo/Orange</name>
      </script>
    </material>
      </visual>
      <collision name="collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <mesh>
        <uri>model://kitchen_spatula/low_poly_paddle.STL</uri>
        <scale>0.001 0.001 0.001</scale>
      </mesh>
    </geometry>
      </collision>
    </link>
  </model>
</sdf>

output:

[INFO] [1543493481.499131, 0.000000]: Loading model XML from ros parameter
[INFO] [1543493481.500796, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Warning [parser.cc:778] XML Element[origin], child of element[inertial] not defined in SDF. Ignoring[origin]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.
Warning [parser.cc:536] XML Attribute[value] in element[mass] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[ixx] in element[inertia] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[ixy] in element[inertia] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[ixz] in element[inertia] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[iyy] in element[inertia] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[iyz] in element[inertia] not defined in SDF, ignoring.
Warning [parser.cc:536] XML Attribute[izz] in element[inertia] not defined in SDF, ignoring.
[ INFO] [1543493482.285987182, 0.021000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1543493482.315061083, 0.049000000]: Physics dynamic reconfigure ready.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-11-29 16:03:48 -0600

azeey gravatar image

It looks like you are using URDF syntax inside SDF. You have:

<inertial>
<origin rpy="0 0 0" xyz="0.13606 0.00000 0.02002"/>
<mass value="0.14867"/>
<inertia ixx="0.00016"
          ixy="0.00000"
          ixz="0.00030"
          iyy="0.00113"
          iyz="0.00000"
          izz="0.00106"/>
</inertial>

Instead, it should be:

<inertial>
  <pose>0.13606 0.00000 0.02002 0 0 0</pose>
  <inertia>
    <ixx>0.00016</ixx>
    <ixy>0</ixy>
    <ixz>0.00030</ixz>
    <iyy>0.00113</iyy>
    <iyz>0</iyz>
    <izz>0.00106</izz>
  </inertia>
  <mass>0.14867</mass>
</inertial>

You can find out more about the SDF syntax here

edit flag offensive delete link more

Comments

Thanks for help! I will check it next week and get back with result.

ivan gravatar imageivan ( 2018-11-29 21:53:33 -0600 )edit

Thanks again, it works now. I could not realize that these syntaxs are incompatible.

ivan gravatar imageivan ( 2018-12-10 00:42:01 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-29 06:15:46 -0600

Seen: 31 times

Last updated: Nov 29