Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Run Gazebo headless on AWS and render locally with the gzclient

I installed gazebo on an AWS instance to run faster simulations. However, I am struggling with my setup. For doing a small test, I start an empty world on the AWS server

roslaunch gazebo_ros empty_world.launch headless:=true gui:=false

Then on my laptop I run:

ssh -L 11345:localhost:11345 ubuntu@aws_ip

this basically tunnels my localhost:11345 to the localhost:11345 of the aws computer. I then run

gzclient --verbose

on my laptop. The client starts, displays an empty gazebo window then dies.

Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.228
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call


[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)

There is one minute or so between the first warning and the second one. What is the problem here? Was gazebo never meant to be run this way (with remote servers at least) Does the gzclient and the gzserver share so much data that it is not practical to do it through internet?

If so, what would be an alternative? I don't consider VNC to be an alternative as it probably will be quite laggy too

Run Gazebo headless on AWS and render locally with the gzclient

I installed gazebo on an AWS instance to run faster simulations. However, I am struggling with my setup. For doing a small test, I start an empty world on the AWS server

roslaunch gazebo_ros empty_world.launch headless:=true gui:=false

Then on my laptop I run:

ssh -L 11345:localhost:11345 ubuntu@aws_ip

this basically tunnels my localhost:11345 to the localhost:11345 of the aws computer. I then run

gzclient --verbose

on my laptop. The client starts, displays an empty gazebo window then dies.

Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.228
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call


[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)

There is one minute or so between the first warning and the second one. What is the problem here? Was gazebo never meant to be run this way (with remote servers at least) Does the gzclient and the gzserver share so much data that it is not practical to do it through internet?

internet? I checked with nethogs and gzclient barely pulls 40 KB/sec (way less than my internet bandwidth)

1679 mehdi    gzclient                wlp4s0      5.115      39.034 KB/sec

If so, what would be an alternative? I don't consider VNC to be an alternative as it probably will be quite laggy too

Run Gazebo headless on AWS and render locally with the gzclient

I installed gazebo on an AWS instance to run faster simulations. However, I am struggling with my setup. For doing a small test, I start an empty world on the AWS server

roslaunch gazebo_ros empty_world.launch headless:=true gui:=false

Then on my laptop I run:

ssh -L 11345:localhost:11345 ubuntu@aws_ip

this basically tunnels my localhost:11345 to the localhost:11345 of the aws computer. I then run

gzclient --verbose

on my laptop. The client starts, displays an empty gazebo window then dies.

Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.228
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call


[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)

There is one minute or so between the first warning and the second one. What is the problem here? Was gazebo never meant to be run this way (with remote servers at least) Does the gzclient and the gzserver share so much data that it is not practical to do it through internet? I checked with nethogs and gzclient barely pulls 40 KB/sec (way less than my internet bandwidth)

1679 mehdi    gzclient                wlp4s0      5.115      39.034 KB/sec

If so, what would be an alternative? I don't consider VNC to be an alternative as it probably will be quite laggy too

I am using Ubuntu 18.04 with ROS Melodic and Gazebo 9