In this module, you learn to create an AWS Cloud9 IDE in AWS RoboMaker, download the example source code, and create a simulation bundle that you can use with AWS RoboMaker. The bundle contains the following.

  • The simulation world
  • TurtleBot models
  • The logic used to run your robot
  • All the dependencies the application needs to run

Time to complete module: 25 minutes

Services used: AWS Cloud9, AWS RoboMaker


  • Step 1. Create a development environment

    In this step, you'll create a development environment in the AWS RoboMaker console.


    a. In the AWS RoboMaker console, select “Development environments” in the left panel and choose “Create environment”.

    (Click to enlarge)

    b. Give the environment a name, for example, RoboMaker-ObjectTracker, select “m4.xlarge” as Instance type and choose “Create”. Any instance type can be used, however for this tutorial we recommend using an m4.xlarge instance. You can use the default VPC and subnets for this tutorial. If it’s deleted, you can follow instructions from VPC with Single Public Subnet, then add a secondary public subnet to the VPC.

    (Click to enlarge)

    c. Choose “Open environment”. It may take a few minutes for your environment to start the first time.
     
    If this is the first time you're using AWS Cloud9, then you may receive a message stating your account must be verified. This can take two hours. If you're still having trouble after verification, try creating a new environment.

    (Click to enlarge)

    d. On the AWS Cloud9 menu bar, select “RoboMaker Resources”, “Download Samples” then “5. Object Following using Reinforcement Learning”.
     

    (Click to enlarge)

  • Step 2. Set up AWS RoboMaker application workflow

    Workflows are a powerful tool that let you build, bundle, or run an AWS RoboMaker simulation job in AWS Cloud9 through the click of a button.


    a. In the ObjectTracker folder, open the “roboMakerSettings.json” file. This file allows you to create and configure workflow to automate build, bundle and create AWS RoboMaker simulation jobs for the application. Go through the file and replace the following place holders with correct values.
     
    • <IAM Role ARN for RoboMaker>, use the role created in Module 1.
    • <bucket name for your trained model>, use bucket created in Module 1. 
    • <bucket name for your simulation bundle>, use the bucket created in Module 1.
    • <bucket name for job outputs>, use the bucket created in Module 1.
    • <the AWS Region of your S3 model bucket>, use the same Region as the bucket.
    • <security group id>, use default security group or new security group with unrestricted outbound traffic. For example, [ "sg-d89572df3" ].*
    *You can find this by going to AWS Cloud 9 > Environments > RoboMaker-ObjectTracker > "View Details"
    • <subnet id>, use default VPC or a VPC with two public subnet ids. For example, [ "subnet-30c1598", "subnet-30c1fd38"].*
    *You can find subnets by going to the VPC Dashboard > Subnets

    (Click to enlarge)

    b. On the AWS Cloud9 menu bar, select “File” and select “Save” to save the changes to “roboMakerSetting.json” file.

    c. To ensure the AWS Cloud9 environment is using the object tracker’s “roboMakerSettings.json” configuration file, go to the AWS Cloud9 menu bar, select “RoboMaker Run”, select “Add or edit configuration”.

    (Click to enlarge)

    d. In the dialog, choose “Switch config”.

    (Click to enlarge)

    e. Select the “roboMakerSettings.json” file that you made changes to and choose “Ok”.

    (Click to enlarge)

    f. Choose "Save".

    (Click to enlarge)

    g. On the AWS Cloud9 Menu bar, select “RoboMaker Run”, “Workflow”, then choose “ObjectTracker - Build and Bundle Simulation”. This process builds the ROS workspace, bundle the workspace and its dependencies into the “output.tar.gz” file.

    (Click to enlarge)

    h. This process takes about 20 minutes. When the build and bundle process is complete, you see the message “Process exited with code: 0”.

    (Click to enlarge)

    i. The bundle is named “output.tar.gz” and it is located in “simulation_ws\bundle” folder. In the next module you learn how to use this bundle to create a simulation job in AWS RoboMaker.

    (Click to enlarge)