• 2021.2
  • 06/30/2021
  • Public Content

Run an ROS2 Sample Application in Docker* Container

Run the Sample Application

  1. Go to the
    folder and give permissions to run the interactive Docker script:
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers
    Where the
    string is similar to:
    as shown below:
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_2021.2/AMR_containers chmod 755
  2. Run a ROS2 sample application inside the
    EI for AMR
    Docker container.
    Run the command below to start the Docker container:
    ./ amr-ubuntu2004-full-flavour-sdk:<TAG>
    Where the
    string is similar to:
    as shown below:
    ./ amr-ubuntu2004-full-flavour-sdk:2021.2
    When Docker opens successfully, you should see the below messages.
  3. Run the turtlesim ROS2 sample application:
    ros2 run turtlesim turtlesim_node & ros2 topic list
    As a result, the turtlesim app is opened. The console output contains the available topics for the turtle:
    /turtle1/cmd_vel /turtle1/color_sensor /turtle1/pose
  4. Run the rqt application and control the turtle via rqt.
    rqt & ros2 run turtlesim turtlesim_node &
  5. Go to
    Plugins > Services > Service Caller
    : Choose to move turtle1 by choosing (from the Service drop-down list ): /turtle1/teleport_absolute and make sure you changed x and y coordinates for the original values. Press
    . Turtle should have moved. Close the service caller window by pressing the "
    " button. Then press

Summary and Next Steps

In this tutorial, you learned how to run a ROS2 sample application inside the AMR Docker container, start the rqt application, and control the turtle using rqt.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at