Tutorials/CloudSim/1.3/gz client remote

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 launch/terminate a constellation 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.

Follow these instructions to install the minimum packages required to launch gzclient and rviz on your local machine:

1. Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.

1. Setup your computer to accept software from packages.osrfoundation.org.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu precise main" > /etc/apt/sources.list.d/gazebo-latest.list'

1. Retrieve and install the keys for the ROS and DRC repositories.

wget http://packages.ros.org/ros.key -O - | sudo apt-key add - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -

1. 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 update sudo apt-get install drcsim ros-fuerte-visualization

Connecting to a remote simulator from your local computer or OCU (Operator Control Unit) ===

Make sure you have the simulator 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

. simulator_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

. simulator_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