Tutorials/CloudSim/1.2/start simulation

Introduction === This tutorial covers:
 * Launching and terminating virtual simulation machines in the cloud
 * 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 normal users when no simulations are running. The top widget section allows you to launch a variety of constellation configurations:
 * Robot machine
 * Latest drc simulator machine
 * A constellation that contains a trio of machines with appropriate VPN (Virtual Private Network) setup.

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.