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.
Check if your installation has the turtlesim Docker* image.
docker images |grep amr-turtlesim #if you have it installed, the result is: amr-turtlesim
NOTE: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).If the image is not installed, Intel recommends installing the Robot Complete Kit (see Get Started Guide for Robots Step 3).
Go to the AMR_containers folder:
cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_*/AMR_containers
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
NOTE:The “Access control disabled, clients cannot connect from any host.” message is expected and does not impact functionality.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
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.
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
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.