-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation on Jetson Orin Nano #13116
Comments
Hi @ClaudioCarbone The MIPI driver provides support for the IMU on a USB cable connection with RealSense cameras that are equipped with an IMU (including D456) when using JetPack 6. Not using the MIPI driver should not prevent the camera from being detected. Let's set aside the MIPI driver for the moment and focus on trying to get the camera detected. Is it detected in realsense-viewer if you launch it in sudo admin permissions mode with the command sudo realsense-viewer |
Hi @MartyG-RealSense , thank you for your reply. First of all i wanted to say that this warning appeared again after I reinstalled everything But again this is what realsense-viewer printed:
If I try to add a new source there is no option for the realsense d456 that i have. After, I tried to run the command |
Another JetPack 6 user had similar camera detection problems to yours yesterday at #12566 (comment) Do you have the option to downgrade to JetPack 5.1 on your Jetson? RealSense users with a Jetson who have had problems with JetPack 6 have been able to achieve a working setup after a JetPack downgrade. |
@MartyG-RealSense This could not be a viable option since this is not the only task I'm working on with the board and also I'm not the only user to operate on it. |
try change line 47 in ./libuvc_installation.sh file to That's how I let realsense-viewer find the camera. If imu doesn't working, downgrade the firmware of camera. |
I tried to modify the ./libuvc_installation.sh file like @jeezrick did in this comment but i still have 0 device detected.
So this unfortunately did not solve my issue. |
SDK 2.55.1 requires camera firmware driver version 5.16.0.1. Do you have this firmware installed in your D456 camera, please? |
I can't use |
Okay, thanks very much. If you updated the camera in the RealSense Viewer in Windows then it will have installed the recommended firmware for that particular Viewer version. So if it was not the 2.55.1 version then an older firmware than 5.16.0.1 will have been installed. You should be able to check the firmware version with |
I tried I also checked and on windows I have the same viewer version that I installed on ubuntu which is 2.55.1 and the firmware version of the camera is 5.16.0.1. Could it be that on the Jetson I don't have USB 3.0? |
Only the D457 camera model has a moveable mode switch under the little door on top of the camera. The RealSense SDK supports USB 2.1, so the camera should be detected even if it is detected as USB 2.1. The ports on a Jetson Orin Nano are USB 3.2 though. For Nano boards, Intel strongly recommend enabling the barrel jack power connector for extra power using the instructions at the link below. Orin Nano has a barrel jack. https://jetsonhacks.com/2019/04/10/jetson-nano-use-more-power/ |
Thanks for the suggestion, I am already using the DC power jack though! |
The best way forward would be to wipe the Jetson and install everything from the beginning, including Ubuntu 22.04. I note that this would not be an option for you though as "it is not the only task I'm working on with the board and also I'm not the only user to operate on it". The next best option would be to uninstall the librealsense Jetson packages with the command below and then perform the package install instructions again.
Another approach would be a source code build with the RSUSB backend method using the instructions for Jetson at #6964 (comment) |
Hi @MartyG-RealSense thank you for your support, after uninstalling librealsense with I can't declare victory yet because I think i'm having some issues with the motion module. Should I open a new issue or can I continue here? Anyway these are the messages when i open the viewer: When i try to turn on the motion module, a lot of errors and hundreds of warnings show up: I tried disabling the auto exposure but it does not fix it. |
@MartyG-RealSense I'm gonna also add that i'm trying to use the This is my test script:
|
The IMU problem could be because of the need to install the MIPI driver for USB support when using JetPack 6. If you cannot downgrade to Jetpack 5.1 then there may not be a way around that issue, unfortunately. Regarding the Python problem, does it make a difference if you unplug the camera and then re-insert it before running your script? |
I just tried to unplug it and re-insert it but the output is the same. |
A couple of months ago, another RealSense user at #11368 (comment) who was experiencing RuntimeError: no device connected with their Python script found though that the SDK's Python example script python-tutorial-1-depth.py could run successfully. Does this script also work for you if you run it? That user's camera detection problem was solved by a libuvc backend installation of librealsense, though I note that you tried it earlier at #13116 (comment) and it did not resolve your problem. |
It looks as though we have not mentioned in this discussion yet which method you used to install the pyrealsense2 wrapper. The options are:
Methods 2 and 3 should work with any version of Python 3 that are newer than 3.7. |
Honestly i'm not sure because i have uninstalled it and reinstalled it. I should do i again but i'm not sure how, first thing is that i have now different folders in I can try to build from source by following this guide but I dont even know where to create the |
The librealsense source code folder will have the version number in its name. So it would be librealsense-2.55.1 The /build folder should be created with mkdir build whilst in the root directory of the librealsense source code folder, which is the one with the list of folders and files in the image below. |
@MartyG-RealSense I now followed this guide and did it in the folder you showed me, but still no device connected. I can try to do step 3 (Building the pyrealsense2 wrapper from source code separately after librealsense has already been installed) but I'm not sure how to proceed for this. |
Building the pyrealsense2 wrapper from source code separately after librealsense has already been installed uses the guide that you have already tried, unfortunately. https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python You have already tried building with RSUSB = true and realsense-viewer was able to work but the camera was still not detected in the Python wrapper. Can you confirm please whether or not you used the instructions at #6964 (comment) to build librealsense and pyrealsense2 together at the same time with RSUSB = true please? |
I have been following the guide and it didn't work again. I dowloaded again the zipped source file, then i extracted it and created a folder inside called build and opened a terminal there. After this i ran I'm not sure what the purpose of step 9 is but I tried it, nothing changed though. Still, no device connected. @MartyG-RealSense unless you have other suggestions I think I could try to uninstall everything and try to do it again from zero (with the methods that worked for me like building from source) but I think i might need some recap in order not too loose pieces of the puzzle. Let me know if this is a good idea and if you are able to help me on this too |
It may be better to try a new approach. You could build from source on your Jetson using the JetsonHacks website's buildLibrealsense.sh build script. This script includes the -DBUILD_PYTHON_BINDINGS=bool:true flag in its CMake build instruction, so it should build librealsense and the pyrealsense2 wrapper at the same time. You should also add the flag -DBUILD_GRAPHICAL_EXAMPLES=true to the buildLibrealsense.sh script if you want to build it with realsense-viewer included in the installation. |
@ClaudioCarbone I believe that you have tried almost everything possible to get the Python library working. Sometimes there are cases where the Python wrapper works fine on a PC but on a Jetson the wrapper will not detect a camera no matter what installation method is used. This may be such a case, unfortunately. |
I guess my only option now is to downgrade to Jetpack 5.1, will that probably fix my problems? |
A downgrade to 5.1 has worked for other users of JetPack 6 who experienced problems with camera models equipped with an IMU. |
Ok, I am working on Jetpack 5.1 now. I am using a test SD card that has Jetpack 5.1 installed and I'm trying to see if it works. Keep in mind that my main goal is to use the pyrealsense2 library, so even if realsense-viewer doesn't work it's not important for me. Also I might not need the IMU of the camera so that is secondary too. What is the best way to install all the libraries? Do you suggest I build from source or use JetsonHacks repo? But before i work on the Jetpack 5.1 I noticed one thing: i have no .so file at I noticed this while i was reading this post and I was not able to undestand which is the correct way to solve this, since i followed the solution there with no success. I'm thinking maybe there is some problem with point 5:
I'm telling you this because i dont understant the meaning of this part.
|
@MartyG-RealSense I was also wondering, as a side question, if there's a way to get raw depth data without using pyrealsense2, because I am able to get some frames using opencv using |
When building from source code, the .so files should be placed in the librealsense > build > wrappers > Python directory of the source code folder if the flag -DBUILD_PYTHON_BINDINGS:bool=true is included in the CMake build instruction. The JetsonHacks buildLibrealsense source code build script includes the Python bindings flag, so you should be able to conveniently install librealsense and the pyrealsense2 wrapper at the same time using this script. https://github.com/JetsonHacksNano/installLibrealsense/blob/master/buildLibrealsense.sh In regard to capturing raw data without using pyrealsense2, if librealsense is built from source with CMake with the flag -DFORCE_LIBUVC=OFF included in the CMake build instruction then you should be able to capture raw data from the camera using standard Linux tools, though it would not be nicely colorized. In regard to PYTHONPATH, this tells the pyrealsense2 wrapper where to find your installation of Python on your computer. It can sometimes be awkward to get working. You do not need to set up a PYTHONPATH though if you instead copy the .so files librealsense2.so and pyrealsense2.so to the same folder that your pyrealsense2 program script is n. When using Python 3, the pyrealsense2.so file will have a more complex auto-generated filename based on the Python 3 version number you are using. For example, if someone was using Python 3.5 then the filename might be something like pyrealsense2.cpython-35m-arm-linux-gnueabihf.so, with '35m' denoting that Python 3.5 has been detected on the computer. |
At
I tried copying them in my home folder where I also have the test python script (python-tutorial-1-depth.py), but it still tells me that no device are connected. Are those the correct files? Why are them in a different folder as expected? |
I believe that librealsense2.so.2.55.1 is the librealsense2.so file that you need but that you should look in the /usr/local/lib folder for it. I would normally expect the pyrealsense2 .so file to be located in the librealsense > build > wrappers > Python directory of the librealsense source code folder after the wrapper has been built from source code. |
That's correct, I found librealsense2.so.2.55.1 at /usr/local/lib so I copied it in my home folder where i have the python script. As for the pyrealsense2 .so file, there is no .so file at librealsense > build > wrappers > Python like you suggested. I don't know if it was a good idea but I also removed the last 3 lines of .bashrc that he told to add in step 7, because I'm worried that they might create some errors. The problem is that I still can't find the .so file at librealsense > build > wrappers > Python, what am I doing wrong here? |
There was a past case of someone building the wrapper on a Jetson Nano where their librealsense2.so file was in usr/local/lib, but they also had the pyrealsense2.so files generated in their /build/wrappers/python folder. The link below lists the steps that they took that led to those files being generated. https://support.intelrealsense.com/hc/en-us/community/posts/4405767306003/comments/4405944882963 |
@MartyG-RealSense Which was never answered by the user and, since the instructions are the same as this comment which I followed again today, I'm not sure this can fix the issue. Am I perhaps missing something? edit: I had also tried in the past the package restructuring using instructions this guide so I already have the init.py file in the folder. |
As far as I can tell you have not missed anything. You have files in your build > Python folder (though not the ones that you need), so this shows that some kind of build process has taken place. Can your Python script run correctly if you input the command below into the terminal before you run the script in order to state where to find Python 3.10 without needing to put the two files into the project folder?
You can check whether the path on your particular computer is actually /usr/local/lib by inputting the command which python3 to obtain the path to the Python 3 executable on your computer. |
Thank you for your suggestion, I tried to run I also tried |
What about /usr/bin/python3 as the path? That is the path that another Jetson user at #12377 got and their build included the .so files. |
I also tried I noticed the user in the mentioned post had a differen't issue, which is "No Module named pyrealsense2", in my case my python script returns "No device connected". @MartyG-RealSense I still think there is something that I did wrong while building the pyrealsense2 library and I wanted to ask you how would you check if pyrealsense2 was correctly installed in your workstation, so I can try it myself. |
If you create a test script with only the line import pyrealsense2 as rs in it then that will confirm whether the pyrealsense2 wrapper and and Python 3 can find each other or whether instead you will receive No Module named pyrealsense2. No device connected errors are significantly more difficult to solve though, unfortunately. Usually the RealSense Viewer will be working fine but the camera is not detected by Python and the reason for this is not clear. Multiple approaches may be tried and the outcome is the same even when it seems that procedures have been followed correctly each time. The majority of the cases of this problem occur on Jetson boards, with PC computers able to access pyrealsense2 correctly. I very much understand how frustrating it can be and appreciate your patience. |
Yeah this problem of no device connected seems really impossible to fix and I undestand that this is happening because I'm working on a Jetson board. Anyway I was looking at this post again and I was trying to follow what he did but when he show these commands I don't know how to correct them for my case.
I looked into the /librealsense/build/wrappers/python/pybackend2 folder but I dont have the pybackend2.cpython-310... or pyrealsense2.cpython-310... files For pybackend2.cpython-310... I found it in none of the folders of the system but I found pyrealsense2.cpython-310... at /home/librealsense/build/release like last week |
In regard to the |
@MartyG-RealSense Exactly, I typed |
@ClaudioCarbone I saw this issue earlier when trying to fix my own camera and wanted to share what worked for me. As a disclaimer, however, I have not read this entire thread and may be missing very key details that make my experience completely irrelevant! (just bear that in mind). If you follow the rather confusing web of posts that stem from a post I made on NVIDIA's Isaac ROS forums, maybe it is possible to get your camera working in a similar way. A summary of the steps I took:
Again, I didn't read the entire history of the steps you've tried, so this might not be useful at all. I just wanted to put this here as a last-ditch possibility as it has worked for me so far. @MartyG-RealSense is probably your best bet either way, though!! |
Thanks so much @nlitz88 for your willingness to share with @ClaudioCarbone your experience of what worked for you in your particular case! |
Hi @ClaudioCarbone Do you require further assistance with this case, please? Thanks! |
I'm going to resume working on this as soon as I can, i will try @nlitz88 suggestion again since i tried it and it didn't work. |
Hi @ClaudioCarbone Do you have an update about this case that you can provide, please? Thanks! |
Case closed due to no further comments received. |
Hi @MartyG-RealSense had an D435i working on Jetson Orin Nano, what bothers me is I tired to use the libuvc script ./scripts/libuvc_installation.sh within the repo, and I make sure to add python executable and related cmake options: cmake ../ -DFORCE_LIBUVC=true -DFORCE_RSUSB_BACKEND=ON -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/home/orinnano/anaconda3/envs/pose_est_env/bin/python -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true. However, after the installation, I was able to use the realsense-viewer while the python wrapper pyrealsense2 was unable to detect any devices. |
Hi @Andd54 You would only need to use the If you do wish to use -DPYTHON_EXECUTABLE, the command which python3 can be used to confirm which path to use with the parameter.
It is worth bearing in mind though that it is a known issue with other RealSense users that sometimes realsense-viewer will work fine but the pyrealsense2 wrapper will not detect the camera. There is not a known reason for this, unfortunately. |
I'm currently trying to use the Intel Realsense d456 on my Jetson Orin Nano board, i'm following this guide: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md
I am not able to use realsense-viewer and pipe.start(), they both say there are no devices connected.
The first problem arises with this part which says:
"For Jetson Orin™ with JetPack 6.0 you will need to follow build for MIPI driver as NVIDIA released Kernel 5.15 default configuration with disabled HID: Intel® RealSense™ camera driver for GMSL* interface".
I have Jetson 6.0 but the guide is confusing for me, i dont understand what i have to change if i have a d456 instead of a d457. Also the instructions say that "Debian packages will be generated in images folder." but i cant find this folder. Maybe this happened because this guide is "D457 MIPI on Jetson AGX Xavier", so i had to skip this part and hoped it was not needed.
Continuing with the fist guide i followed Step 4. Install with Debian Packages.
The installation finished with no issues but as i said, on realsense-viewer, no devices are found. I tried the viewer on windows and everything works there.
The text was updated successfully, but these errors were encountered: