Tutorials/CloudSim/1.2/gz client remote

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

Prerequisites === This tutorial is assumes you are familiar with the previous start a simulation tutorial. It also requires to 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 single simulator constellation from your local computer ===

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

. simulator_cx4a0cd28e/ros.bash

Connecting to a VPC trio constellation from your local computer ===

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

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

. simulator_cx4a0cd28e/ros.bash gzclient



With the proper configuration files sourced, local Gazebo commands can also connect 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: Using the traffic shaper tool to modify latency and packet loss