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.
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/05_tutorials/config/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=12
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.demo.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.demo.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.