Tutorials/CloudSim/1.3/gz client remote trio

Introduction === This tutorial covers:
 * Connect to the simulation using Gazebo and rviz from your local machine

Prerequisites === This tutorial assumes you are familiar with the previous start a simulation tutorial. It also requires that you establish a VPN with your local computer and the cloud constellation. Check out the tutorial to setup the VPN before continuing.

On the local machine, you should have the drcsim and ros-fuerte-visualization packages (see installation guide). This will install the Atlas robot meshes on your local machine, as well as the rviz tool.

sudo apt-get install drcsim ros-fuerte-visualization

Connecting to a VPC trio constellation from your local computer (Operator Control Unit) ===

Make sure you have the router keys downloaded and the VPN running. Configure ROS and Gazebo to connect to the cloud constellation, by sourcing your local drcsim configuration file (if it is not invoked by your ~/.bashrc) and the cloud ros.bash configuration file. It will configure your local ROS environment to communicate with the remote ROS master over the VPN link. . /usr/share/drcsim/setup.sh
 * 1) Warning: Only if it is not invoked by your ~/.bashrc

. router_cx4a0cd28e/ros.bash
 * 1) Do not forget to use your own constellation ID which you can find in your console

Running rviz and gzclient over the Virtual Private Network ===

Once the VPN and the environment variables are set up, we can launch rviz by typing on your local machine:

rosrun rviz rviz



Now you can do the same things that you can do when running the simulation locally, such as visualizing and logging sensor data.

Open a new terminal, source your local drcsim `setup.sh` file (if it is not invoked by your ~/.bashrc), the ros.bash file, and run gzclient to visualize your current simulation:

. /usr/share/drcsim/setup.sh
 * 1) Attention: Only if it is not invoked by your ~/.bashrc

. router_cx4a0cd28e/ros.bash gzclient
 * 1) Do not forget to use your own constellation ID which you can find in your console

With gzclient running on the local computer, you can easily add boxes and other objects to your world:



With the proper configuration files sourced, local Gazebo commands can also be sent to a cloud simulation:

gztopic echo /gazebo/default/world_stats

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

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:

gztopic view

Select the sensor stream to observe:



The sensor data will appear in a separate window:




 * 1) Next ##

Next: Start/stop the bandwidth accounting and logging