0
$\begingroup$

Rosanswers logo

Hello,

I build up an .urdf-file which can be correctly loaded in rviz. The Geometry is defined by meshes. When I load it in Gazebo the Robot is invisible. The Terminal shows no failure-messages except the warning that urdf will not be any longer supported (this was discussed in a different threat and seems to be unimportant). I simplified my .urdf file to one link to exclude possible problems:

<robot name="TX60L">

  <link name="base_link" >

    <inertial>
      <origin xyz="2 0 0" /> 
      <mass value="1.0" />
      <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
    </inertial>

    <visual>
    <origin xyz="0 0 0" rpy="0 0 0" />
    <geometry>
     <mesh filename="package://learning_urdf/meshes/tx60l/bt.stl" scale="0.001 0.001 0.001"/>
    </geometry>             
    </visual>

    <collision>
      <origin xyz="2 0 0"/>
      <geometry>
        <box size="1 1 2" />
      </geometry>
    </collision>
  </link>

  <gazebo reference="my_box">
    <material>Gazebo/Blue</material>
  </gazebo>

</robot>

The box-example from the gazebo-tutorial can be displayed correctly.

Any Suggestions how to get my model visible? Have I to deliver additional Informations?

Many Thanks in advance Dominik


Originally posted by viovio on ROS Answers with karma: 117 on 2012-10-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Some shots in the dark:

  1. Do you by any chance have an Intel GMA integrated graphics chipset? I know that RViz has problems displaying STL meshes on Intel chipsets, maybe Gazebo does too. Things to try:
  • test your URDF on a computer with a dedicated graphics card (NVidia works well usually)
  • convert your STL file to DAE using meshlab
  • try if RViz can display your model (run gazebo and RViz, then enable "Robot model" visualization in RViz)
  1. I'm not sure whether Gazebo displays the "visual" or the "collision" model. Try also putting the mesh into the "collision" tag.

  2. This should be a no-brainer, but still: can Gazebo find your mesh file at the specified location? There should be an error message on the console if it can't.


Edit: I've just tested your URDF file, and it looks like your minimal example was a little too minimal :-). You need at least one extra link for Gazebo to display anything. The following works for me:

<robot name="TX60L">

  <link name="base_link" >
    <inertial>
      <origin xyz="0 0 0" /> 
      <mass value="1.0" />
      <inertia  ixx="0.001" ixy="0.0"  ixz="0.0"  iyy="0.001"  iyz="0.0"  izz="0.001" />
    </inertial>

    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://learning_urdf/meshes/tx60l/bt.stl" />
      </geometry>             
    </visual>

    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://learning_urdf/meshes/tx60l/bt.stl" />
      </geometry>             
    </collision>
  </link>

  <joint name="dummy_joint" type="fixed">
    <parent link="base_link" />
    <child link="dummy_link" />
    <origin xyz="2.0 0 0" rpy="0 0 0" />
  </joint>

  <link name="dummy_link" >
    <inertial>
      <origin xyz="2 0 0" /> 
      <mass value="1.0" />
      <inertia  ixx="0.001" ixy="0.0"  ixz="0.0"  iyy="0.001"  iyz="0.0"  izz="0.001" />
    </inertial>

    <visual>
      <origin xyz="0 0 0"/>
      <geometry>
        <box size="0.4 0.4 0.4" />
      </geometry>
    </visual>

    <collision>
      <origin xyz="0 0 0"/>
      <geometry>
        <box size="0.4 0.4 0.4" />
      </geometry>
    </collision>
  </link>
</robot>

If you need more help, please also upload your STL file somewhere (I tested with one of my own STL meshes).


Originally posted by Martin Günther with karma: 11816 on 2012-10-27

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.