Home | Tutorials | Wiki | Issues
Ask Your Question
0

Collisions does not work

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

yaqwsx gravatar image

Hello,

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: https://files.honzamrazek.cz/models.zip

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

(1569313534 985992523) [Wrn] [ModelDatabase.cc:340] Getting models from[http://models.gazebosim.org/]. This may take a few seconds.
(1569313600 130413970) [Wrn] [SystemPaths.cc:459] File or path does not exist [""] [model://universalModule/meshes/bodyA.stl]
(1569313600 130600551) [Err] [MeshShape.cc:66] No mesh specified
(1569313600 131292799) [Wrn] [SystemPaths.cc:459] File or path does not exist [""] [model://universalModule/meshes/bodyB.stl]
(1569313600 131651177) [Err] [MeshShape.cc:66] No mesh specified
(1569313600 132344317) [Wrn] [SystemPaths.cc:459] File or path does not exist [""] [model://universalModule/meshes/shoeA.stl]
(1569313600 132547141) [Err] [MeshShape.cc:66] No mesh specified
(1569313600 132956421) [Wrn] [SystemPaths.cc:459] 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
0

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

Comments

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

Stats

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

Seen: 57 times

Last updated: Sep 26