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
23 Responses
Does installing from the repo include CUDA support? Is the only way to get CUDA boost to build from source?
Does this workflow works for Xavier as well?
Hi Jim, how about some videos showing D415/D435 in pair with T265 doing some rtabmap and occupancy mapping in ROS (e.g https://github.com/IntelRealSense/realsense-ros/tree/occupancy-mapping). I have got things initially running on Nano but it would be great to compare the results. Thanks!
I just tried your install script — works great.
If you’re interested I have a draft .xml mime type file and .desktop file for adding the realsense-viewer application to the application menu.
https://www.reddit.com/r/realsense/comments/ehy7df/building_librealsense_in_fedora_linux_from_source
The relevant info is towards the bottom of the post and should be compatible with Gnome and other freedesktop based GUIs.
I’m glad you got it to work.
Thank you for the MIME file, and thanks for reading!
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
You haven’t said how you are powering the camera and the Jetson. If you do not have enough power, then the Jetson will shut down.
You probably need a higher amperage power supply
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
^^
Btw, its a TX2 running 18.04…
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
Hi Allen
Were you able to solve the problem?
I have the same difficulty
You should check to see what error messages were printed when you tried to add the repository. More than likely, you have some firewall issue. Please see: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md
for full installation information.
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.
I got the same problem on Jetson Tx2
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
Hi Johnthan
What exactly did you do? I have the same problem
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!!!
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?
Intel moved the key server. You can use this commit to change it in the installLibrealsense.h file: https://github.com/JetsonHacksNano/installLibrealsense/pull/41/commits/95b659fca7ce9eb7d2dc0b3a81c8fcca97c8ef90
Hope this help.
Thanks for this! Worked perfectly on TX1 also. Updating camera firmware took longer than installing entire software library!
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.
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!