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

Gazebo does not spawn mesh

asked 2022-05-30 19:12:55 -0600

pablo.arandarod gravatar image

I was trying to spawn a simple differential drive robot with a mesh for the body, the wheels and the caster ball. The meshes are stores in a folder inside the package called meshes. The name of the package is toycar, so in order to include the meshes, I add the following lines to the definition of the wheel link;

        <origin xyz="0.0 0.0 0.0" rpy="1.57 0.0 0.0"/>
            <mesh filename="package://toycar/meshes/wheel.stl" scale="1.0 1.0 1.0" />

Even if there is no error appearing in the launch of the node, the mesh of the wheel does not appear. This is extended to the other links, but I only worked with this one for now to isolate the problem.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-05-31 01:58:09 -0600

Joe28965 gravatar image

package:// no longer works. Could you try ${find toycar}/meshes/wheel.stl. I believe that should work.

edit flag offensive delete link more


Thanks, it is working now! In which part of the documentation is this found? In order to be able to check more things in the future

pablo.arandarod gravatar image pablo.arandarod  ( 2022-05-31 02:20:58 -0600 )edit

This is a very important point - I've had the same mesh problems before and this was the only way to overcome them. It should be mentioned somewhere in the ROS or Gazebo tutorials.

ljaniec gravatar image ljaniec  ( 2022-05-31 02:24:16 -0600 )edit

I honestly don't know where in the documentation that's mentioned (if mentioned anywhere). It's one of those things that you pick up over the years I guess?

Could you accept my answer as correct, to mark the question as answered?

Joe28965 gravatar image Joe28965  ( 2022-05-31 02:26:17 -0600 )edit

Sure! I thought I did already. But what is weird is that I just checked the ros tutorials and the gazebo tutorials and cannot find anywhere where they mention that.

pablo.arandarod gravatar image pablo.arandarod  ( 2022-05-31 02:33:21 -0600 )edit

Could you link to the tutorials where they mention meshes? I've had a quick search and wasn't able to even find a tutorial on meshes.

Joe28965 gravatar image Joe28965  ( 2022-05-31 02:38:55 -0600 )edit

Here: They mention the format I initially put.

pablo.arandarod gravatar image pablo.arandarod  ( 2022-05-31 05:32:41 -0600 )edit

Ah, yes, wiki.ros consists of ROS1 tutorials, which makes sense since package:// does work in ROS1. will send you to the ROS2 documentation.

Joe28965 gravatar image Joe28965  ( 2022-05-31 06:38:14 -0600 )edit

As you can see in this link, it is still unchanged in the tutorials. I might try to find it in the git repository and do some pull request.

pablo.arandarod gravatar image pablo.arandarod  ( 2022-06-01 09:24:57 -0600 )edit

Question Tools

1 follower


Asked: 2022-05-30 19:12:55 -0600

Seen: 715 times

Last updated: May 31 '22