JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

Install RealSense Camera in 5 minutes – Jetson Nano

You can now install an Intel RealSense camera on a NVIDIA Jetson Nano Developer Kit in under 5 minutes! Looky here:

Background

Over the last several years we have been installing Intel RealSense on Jetson Development Kits through a painful process of patching the Linux kernel, compiling kernel modules and building the RealSense driver SDK, librealsense, from source.

All of that has changed! Intel now has an APT repository with a version that is ready to install directly on the Jetson use the apt utility. It takes less than 5 minutes !!! Much better than the hours required previously.

Intel now recommends using the USB Video Class (UVC) as the backend for the RealSense SDK. This has the added advantage of letting the RealSense camera act as a web cam device when appropriate.

Installation

In order to install the RealSense SDK, we must first add the Intel repository to our sources list. After updating, then we can use the apt command to install the SDK. Here are step by step instructions from Intel.

As usual, we have created a convenience script to perform these actions. On the JetsonHacksNano account on Github, there is a repository installLibrealsense. From a Terminal, clone the repository, and switch over to that repositories directory:

$ git clone https://github.com/JetsonHacksNano/installLibrealsense
$ cd installLibrealsense

You are now ready to install:

$ ./installLibrealsense.sh

Installation takes a couple of minutes, and then you are ready to go! You can start realsense-viewer:

$ realsense-viewer

Build from Source

There is also a script to help you build the RealSense SDK from source:

./buildLibrealsense.sh

After the build, plan on rebooting the Jetson Nano before experiencing RealSense goodness.

Notes

As shown in the video:

  • Jetson Nano
  • JetPack 4.3, L4T 32.3.1
  • RealSense D435i depth camera, RealSense T265 tracking camera
Facebook
Twitter
LinkedIn
Reddit
Email
Print

23 Responses

  1. Hi, after the install and typing realsense-viewer, suddenly my jetson nano just black out and shut down. Any reason for that to happen? I have no issues installing

  2. Does anyone know why I keep getting this error (I’ve updated everything and still the same error):
    E: Unable to locate package librealsense2-utils
    E: Unable to locate package librealsense2-dev

  3. I got the same problem on Jetson Nano JetPack 4.3.

    E: Unable to locate package librealsense2-utils
    E: Unable to locate package librealsense2-dev

  4. How are you able to achieve such good video quality with the Realsense camera? I purchased a D455, and it shows nothing but black splotches everywhere. Never a full, consistent image as in your videos. I’ve tried it on high-powered computers and now on the Nano, and it is always the same. Video is of horrifically bad quality. Before I send it back and purchase something with better fidelity, perhaps there is a setting that can be flipped that allows good capture. So far, Realsense doesn’t deliver. Everything it shows on the screen has holes in it.

  5. I found the way to solved the problem with “E: Unable to locate package librealsense2-utils” on Jetson Nano JetPack4.4.
    Hope this way can help someone here else!!!

    https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md

    $ sudo apt-key adv –keyserver keys.gnupg.net –recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

    $ sudo add-apt-repository “deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main” -u

    $ sudo apt-get install librealsense2-utils
    $ sudo apt-get install librealsense2-dev

  6. I followed your instructions. The RealSense Viewer works just great. I notice it creates 4 devices: /dev/video{0..3}. None of these can be accessed via any webcam utilities. Should they be? In addition, I only see /dev/video0 inside the NVidia Jupyter notebooks – and it doesn’t work either. What am I missing, please? Was I also supposed to build the RealSense SDK from source. I would think that has nothing to do with using the device as a webcam.

    Thanks!!!

  7. Looks like some of the references are no longer available.
    Here is the end result:
    “`
    E: Unable to locate package librealsense2-utils
    E: Unable to locate package librealsense2-dev
    “`
    And here is the repo that’s gone:
    “`
    Executing: /tmp/apt-key-gpghome.Uk1KPSeIg3/gpg.1.sh –keyserver keys.gnupg.net –recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
    gpg: keyserver receive failed: No name
    “`

    Jim, do you know any ways around this?

  8. Thanks for this! Worked perfectly on TX1 also. Updating camera firmware took longer than installing entire software library!

  9. Thanks Jim!

    After executing the ./buildLibrealsense.sh script, I needed to make some modifications to make it compatible with Realsense v2.54.1 on Jetson Nano Jetpack 4.6.4. The pyrealsense2*.so files were located in /usr/local/OFF, so I added the following line to my environment variables by running export PYTHONPATH=$PYTHONPATH:/usr/local/OFF.

    To ensure that Visual Studio Code recognizes pyrealsense2, I had to go to the settings by pressing Ctrl + , search for pythonpath, and add /usr/local/OFF to the “Python › Analysis: Extra Paths” setting.

    After these changes, the Realsense library works properly. However, I encountered an issue where IntelliSense does not recognize pyrealsense2. If anyone has any suggestions or solutions to this problem, I would greatly appreciate it.

    Best regards.

    1. Thanks for sharing what you found out! I haven’t worked with Intellisense and pyrealsense2, so I don’t have much insight into what the issue might be. Thanks for sharing, and thanks for reading!

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