JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

RealSense ROS Wrapper – Jetson Nano

Many people use Intel RealSense cameras with robots. Here we install the realsense-ros wrapper on the NVIDIA Jetson Nano developer kit. Looky here:

Background

There are several members in the Intel RealSense camera family. This includes the Depth Cameras (D415, D435, D435i) and Tracking Camera (T265). There are also more recent introductions which are just becoming available.

The cameras all share the same Intel® RealSense™ SDK which is known as librealsense2. The SDK is open source and available on Github. We have articles for installing librealsense (D400x article and T265 article) here on the JetsonHacks site.

The size and weight of the cameras make them very good candidates for robotic applications. Computing hardware onboard the cameras provide depth and tracking information directly, which makes it a very attractive addition to a Jetson Nano. Plus the cameras have low power consumption. Because ROS is the most popular middleware application for robotics, here’s how you install realsense-ros on the Jetson Nano.

Install RealSense Wrapper for ROS

There are two prerequisites for installing realsense-ros on the Jetson Nano. The first is to install librealsense as linked above. The second prerequisite is a ROS installation. Checkout Install ROS on Jetson Nano for a how-to on installing ROS Melodic on the Nano.

With the two prerequisites out of the way, it’s time to install realsense-ros. There are convenience scripts to install the RealSense ROS Wrapper on the Github JetsonHacksNano account.

$ git clone https://github.com/JetsonHacksNano/installRealSenseROS
$ cd installRealSenseROS
$ ./installRealSenseROS <catkin workplace name>

Where catkin workplace name is the path to the catkin_workspace to place the RealSense ROS package. If no catkin workplace name is specified, the script defaults to ~/catkin_ws.

Note: Version are in the releases section. The master branch of the repository will usually match the most recent release release of L4T, but you may have to look through the releases for a suitable version. To checkout one of the releases, switch to the installRealSenseROS directory and then:

$ git checkout <version number>

e.g.

$ git checkout vL4T32.2.1

The ROS launch file for the camera(s) will be in the src directory of the Catkin workspace realsense-ros/realsense2_camera/launch There are a variety of launch files to choose from. For example:

$ roslaunch realsense2_camera rs_camera.launch

You will need to make sure that your Catkin workspace is correctly sourced, and roscore is running.

Notes

There are dependencies between the versions of librealsense and realsense-ros. The install scripts are also dependent on the version of L4T. Check the releases on the Github accounts to match.

In the video:

  • Jetson Nano
  • L4T 32.2.1 / JetPack 4.2.2
  • librealsense 2.25.0
  • realsense-ros 2.28.0

realsense-ros does not “officially” support ROS Melodic. However, we haven’t encountered any issues as of the time of this writing.

Facebook
Twitter
LinkedIn
Reddit
Email
Print

5 Responses

  1. Hello kangalow,

    Thank you for many great articles.

    I’m having trouble getting this wrapper to properly install. I’ve already installed librealsense and Melodic ROS as you’ve listed, but when I run installRealSenseRos I am told the RealSense SDK 2 is not installed. It says it completes but there is then a problem when I try and launch the camera.

    Could you recommend a fix?

    1. What are the contents of your Catkin workspace src folder? What version of L4T are you running? I don’t know what “there is then a problem when I try and launch the camera” means.
      Does the realsense-viewer application work? What version of librealsense is installed?

  2. JH,

    Let me open with thank you! I finally got the TX2 to build thanks to your repo and relevant sh files. I am running into a similar sticking point as the last fellow.

    roslaunch realsense2_camera rs_camera.launch

    Renders a statement:

    “Couldn’t find executable named rs_camera.launch. I have sourced devel/setup.bash. I wonder where my sticking point.

  3. Thank you for this guide, I followed your steps with my Jetson Nano but when the roslaunch starts it says:
    [ INFO] [1591176468.473615546]: Initializing nodelet with 4 worker threads.
    [ INFO] [1591176468.911502682]: RealSense ROS v2.2.11
    [ INFO] [1591176468.911604887]: Running with LibRealSense v2.31.0
    [ WARN] [1591176468.949530314]: No RealSense devices were found!
    The realsense is correctly plugged in, it works perfectly with realsense-viewer and with the python sdk as well.
    Any tips on how to fix this?
    Do you have any suggestion on how to fix this problem?

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer

Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities

Recent Posts