Accessing gzserver on docker from gzclient on host machine

asked 2019-06-24 14:13:15 -0600

aarontan gravatar image


Inspired by @ChuiV 's suggestion from this question

I am attempting to access a gzserver that is within a container with a gzclient on my host machine to be able to see the gazebo gui.

I did so by first launching the gazebo simulation within the container. From there I was able to obtain the following information.

[Msg] Waiting for master.
[ INFO] [1561403092.973345664]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @
[Msg] Publicized address:

With this information, I did the following on my host machine


The gazebo window begins to show, and then closes interruptly with the following error message:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
  what():  boost::filesystem::status: Permission denied: "/root/catkin_ws/src/simulate_traversability/description/meshes/p3at_meshes/chassis.stl"
Aborted (core dumped)

Does anyone have any experience with this?

Thank you, Aaron

edit retag flag offensive close merge delete


Hi, have you solved this problem? I'm having the same issue. Here are what I've done:

  1. create my image from osrf/ros:melodic-desktop-full-stretch
  2. clone all turtlebot3 git and catkin_make -> source setup.bash
  3. roslaunch turtlebot3_gazebo turtlebot3_world.launch -> Get below error:

    [ INFO] [1567742539.462532958]: Finished loading Gazebo ROS API Plugin. [ INFO] [1567742539.463685695]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting... Aborted (core dumped) [gazebo_gui-3] process has died [pid 3328, exit code 134, cmd /opt/ros/melodic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/root/.ros/log/1d2b9920-d05b-11e9-a5bc-4cedfb43bb21/gazebo_gui-3.log]. log file: /root/.ros/log/1d2b9920-d05b-11e9-a5bc-4cedfb43bb21/gazebo_gui-3*.log

I think the base image has flaw in it. Try to reinstall all gazebo pkg in that container but no luck!

nhphuong gravatar image nhphuong  ( 2019-09-05 23:43:02 -0600 )edit

I've just had the same problem. I'm not sure if this is because gzclient looks for the mesh path in the host computer or because it doesn't have access to the container path.

Georacer gravatar image Georacer  ( 2021-01-20 14:16:47 -0600 )edit