Home | Tutorials | Wiki | Issues
Ask Your Question
1

Can't load meshes correcly

asked 2013-11-26 14:23:18 -0500

AlphaOne gravatar image

So I am trying to import a robot into gazebo and it doesn't work, so I cut down my model to just the frame and the that doesn't even work. Here is the sdf file I am trying to load:

<?xml version='1.0'?>
<sdf version='1.4'>
<model name='rbe_500_model'>
<link name='base_link'>
  <pose>0 0 0 0 -0 0</pose>
  <inertial>
    <pose>-0.264565 -0.0662113 0.0664452 0 -0 0</pose>
    <mass>1.58034</mass>
    <inertia>
      <ixx>0.166304</ixx>
      <ixy>-0.0400234</ixy>
      <ixz>-0.0244204</ixz>
      <iyy>0.181894</iyy>
      <iyz>-0.00669269</iyz>
      <izz>0.191948</izz>
    </inertia>
  </inertial>
  <collision name='base_link_collision'>
    <pose>0 0 0 0 -0 0</pose>
    <geometry>
      <mesh>
        <scale>1 1 1</scale>
        <uri>model:$(find rbe_500_model)/meshes/base_link.STL</uri>
      </mesh>
    </geometry>
  </collision>
  <visual name='base_link_visual'>
    <pose>0 0 0 0 -0 0</pose>
    <geometry>
      <mesh>
        <scale>1 1 1</scale>
        <uri>model:$(find rbe_500_model)/meshes/base_link.STL</uri>
      </mesh>
    </geometry>
  </visual>
</link>
</model>
</sdf>

I get these errors when I try to spawn the model

Error [MeshShape.cc:64] No mesh specified
Error [Visual.cc:2072] No mesh specified

any idea what I am doing wrong?

edit retag flag offensive close merge delete

Comments

1

maybe the 'find' command is not supported, (meaning "$(find rbe500model)"), or you are missing the STL files. You can try it by adding the rbe500model folder to the gazebo model path. Here is a tutorials that explains it in more detail: 'http://gazebosim.org/wiki/Tutorials/1.9/buildrobot/attachmeshes'

AndreiHaidu gravatar imageAndreiHaidu ( 2013-11-27 03:23:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-12-22 18:38:01 -0500

matwilso gravatar image

You mesh imports are incorrect. To import meshes from ROS packages in Gazebo, you need to use the syntax:

<uri>model://my_package/meshes/foo.STL</uri>

For Gazebo to find your package, you also need to include the code block below in your package.xml. See this answer for more information.

<export>
<!-- gazebo_ros_paths_plugin automatically adds these to
    GAZEBO_PLUGIN_PATH and GAZEBO_MODEL_PATH when you do this export inside
    the package.xml file. You can than use URIs of type model://my_package/stuff. -->
    <gazebo_ros                                                                 
        gazebo_plugin_path="${prefix}/lib"
        gazebo_model_path="${prefix}/.." /> 
</export>
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-11-26 14:23:18 -0500

Seen: 3,251 times

Last updated: Nov 26 '13