Gazebo | Ignition | Community
Ask Your Question

Collisions does not work

asked 2019-09-24 03:26:59 -0500

yaqwsx gravatar image


I am trying to define a custom model for my robot. I have modeled it in Fusion 360, then exported as OBJ and I have written SDF file. When I import the model, I can see the visual and collision meshes line up perfectly. However, when I run the simulation, my model falls through the ground plane. There are no contact points detected. I also tried to convert the collision mesh to STL and use it instead as I have found and issue on a bitbucket claiming OBJ files do not work as collision meshes.

What do I miss in my configuration? I assume it is a silly mistake. My model is available here:

EDIT: I have looked into ~/.gazebo/server-{num}/default.log and there are following lines:

(1569313534 985992523) [Wrn] [] Getting models from[]. This may take a few seconds.
(1569313600 130413970) [Wrn] [] File or path does not exist [""] [model://universalModule/meshes/bodyA.stl]
(1569313600 130600551) [Err] [] No mesh specified
(1569313600 131292799) [Wrn] [] File or path does not exist [""] [model://universalModule/meshes/bodyB.stl]
(1569313600 131651177) [Err] [] No mesh specified
(1569313600 132344317) [Wrn] [] File or path does not exist [""] [model://universalModule/meshes/shoeA.stl]
(1569313600 132547141) [Err] [] No mesh specified
(1569313600 132956421) [Wrn] [] File or path does not exist [""] [model://universalModule/meshes/shoeB.stl]

So the problem is with using the model:// path specifier. How to use it properly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-26 08:36:00 -0500

kumpakri gravatar image

Try adding the path to your universalModule folder to the system variable GAZEBO_MODEL_PATH.

edit flag offensive delete link more


Thank you - it helped (actually, I have to add the path to the models' database).

I don't understand how paths work in Gazebo. I would like to specify all paths relative the SDF file so when I put my models in a repository anyone can run the simulation easily. I consider specifying the GAZEBO_MODEL_PATH as extremely inconvenient for the user. What is the proper way to distribute my model database and simulation to users?

yaqwsx gravatar imageyaqwsx ( 2019-09-27 02:13:16 -0500 )edit

This seems as a good question for a new post. I simply include my models in a package and add the path to the GAZEBO_MODEL_PATH in launch files.

<env name="GAZEBO_MODEL_PATH" value="$(find robot_gazebo)/models:${GAZEBO_MODEL_PATH}"/>
kumpakri gravatar imagekumpakri ( 2019-09-27 04:20:56 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-09-24 02:55:23 -0500

Seen: 1,193 times

Last updated: Sep 26 '19