ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

invisible mesh in gazebo

asked 2012-10-26 07:08:28 -0500

viovio gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2012-10-27 22:22:36 -0500

updated 2012-10-27 22:51:11 -0500

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)
  2. I'm not sure whether Gazebo displays the "visual" or the "collision" model. Try also putting the mesh into the "collision" tag.

  3. 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).

edit flag offensive delete link more
0

answered 2018-05-19 11:43:30 -0500

Markus gravatar image

updated 2018-05-19 13:12:22 -0500

Hey there,

I also have a quite strange behavior: Neigher RVIZ nor gazebo7 showed my stl files I could not see anything.

Now the problem for RVIZ was that I started it in a terminal which was not sourced before. For this reason I also got this message:

[ WARN] [1526747950.872458465, 38.200000000]: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://kuka_manipulator_description/meshes/kr5_arc/collision/link_6.stl in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1526747950.872529918, 38.200000000]: Could not load model

After sourcing RVIZ the model showed up in RVIZ but I still cannot see my model in gazebo.... (am not sure why....)

If nothing works to see gazebo model

Just try to click view->Collissions and may also enable wireframe

Solved it -> see gazebo model

If you cannot see your .dae in your gazebo simulation you can at least may attach a material to it:

This can be done via:

<gazebo reference="link_1">
   <material>Gazebo/Green</material>
</gazebo>

a full material list is here:

http://wiki.ros.org/simulator_gazebo/...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-26 07:08:28 -0500

Seen: 4,153 times

Last updated: May 19 '18