Visible to Intel only — GUID: GUID-1E3A67D1-4A7D-4629-8C86-7E63DD6E48C5
Visible to Intel only — GUID: GUID-1E3A67D1-4A7D-4629-8C86-7E63DD6E48C5
Intel® RealSense™ ROS 2 Sample Application
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.
Check if your installation has the amr-realsense Docker* image.
docker images |grep amr-realsense #if you have it installed, the result is: amr-realsense
NOTE:If one or both of the images are 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 with the Get Started Guide for Robots.
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
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.
Exit the Docker* image:
exit
Run an automated yml file that opens the Intel® RealSense™ ROS 2 node and lists camera-relevant information.
CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/realsense.tutorial.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.tutorial.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 cd librealsense 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.
Did you find the information on this page useful?
Feedback Message
Characters remaining: