Run an ROS2 Sample Application in Docker* Container
Run the Sample Application
- Go to theAMR_containersfolder and give permissions to run the interactive Docker script:
Where thecd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers<version>string is similar to:2021.2as shown below:cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_2021.2/AMR_containers chmod 755 run_interactive_docker.sh
- Run a ROS2 sample application inside theEI for AMRDocker container.Run the command below to start the Docker container:./run_interactive_docker.sh amr-ubuntu2004-full-flavour-sdk:<TAG>Where the<TAG>string is similar to:2021.2as shown below:./run_interactive_docker.sh amr-ubuntu2004-full-flavour-sdk:2021.2When Docker opens successfully, you should see the below messages.
- Run the turtlesim ROS2 sample application:ros2 run turtlesim turtlesim_node & ros2 topic listAs 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
- Run the rqt application and control the turtle via rqt.rqt & ros2 run turtlesim turtlesim_node &
- Go toPlugins > 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. PressCall. Turtle should have moved. Close the service caller window by pressing the "x" button. Then pressCTRL+C.