AWS RoboMaker
Developer Guide

Step 5: Deploy Robot Application

In this section, you compile the Hello World robot application for the ARMHF platform, which is used by TurtleBot3. You also create a robot in AWS RoboMaker and then configure your TurtleBot3 robot with AWS IoT Greengrass software. Then you register the robot into a new fleet and deploy the application.

Prepare your TurtleBot3 robot

Before you can deploy a robot application to a physical robot, create the robot in AWS RoboMaker, configure your physical robot with AWS IoT Greengrass, and then create a fleet and register your robot into the fleet.

To prepare your TurtleBot3 robot

  1. First, create a robot in AWS RoboMaker and configure your TurtleBot3 robot. Follow the steps in Creating a Robot.

  2. Next, create a fleet. Follow the steps in Creating a Fleet.

  3. Register your robot as part of the new fleet. Follow the steps to Register your robot to your fleet in Registering and Deregistering Robots.

Bundle and deploy Hello World robot application

In this section, bundle the Hello World application for the ARMHF architecture using a Docker image. Then you copy the robot application bundle to an Amazon S3 bucket and deploy.

Warning

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

To bundle and deploy the Hello World robot application

  1. Sign in to the AWS RoboMaker console at https://console.aws.amazon.com/robomaker/.

  2. On the left, expand Development, choose Development environments, select HelloWorld, and then select Open IDE. It might take a few minutes to prepare the development environment.

  3. In the HelloWorld AWS Cloud9 development environment, choose the bash tab at the bottom of the page and then run the following commands to bundle the HelloWorld robot application for ARMHF:

    $ cd /opt/robomaker/cross-compilation-dockerfile/ $ sudo bin/build_image.bash $ cd ~/environment/HelloWorld/robot_ws $ sudo docker run -v $(pwd):/ws -it ros-cross-compile:armhf $ cd ws $ apt update $ rosdep install --from-paths src --ignore-src -r -y $ colcon build --build-base armhf_build --install-base armhf_install $ colcon bundle --build-base armhf_build --install-base armhf_install --bundle-base armhf_bundle --apt-sources-list /opt/cross/apt-sources.yaml $ exit
  4. Before you can deploy the robot application, copy it to an Amazon S3 bucket AWS RoboMaker can access. A bucket was created on your behalf for the HelloWorld robot application. Find the name of the bucket using the following command:

    $ aws s3 ls | grep "robomakerhelloworld"

    Now, copy the robot application to the bucket you found above.

    $ aws s3 cp armhf_bundle/output.tar.gz s3://robomakersampleapplicationhelloworld-bundlesbucket-##########/hello-world-robot.armhf.tar.gz

    The ARMHF version of the robot application is hello-world-robot.armhf.tar.gz.

  5. Update the Hello World robot application created on your behalf with the ARMHF version of the robot application. In the AWS RoboMaker console, select Development, then select Robot applications, and then choose the robot application with a name beginning with roboMakerSampleApplicationHelloWorld_.

  6. In the Robot application details page, in Versions, select $LATEST, and then choose Update.

  7. In the Update robot application page, in Sources, copy the X86_64 source file into the ARMHF source file field, then modify the robot application file name from hello-world-robot.tar.gz to hello-world-robot.armhf.tar.gz, then select Create.

  8. In the Robot application details page, in Versions, select Create new version, and then choose Create.

  9. You are now ready to deploy the robot application to your TurtleBot3 robot. In the AWS RoboMaker console, select Fleet management, then select Deployments, and then select Create deployment.

  10. In the Create deployment page, select the Fleet you created with your robot registered, then select the Robot application and Robot application version you created.

  11. In Deployment launch config, type in hello_world_robot for Package name. Then type in rotate.launch for Launch file.

  12. In Deployment config, accept the default values for Concurrent deployment percentags and Failure threshold percentage.

  13. Select Create. You can track the deployment status on the deployment details page.

Next Step

Step 6: Clean up