Robotics StackExchange | Archived questions

Accessing gzserver on docker from gzclient on host machine

Hello,

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 @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.0.3

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

GAZEBO_MASTER_URI=http://172.17.0.3:11345 gzclient

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

Asked by aarontan on 2019-06-24 14:13:15 UTC

Comments

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!

Asked by nhphuong on 2019-09-05 23:43:02 UTC

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.

Asked by Georacer on 2021-01-20 15:16:47 UTC

Answers