Visible to Intel only — GUID: GUID-940C568F-A658-4B91-8338-49FC9FA5A70F
Visible to Intel only — GUID: GUID-940C568F-A658-4B91-8338-49FC9FA5A70F
Run ROS 2 OpenVINO™ Toolkit Sample Applications in Docker* Container
This tutorial tells you how to run the segmentation demo application on both a static image and on a video stream received from a Intel® RealSense™ camera.
Run the Sample Application
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=16
Launch the automated execution of the ROS 2 OpenVINO™ toolkit sample applications:
CHOOSE_USER=root docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/ros2_openvino.tutorial.yml up
Expected output:
Execution of the object segmentation sample code input from the image: This takes one minute, and you can see the semantic segmentation being applied to the image.
Original image
Image with semantic object segmentation
Execution of the object segmentation sample code input from the Intel® RealSense™ camera topic: This requires a Intel® RealSense™ camera connected to the testing target. It takes one minute, and you can see the semantic segmentation being applied to the video stream received from a Intel® RealSense™ camera.
To close this, do one of the following:
Type Ctrl-c in the terminal where you did the up command.
Run this command in another terminal:
CHOOSE_USER=eiforamr 01_docker_sdk_env/docker_compose/05_tutorials/ros2_openvino.tutorial.yml down
How it Works
All of the commands required to run this tutorial are documented in:
01_docker_sdk_env/docker_compose/05_tutorials/ros2_openvino.tutorial.yml
To use your own image to run semantic segmentation:
Copy your image into the AMR_containers folder at:
cp <path_to_image>/my_image.jpg 01_docker_sdk_env/docker_compose/05_tutorial/param/
Edit 01_docker_sdk_env/docker_compose/05_tutorials/ros2_openvino.tutorial.yml, at line 34, adding the following command:
cp ${CONTAINER_BASE_PATH}/01_docker_sdk_env/docker_compose/05_tutorials/param/my_image.jpg ../ros2_ws/src/ros2_openvino_toolkit/data/images/
Edit 01_docker_sdk_env/docker_compose/05_tutorials/param/pipeline_segmentation_image.yaml to change the input_path:, line 4:
input_path: /home/eiforamr/ros2_ws/src/ros2_openvino_toolkit/data/images/my_image.jpg
Run the automated yml:
CHOOSE_USER=root docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/ros2_openvino.tutorial.yml up
Expected result: Execution of semantic segmentation on the image you selected
Troubleshooting
For general robot issues, go to: Troubleshooting for Robot Tutorials.