ROS2 Example Applications

This tutorial was created and is based on AWS RoboMaker as of July 2019. Please refer to the official documentation for the latest and most accurate information, as there may have been updates or changes since then.

ROSbot - introduction​

ROSbot 2.0 is autonomous, open source robot platform. It can be used as a learning platform for Robot Operating System as well as a base for a variety of robotic applications such as research robots, inspection robots, custom service robots etc.

Unboxing​

What's in the box:

Rear panel description​

In the picture below you can see names of the elements from the rear panel of the ROSbot.

image

Hardware setup​

1. Mounting the batteries​

Your ROSbot is assembled, but to get it ready to work, you need to provide a power supply and attach the antenna.

To mount the batteries turn ROSbot upside down and follow these steps:

  1. Unscrew battery cover mounted with two screws.
  2. Remove the battery cover.
  3. Place batteries accordingly to the polarization symbols (do it carefully!), keeping the black strip under the batteries.
  4. Place battery cover and mount it with screws.

image

2. Batteries charging guide​

  1. Connect the power adapter to the charger and the output cable between charger and ROSbot (2 connectors on charger side, 1 black connector to ROSbot charging port).

imageimage

After this step is complete your charger should look like this:

image

  1. Use the first two buttons to select “LiPo BATT” mode and press [Start] button.
  2. Use arrows to select “LiPo CHARGE” mode.
  3. Press [Start] - the current value should start blinking. Use arrows to set the current to 1.5A.
  4. Press [Start] again - the voltage value should start blinking. Select “11.1V(3S)” using arrows.
  5. Press and hold [Start] for 2 seconds. The charger should now ask for confirmation. Press [Start] again. The charging process should begin now.
  6. When charging is finished (after about 3 hours), the charger will generate a loud “beep” sound and will finish charging at the same time.

The picture below is a visualization of the mentioned steps.

image

3. Attaching the antenna​

To attach the antenna, screw it to the antenna connector on the ROSbot rear panel.

image

Flashing image with ROS2 support​

ROSbots are shipped with ROS1 support. In order to enable working with ROS2 support, it is necessary to flash image with ROS2.

SD card side view

  1. Extract SD card from ROSbot, by pushing card carefully until it is released back by card holder, then pull it out. You can find SD card slot on ROSbot right side.
  2. Download image for Tinkerboard from here .
  3. Extract downloaded image (For this process we recommend using 7zip)
  4. Flash the extracted image onto SD card (For this process we recommend using Etcher but any image writing tool will be good):
  1. Insert SD card back to ROSbot

Troubleshooting​

It may happen that process of flashing SD card will fail, this may prevent ROSbot from booting properly. Possible symptoms of faulty flashing process are:

Connecting to Wi-Fi network​

ROSbot is basically a computer running Ubuntu, so let's configure it like a standard PC computer.

  1. Plug in a display with HDMI, mouse and keyboard into USB port in the rear panel of ROSbot.
  2. Turn on the robot and wait until it boots.
  3. Use networking menu located on top-right of the screen to connect to a Wi-Fi network.
  4. When connection is active, use networking menu again and choose Connection Information to find device IP address.
  5. Note the ROSbot IP address, you will need it later.

Choosing the location​

You can chose to work with AWS services on servers located in various location across world. You are free to choose the server closest to your location, although in tutorials we refer to us-east-1. Whichever location you will choose, you must keep it while following through the whole manual.

To choose location, go to AWS Management console and find location dropdown menu next to your username in top right corner. From the menu choose US East (N. Virginia) us-east-1.

location

For more information regarding regions please check the documentation.

Configure AWS Environment​

Before we use AWS RoboMaker to build and deploy the tutorial applications, we must first set up the AWS environment. To simplify the configuration, we will use AWS CloudFormation. CloudFormation enables us to use a template file to define the configuration of our environment. We will use CloudFormation to create a bucket in Amazon S3, as well as to create the necessary permissions in AWS Identity and Access Manager (IAM) that AWS RoboMaker requires to simulate and deploy our robot applications.

To deploy the template, sign in to the CloudFormation console. Follow the steps to deploy the template:

  1. Click the Create Stack button and select With new resources from the drop down.

CloudFormation

  1. In Step 1: Specify template in section Prerequisite - Prepare template select Template is ready, then in section Specify template select Amazon S3 URL and type in the following text field: https://robomaker-rosbot-samples.s3.amazonaws.com/rosbot_tutorial_template.yaml . Proceed with Next button.

CloudFormation

  1. In Step 2: Specify stack details in section Stack name type rosbot-stack , then proceed with Next button.

CloudFormation

  1. In Step 3: Configure stack options leave all settings default and proceed with Next button.
  2. In Step 4: Review scroll to last section named Capabilities then check I acknowledge that AWS CloudFormation might create IAM resources with custom names.. Proceed with Create stack button. CloudFormation
  3. You will be redirected to stacks list, wait until your stack is created.
  4. When stack creation is finished, click stack name to open its details, then choose tab Outputs, in the table you will see three rows, note the three Key/Value pairs as you will need them later in this guide. CloudFormation

ROSbot setup in RoboMaker​

ROSbot need some system modifications before Greengrass will be able to run and deploy applications. To configure ROSbot:

  1. Sign in to the AWS RoboMaker console.
  2. In the left navigation pane, choose Fleet Management and then choose Robots.
  3. Choose Create robot. RoboMaker
  4. In section General:
  1. In section AWS Greengrass group details:
  1. Proceed with Create, you will be redirected to Download your Core device page.

RoboMaker

  1. Choose Download button next to Download and store your Core's security resources, you will get ROSbot-setup.zip file.

On Linux​

Navigate to directory where the file is downloaded, by default it should be ~/Downloads .

cd ~/Downloads