Get Started Guide

  • 2022.3
  • 09/26/2022
  • Public Content

Step 6. Run a ROS 2 Sample Application in the Docker* Container

This step tests your install.
After this step, to deepen your knowledge about complex scenarios, advanced features, and debugging, see the Developer Guide.
  1. Check if your installation has the turtlesim Docker* image.
    docker images |grep amr-turtlesim #if you have it installed, the result is: amr-turtlesim
    If the image is not installed, continuing with these steps
    triggers a build that takes longer than an hour
    (sometimes, a lot longer depending on the system resources and internet connection).
  2. If the image is not installed, Intel recommends installing the Robot Complete Kit (see Get Started Guide for Robots Step 3).
  3. Go to the
    AMR_containers
    folder:
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_*/AMR_containers
  4. Prepare the environment setup:
    source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=12
    The “Access control disabled, clients cannot connect from any host.” message is expected and does not impact functionality.
  5. Run an automated yml file that opens a ROS 2 sample application inside the EI for AMR Docker* container.
    CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/turtlesim.tutorial.yml up
  6. 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
    Call
    . The turtle should move. Close the service caller window by pressing
    x
    . Then type
    Ctrl-c
    .
  7. To close this, do one of the following:
    • Type
      Ctrl-c
      in the terminal where you did the up command.
    • Close the rqt window.
    • Run this command in another terminal:
    CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/turtlesim.tutorial.yml down
  8. For an explanation of what happened, open the yml file:
    • The first 23 lines are from the EI for AMR infrastructure.
    • Line 26 starts the
      turtlesim
      ROS 2 node.
    • Line 31 starts the rqt so that the turtle can be controlled.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.