Tutorials/CloudSim/1.1/gz client remote

Introduction === This tutorial covers:
 * launching a simulation on the cloud
 * connect to the simulation using Gazebo from your local machine

Prerequisites === This tutorial is assumes you are familiar with the previous start a simulation tutorial.

On the local machine, you should have the drcsim package (see installation guide)

sudo apt-get install drcsim

launching a simulation on the cloud === Launch a drc_sim_latest constellation and start a simulation.



On your local machine, download the simulator key files, start the VPN (Virtual Private Network) to connect with the simulation machine and ruin a Gazebo command locally.

mkdir gz_tutorial cd gz_tutorial unzip ~/Downloads/simulator_cxb0403789 cd simulator_cxb0403789 sudo openvpn openvpn.config

In a different terminal, type in: . /usr/share/drcsim/setup.sh GAZEBO_MASTER_URI=http://10.9.0.1:11345 gztopic echo /gazebo/default/world_stats

This command executes the gztopic command, using the simulator machine as the target (10.9.0.1) instead of the local machine.

You should see something like this:

real_time { sec: 5852 nsec: 365862665 } paused: false

sim_time { sec: 3199 nsec: 599000000 } pause_time { sec: 0 nsec: 0 } real_time { sec: 5852 nsec: 565947836 } paused: false

Caveat === At the time of this writing, the gzclient program does not connect from your local machine to the cloud simulator. This will be fixed in the upcoming version of Gazebo. Launching a new simulation constellation then will install the latest packages and fix this issue.

Workaround === We are pleased to announce that a fix was published in our pre-release version of the drcsim packages. To try it out, you'll have to:
 * stop any running simulation (this can be done by pressing the "Stop" button on the simulation widget)
 * login the Simulator machine via ssh
 * remove the drcsim packages and install

This set of commands have to be issued on both your local machine and the cloud simulation machine:

sudo apt-get remove gazebo sudo apt-get install drcsim-prerelease

Once the new packages have been installed, you can launch a new simulation (as you would normally).

From your local machine terminal, start a Gazebo client targeting the cloud simulation machine

GAZEBO_MASTER_URI=http://10.9.0.1:11345 GAZEBO_IP=10.9.0.2 gzclient



You can now interact with the simulation as if you were working on a local machine, and easily add objects in front of the robot.

You can also start sensor viewers from your local machine, to look through the eyes of Atlas for example: GAZEBO_MASTER_URI=http://10.9.0.1:11345 GAZEBO_IP=10.9.0.2 gztopic view

Select the sensor stream to observe:



The sensor data will appear in a separate window: