AWS RoboMaker
Developer Guide

Step 4: Run Simulation

In this section, you bundle the robot application and simulation application into source files. A source file includes all of the dependencies needed to run the application. You use a robot application source file and a simulation application source file to create a simulation job. You use a robot application source file to create a deployment.

Bundle the Hello World Applications

In the previous step, you built the robot application and simulation application. In this step, you bundle each application with the resources and dependencies needed to run. For example, the simulation application needs a model and physical parameters of the TurtleBot3.

Warning

Bundling the robot application and simulation application might each take 20 minutes or more depending on your instance type.

To bundle the Hello World applications

  1. In the HelloWorld AWS Cloud9 development environment, choose AWS RoboMaker Run on the menu, then choose Bundle, and then select HelloWorld Robot.

  2. On the menu, choose AWS RoboMaker Run, then choose Bundle, and then select HelloWorld Simulation.

Restart the Hello World Simulation Application

A running simulation can be restarted with updated robot application and simulation application source. This is useful when you are debugging code and making frequent changes.

When you restart a simulation, its timer is reset to zero. It will run for the original duration until reset or cancelled. For Hello World, the duration is 1 hour.

  1. On the menu, choose AWS RoboMaker Simulation, then select Connect. Select the simulation job from the list and then select Okay. Restart this running Hello World simulation with your new robot application.

  2. Choose AWS RoboMaker Simulation, and select Restart with new bundle(s). In the Restart simulation with selected bundles dialog, type in /HelloWorld/robot_ws/bundle/output.tar.gz for Robot app bundle path and /HelloWorld/simulation_ws/bundle/output.tar.gz for Simulation app bundle path, then select OK.

    AWS RoboMaker restarts the simulation with the new applications. This extends the lifetime of the simulation for another 1 hour.

  3. On the menu, choose AWS RoboMaker Run, then choose Start simulation, and then select HelloWorld.

Explore the Simulation

When the simulation is running, you can launch Gazebo and verify that the robot is rotating counter-clockwise. You can also view the logs in the AWS Cloud9 development environment terminal.

  1. The status of the simulation job is shown next to the AWS RoboMaker Simulation menu entry. When it transitions to Running, you can launch applications and explore the simulation.

  2. In the AWS RoboMaker console, choose Simulation jobs on the left and then select the Hello World simulation job.

  3. In the Simulation details screen, in the Simulation tools section, select Gazebo.

  4. In Gazebo, zoom in on the robot. It is rotating in place.

  5. Log data is streamed to CloudWatch Logs and to tabs on the AWS Cloud9 development environment.

    To view CloudWatch Logs, select Logs in the Simulation details screen.

  6. Output files generated by the simulation job are available in the simulation job output destination. Select the link to access the Amazon S3 bucket.

Next Step

Step 5: Deploy Robot Application