Skip to content

Gazebo remote simulation

João Avelino edited this page Oct 30, 2020 · 1 revision

Gazebo remote simulation

Vizzy's gazebo simulation can be quite heavy for some computers. Fortunately, it is possible to run gazebo server and gazebo client on different machines if they can access each other through IPV4.

1 - Check your network

Be sure that each machine can ping each other. To avoid problems in the long run add each machine's hostname and IP in the /etc/hosts file. Check that everything works by pinging each other's hostnames.

2 - Configure environment variables in the client side

You need to set the GAZEBO_MASTER_URI and GAZEBO_IP your client machine. You can do so by adding the following lines to your .bashrc (don't forget to source ~/.bashrc):

export GAZEBO_MASTER_URI=[the_server_ipv4]:11345

export GAZEBO_IP=[your_ipv4_in_the_servers_network]

For instance, for a gzserver running in cortex1 and a gzclient running in vizzy-laptop you would need to set them this way in vizzy-laptop's .bashrc:

export GAZEBO_MASTER_URI=10.10.1.1:11345

export GAZEBO_IP=10.1.3.3

- Launch gzserver on the remote server

Run your simulation launcher as you normally do. To considerably save resources set the "gui" argument to false (you can get an increase of more than 50% in the real-time factor by doing this!).

- Launch gzclient on your local machine

Run gzclient:

gzclient --verbose

Known issues

https://answers.gazebosim.org//question/25610/mesh-path-from-gzserver-to-gzclient/