Tutorials/CloudSim/1.3/start simulation

Introduction === This tutorial covers:
 * Launching and terminating single virtual simulation machines in the cloud (for launching a trio constellation, see the VRC trio constellation tutorial).
 * Starting and stopping ROS and the DRC simulator on the virtual machine

Prerequisites === This tutorial assumes that you have a Google email account that has been granted access to a running CloudSim instance. See CloudSim setup and installation tutorial.

Launch a simulator machine in the cloud ===

Open your console CloudSim console, as explained in the administration tutorial.



This is what the CloudSim console looks like for admin users when no simulations are running. The top widget section allows you to launch a variety of constellation configurations:
 * Robot machine
 * Latest VRC simulator machine
 * A constellation that contains a trio of machines with appropriate VPN (Virtual Private Network) setup

The simulator and trio constellations are available with the current packages or the latest pre-release software packages.

The lower section, constellations, shows the running instances.

CloudSim is capable of launching multiple machines that work together during a single simulation campaign. CloudSim uses the term constellation for this concept. In CloudSim, Machines can only be launched within the context of a constellation, so it is possible to encounter constellations that only contain a single machine.

In the "Launch a machine constellation" section, select "simulator" from the drop down menu and press the "Launch" button. After a few seconds, you should see a new section appear inside the "Constellation" section. Here's what happens then:


 * A constellation with a unique name is created. It contains one simulator machine.
 * A new virtual machine with GPU is started with Ubuntu 12.04 precise
 * X and OpenGL are configured for the GPUs (with the current NVidia drivers)
 * Packages for VPN, ROS, Gazebo and DRC simulator are installed
 * The machine reboots

The whole process can take up to 20 minutes. Once done, the machine state should indicate "running" with a blue dot. X and GL should also indicate "running" with a blue dot. The graph shows latency measured between the CloudSim virtual machine and the simulator machine instance. It is updated periodically.



Start and stop a Gazebo simulation using ROS === The widget shown below allows you to start and stop a ROS package from CloudSim. It is used to start the DRC simulator and Gazebo. Type in the package, launch file and arguments and press the `Start` button.



After a few seconds, the red dot should turn blue, indicating that Gazebo is running.



Next ===

Now you could terminate the constellation by reading the next section or continue by following these tutorials:
 * Connecting to a cloud simulation with a Virtual Private Network
 * Using the traffic shaper tool to modify latency and packet loss

Terminate the constellation and its machines ===

Press the "Terminate" button on the top left corner of the Constellation section. Within a few seconds, you should see the Machine state dot turn to orange and the "running" will change to "shutting down".

Once the state of every machine indicates "terminated", the constellation will not appear if the browser window is refreshed.