Error loading mesh models on local machine with Gazebo running in container

asked 2020-12-22 14:48:45 -0500

reubenh gravatar image

I am running turtlebot3 simulations headlessly inside a docker container with Gazebo 7.16.1. I am able to connect gzclient running on my local machine (version 7.16.1 also) to view the simulation. I am having trouble loading some of the mesh models however:

[Err] [ModelDatabase.cc:414] Unable to download model[model://turtlebot3_world/meshes/hexagon.dae]

[Err] [SystemPaths.cc:429] File or path does not exist[""]

[Err] [Visual.cc:2914] No mesh specified

[Err] [SystemPaths.cc:429] File or path does not exist["/home/catkin_ws/src/turtlebot3-kinetic-devel/turtlebot3_description/meshes/wheels/left_tire.stl"]

The gazebo world loads fine, with the basic geometries, but is obviously missing the turtlebot model and some of the specific turtlebot world models.

I have all of the files to run the simulation solely on my local machine, so I am certain that the last error is because the paths in my container vs my local machine are different (container path is /home/catkin_ws/ whereas local machine path is /home/user/catkin_ws/ and I assume the first error is a similar cause.

My question is; how do I modify the instruction that is telling gzclient where to load the meshes from so that I can fix these errors, and if there is anything else I need to change to get it working.

I have been recommended to mount a volume from my local machine into my container, but cant quite get my head around this as I believe the model/mesh files need to be in these specific directories (catkin_ws/src/....).

Any help would be appreciated. Thanks

edit retag flag offensive close merge delete