Intel l515 support on XavierNX

Hello All,
I was able to install the LibRealSense v2.35.2 on my XavierNX following the guide:
[Install RealSense Camera in 5 minutes - Jetson Nano - JetsonHacks]

The following command works:
$realsense-viewer
*all the camera modes are displayed correctly
The following command doesn’t work:
$rs-distance

I tried to compile it from source following the guide: https://forums.developer.nvidia.com/t/intel-realsense-d435i-on-nx-devkit/125511/4

I used the version LibRealSense v2.35.2

Several LibRealSense versions were compiled, but the $rs-distance command still wont work.

Thank you for you time and help,
Luis

Hi,
We have tried the case of running installLibrealsense.sh in

and execute realsense-viewer to launch D435.

For building the source code, may need other users to share experience.

Hello DaneLLL,
I tried that script from scratch and the command $rs-distance works now.

Now I am trying to get the image distance matrix so I need to use the ROS wrapper or the PYTHON 3 wrapper.
Which way would you recommend to get the distance values?.
I have tried to build LibRealSense from source but that doesnt work.

Thank you,
Luis

doesn’t work in which sense? doesn’t build? or build but doesn’t run? or builds, runs , but doesn’t recognize devices? recognizes devices? try running with sudo; they missed udev rules installatiion in their source build method

1 Like

It does build, but the $rs-distance command doesn’t recognize any device. I will try to execute that command with sudo tomorrow.
Thank you Andrey1984

I rebuilt the LibRealSense v2.35.2 and v2.38.1 and I it doesn’t recognize my l515.
I tried:
$sudo realsense-viewer
$sudo rs-distance

Thanks,
Luis

what is the output of lsusb
of sudo rs-enumerate-devices
of rs-fw-update -l
librealsense sdk works both with installation from apt repository at aws & from sources.
tested on
nx/agx
actually you might need to use absolute paths, also try executing from build /bin folder;
system wide installation gets screwed when many librealsaense sdk versions are installed at the same OS
First:
sudo apt install mlocate
sudo updatedb
locate rs-fw-update
then it will show path to all existing binaries with such name;
navigate to the path & try
./rs-fw-update -l

or with sudo;
same with other binaries

1 Like

I tried the following output after executing the commands:

$sudo rs-enumerate-devices
No device detected. Is it plugged in?
$sudo rs-fw-update -l
there are no connected devices

$lsusb
Bus 002 Device 014: ID 8086:0b64 Intel Corp. 
Bus 002 Device 013: ID 0bda:0489 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 
Bus 001 Device 003: ID 13d3:3549 IMC Networks 
Bus 001 Device 004: ID 0603:0002 Novatek Microelectronics Corp. 
Bus 001 Device 002: ID 0bda:5489 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Were you able to build your Librealsense with a l515?

Thanks,
Luis

librealsense doesn’t build with a particular camera model
it supports all models from the supported models list by default;
we were able to use t265, d435 d435i, d455, l515 on agx/nx also within docker

1 Like
 wget https://github.com/IntelRealSense/librealsense/archive/v2.38.0.tar.gz && tar -xvf v2.38.0.tar.gz && cd librealsense-2.38.0/ && mkdir build && cd build &&  cmake ../ -DFORCE_RSUSB_BACKEND=true -DBUILD_PYTHON_BINDINGS=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_WITH_CUDA=true -DBUILD_GRAPHICAL_EXAMPLES=true && make -j6 && sudo make install

try the above
or like the one below

cmake ../ -DFORCE_RSUSB_BACKEND=true -DBUILD_PYTHON_BINDINGS=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_WITH_CUDA=true -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_GRAPHICAL_EXAMPLES=true -DCMAKE_CUDA_ARCHITECTURES=72  -DCMAKE_PREFIX_PATH=~/apriltag

also please note that sudo make install will not override existent binaries; so that it will likely be required to execute binaries from their build folder

2 Likes

I tried:

~$ locate rs-fw-update
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/rs-fw-update
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/CXX.includecache
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/DependInfo.cmake
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/build.make
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/cmake_clean.cmake
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/depend.internal
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/depend.make
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/flags.make
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/link.txt
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/progress.make
/home/xaviernx/librealsense-2.38.1/build/tools/fw-update/CMakeFiles/rs-fw-update.dir/rs-fw-update.cpp.o
/home/xaviernx/librealsense-2.38.1/tools/fw-update/rs-fw-update.cpp
/usr/local/bin/rs-fw-update

./home/xaviernx/librealsense-2.38.1/build/tools/fw-update/rs-fw-update -l
there are no connected devices

What Librealsense version did you use?

with sudo!

cd /home/xaviernx/librealsense-2.38.1/build/tools/fw-update/
sudo rs-fw-update -l
1 Like

The results are the same.

execute this
once completed use the sudo & the new path to run the binary
also you may try monitoring if
exec lsusb
will correctly reflect disappearing/ appearing of the device in case you unplug/ plug it

1 Like

I was able to run all the commands! Thank you
The next thing I need is to build it with the python3 wrapper.
With your build command I was able to execute the following command:

$python
>>>import pyrealsense2

But when I want to build it for python 3.6 adding the following flag to the cmake command:

-DPYTHON_EXECUTABLE=/usr/bin/python3.6

the pyrealsense2.so file is not created:

$python3
>>> import pyrealsense2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyrealsense2'

I found the following post (solution):
https://github.com/IntelRealSense/librealsense/issues/6980
I will try it and let you all know if it works with my XavierNX

ref install Realsense on Jetson Xavier agx · Issue #7078 · IntelRealSense/librealsense · GitHub

1 Like

It works!
I had to update cmake with the following commands and the build lyrealsense

#update cmake
sudo apt-get install curl 
sudo apt-get install libssl-dev libcurl4-openssl-dev #curl dependencies
wget http://www.cmake.org/files/v3.13/cmake-3.13.0.tar.gz
tar xpvf cmake-3.13.0.tar.gz cmake-3.13.0/
cd cmake-3.13.0/
./bootstrap --system-curl
make -j6
echo 'export PATH=/home/nvidia/cmake-3.13.0/bin/:$PATH' >> ~/.bashrc  #replace /home/nvidia with your instalation directory
source ~/.bashrc

#copy pyrealsense2 packages outside the folder
sudo cp -r /usr/lib/python3/dist-packages/pyrealsense2/* /usr/lib/python3/dist-packages/

#build Librealsense
wget https://github.com/IntelRealSense/librealsense/archive/v2.38.0.tar.gz && tar -xvf v2.38.0.tar.gz && cd librealsense-2.38.0/ && mkdir build && cd build &&  cmake ../ -DFORCE_RSUSB_BACKEND=true -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_WITH_CUDA=true -DBUILD_GRAPHICAL_EXAMPLES=true && make -j6 && sudo make install

After this you should be able to execute the examples with python3

Thank you Andrey1984

Hi Andrey1984, thanks for sharing your experience. Much appreciation.