Isaac ROS RealSense Setup#
Camera Compatibility#
RealSense Model |
Supported? |
|---|---|
D455 |
✓ |
D435i |
✓ |
D415 |
✗ |
Note
It is required to use RealSense firmware version 5.16.0.1, librealsense SDK version v2.56.3 and realsense-ros driver version r/4.56.3. Any deviation from these versions may break or degrade the performance of Isaac ROS examples.
It is required to use USB3 ports and cables to run the cameras at higher resolutions and frame rates that some applications expect.
For best results we suggest increasing the maximum Linux kernel receive buffer size as detailed in DDS tuning.
The
realsense-viewertool has performance issues when running multiple cameras on the Jetson platforms. However the RealSense ROS drivers work fine with multiple cameras.
Setup Instructions#
This tutorial assumes that you have completed the instructions in Developer Environment Setup.
Start with the RealSense camera unplugged. Then, add RealSense udev rules to your host machine.
wget https://raw.githubusercontent.com/realsenseai/librealsense/v2.56.3/config/99-realsense-libusb.rules && \ sudo mv 99-realsense-libusb.rules /etc/udev/rules.d/ && \ sudo udevadm control --reload-rules && sudo udevadm trigger && echo "Successfully added udev rules"
Verify that you have
Successfully added udev rulesin the output, which indicates all commands were successful.Configure the Isaac ROS environment to include
librealsense SDKandrealsense-ros:Create a file called
~/.config/isaac-ros-cli/config.yamlwith the following content:mkdir -p ~/.config/isaac-ros-cli touch ~/.config/isaac-ros-cli/config.yaml
docker: image: additional_image_keys: - realsense
Define the following configuration variables to specify the versions used for the installation:
LIBREALSENSE_VERSION=v2.56.3 REALSENSE_ROS_VERSION=r/4.56.3
Download the RealSense setup scripts from the Isaac ROS CLI repository:
mkdir -p /tmp/realsense-setup && cd /tmp/realsense-setup curl -O https://raw.githubusercontent.com/NVIDIA-ISAAC-ROS/isaac-ros-cli/release-4.1/docker/scripts/install-realsense-dependencies.sh curl -O https://raw.githubusercontent.com/NVIDIA-ISAAC-ROS/isaac-ros-cli/release-4.1/docker/scripts/build-librealsense.sh
Install the CUDA toolkit:
sudo apt-get update sudo apt-get install -y cuda-toolkit-13-0
Install RealSense dependencies:
cd /tmp/realsense-setup chmod +x install-realsense-dependencies.sh sudo ./install-realsense-dependencies.sh
Build and install
librealsensefrom source:cd /tmp/realsense-setup chmod +x build-librealsense.sh ./build-librealsense.sh -v ${LIBREALSENSE_VERSION} --force_rsusb
Clone the
realsense-rosrepository:cd /tmp git clone --depth 1 https://github.com/realsenseai/realsense-ros.git -b ${REALSENSE_ROS_VERSION}
Install
realsense-rosbuild dependencies:sudo apt-get update sudo apt-get install -y devscripts dh-make python3-bloom rosdep update rosdep install -y --from-paths /tmp/realsense-ros --skip-keys librealsense2 --ignore-src
Build and install
realsense2_camera_msgs:cd /tmp/realsense-ros/realsense2_camera_msgs bloom-generate rosdebian fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb && rm ./*.deb
Build and install
realsense2_description:cd /tmp/realsense-ros/realsense2_description bloom-generate rosdebian fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb && rm ./*.deb
Build and install
realsense2_camera:cd /tmp/realsense-ros/realsense2_camera bloom-generate rosdebian sed -i "s/dh_shlibdeps -/dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -/g" debian/rules sed -i "s/ros-jazzy-librealsense2, //g" debian/control fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb
Clean up the build environment:
rm -rf /tmp/realsense-ros rm -rf /tmp/realsense-setup
Define the following configuration variables to specify the versions used for the installation:
LIBREALSENSE_VERSION=v2.56.3 REALSENSE_ROS_VERSION=r/4.56.3
Download the RealSense setup scripts from the Isaac ROS CLI repository:
mkdir -p /tmp/realsense-setup && cd /tmp/realsense-setup curl -O https://raw.githubusercontent.com/NVIDIA-ISAAC-ROS/isaac-ros-cli/release-4.1/docker/scripts/install-realsense-dependencies.sh curl -O https://raw.githubusercontent.com/NVIDIA-ISAAC-ROS/isaac-ros-cli/release-4.1/docker/scripts/build-librealsense.sh
Install the CUDA toolkit:
sudo apt-get update sudo apt-get install -y cuda-toolkit-13-0
Install RealSense dependencies:
cd /tmp/realsense-setup chmod +x install-realsense-dependencies.sh sudo ./install-realsense-dependencies.sh
Build and install
librealsensefrom source:cd /tmp/realsense-setup chmod +x build-librealsense.sh ./build-librealsense.sh -v ${LIBREALSENSE_VERSION} --force_rsusb
Clone the
realsense-rosrepository:cd /tmp git clone --depth 1 https://github.com/realsenseai/realsense-ros.git -b ${REALSENSE_ROS_VERSION}
Install
realsense-rosbuild dependencies:sudo apt-get update sudo apt-get install -y devscripts dh-make python3-bloom rosdep update rosdep install -y --from-paths /tmp/realsense-ros --skip-keys librealsense2 --ignore-src
Build and install
realsense2_camera_msgs:cd /tmp/realsense-ros/realsense2_camera_msgs bloom-generate rosdebian fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb && rm ./*.deb
Build and install
realsense2_description:cd /tmp/realsense-ros/realsense2_description bloom-generate rosdebian fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb && rm ./*.deb
Build and install
realsense2_camera:cd /tmp/realsense-ros/realsense2_camera bloom-generate rosdebian sed -i "s/dh_shlibdeps -/dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -/g" debian/rules sed -i "s/ros-jazzy-librealsense2, //g" debian/control fakeroot debian/rules binary cd .. && sudo apt-get install -y ./*.deb
Clean up the build environment:
rm -rf /tmp/realsense-ros rm -rf /tmp/realsense-setup
Plug in your RealSense camera to USB3 ports before activating the Isaac ROS environment in the next step.
Activate the Isaac ROS environment:
isaac-ros activate --build-local
This
--build-localflag rebuilds the container image usingDockerfile.realsensein one of its layered stages. Rebuilding can take several minutes.After the image has been built once, you can use
isaac-ros activateto launch the container without rebuilding the image.isaac-ros activateisaac-ros activateVerify that the RealSense camera is connected by running:
rs-enumerate-devices
Verify that this returns information about all connected RealSense cameras.
Note
The
realsense-viewertool requires a graphical environment, to use it you must connect the host to a monitor, use a remote desktop connection or similar.realsense-viewer
If you turn on the “Stereo Module” in the GUI, verify that you have something like the following:
If you come across issues, see if it’s covered in Hardware Setup or librealsense SDK issues.