Visible to Intel only — GUID: GUID-AA783796-7740-4482-BC42-A91C49337AAD
Visible to Intel only — GUID: GUID-AA783796-7740-4482-BC42-A91C49337AAD
Run an Intel® RealSense™ ROS 2 Sample Application in Docker* Container
This tutorial tells you how to:
Launch ROS nodes for a camera.
List ROS topics.
See that Intel® RealSense™ topics are publishing data.
Get data from the Intel® RealSense™ camera (data coming at FPS).
See an image from the Intel® RealSense™ camera displayed in rviz2.
Run the Sample Application
Connect an Intel® RealSense™ camera (for example, D435i) to the host.
Go to the AMR_containers folder:
cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_*/AMR_containers
Prepare 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 the command below to start the Docker container:
CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/01_amr/amr-sdk.all.yml run realsense bash
Check for latest Intel® RealSense™ firmware updates.
Open the Intel® RealSense™ viewer application:
realsense-viewer
In the Intel® RealSense™ viewer, if any firmware update is available, a window popup appears in the upper right corner.
During the firmware update installation, do not disconnect the Intel® RealSense™ camera. Press Install in the window popup.
After the installation is complete or if no update is available, close the Intel® RealSense™ viewer.
Run an automated yml file that opesn the Intel® RealSense™ ros2 node and lists camera-relevant information.
CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/realsense.demo.yml up
Expected output: The image from the Intel® RealSense™ camera is displayed in rviz2, on the bottom left side.
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 docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/realsense.demo.yml down
Troubleshooting
In some cases, the stream may not appear due to permission issues on the host. You may see this error message:
ERROR: Pipeline doesn't want to pause.
To fix this, install the librealsense udev rules.
git clone https://github.com/IntelRealSense/librealsense Copy the 99-realsense-libusb.rules files to the rules.d folder sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules sudo udevadm trigger
Then open the gst-launch command.
If the problem persists, you can try any or all of the following:
Verify that $DISPLAY has the correct value.
Perform an Intel® RealSense™ hardware reset:
# Open realsense docker container docker-compose -f 01_docker_sdk_env/docker_compose/01_amr/amr-sdk.all.yml run realsense bash # While in realsense container, open the realsense-viewer application realsense-viewer # In realsense-viewer menu, go to "More" and then select "Hardware Reset" # Wait for reset to complete and then close the realsense-viewer application.
Reboot the target.
For Intel® RealSense™ documentation, see https://dev.intelrealsense.com/docs/docs-get-started.
For calibration issues, see https://dev.intelrealsense.com/docs/self-calibration-for-depth-cameras.
For general robot issues, go to: Troubleshooting for Robot Tutorials.