-
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
pyrealsense via Debian packages on Jetson Nano #12912
Comments
Hi @jackson-smith-a Which JetPack are you using, please? JetPack 6.0 is supported in librealsense 2.55.1 onwards. The JetPack version does not matter though if you compile from source on Jetson with the CMake flag -DFORCE_RSUSB_BACKEND=ON included in the CMake build instruction. Use of this flag is demonstrated in a Nano-compatible guide at #6964 (comment) for compiling librealsense and the pyrealsense2 wrapper at the same time so that you do not need to build the wrapper separatey afterwards. |
I successfully compiled following the guide at #6964 but still can't import it in python. I've followed steps 7 and 8 and tried Notably, while there are some files named librealsense2.so and similarly in /usr/local/lib, /usr/local/lib/python3.6 seems to be empty. |
Since librealsense 2.54.1 Python 3.6 has no longer been supported by the SDK, with 3.7 being the minimum supported version. |
How do I get it to compile with a different version of python? I changed the CMake command to |
If you are building the Python wrapper from source code then I would expect the build's compiled files to be in the librealsense source code folder at librealsense > build > wrappers >python |
I too was trying pyrealsense2 with python3.6 on Jetson Tx2. After reading this article, I installed python3.8. I'm trying to download nvidia pytorch and torchvision, but jetson tx2 says jetpack4.6 is the latest. So, can’t I install pytorch and torchvision on python3.8? Also, is this the same for pyrealsense2? |
Hi @hs3296 The librealsense SDK is compatible with JetPack 4.6 when using Ubuntu 18.04. The pyrealsense2 wrapper is compatible with Python 3.8. The Nvidia documentation link below indicates that Pytorch can be used with JetPack 4.6.1. https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html Whilst the link below indicates that Pytorch version 1.11 should be used with JetPack 4.6.1. |
Thank you! I have jetpack 4.6.4, is this only available for 4.6.1? As a result, I received the reply <torch-1.11.0-cp38-cp38-linux_aarch64.whl is not a supported wheel on this platform>. |
4.6.1 is the only 4.6 version supported by the RealSense SDK's kernel patch script patch-realsense-ubuntu-L4T.sh. In regard to Pytorch's specified requirement for JetPack 4.6.1, it appears from the link below that the error message might be caused by the Python version, as it states that Pytorch only supports a maximum of Python 3.6 when using JetPack 4. Python 3.8 support was introduced in the Pytorch wheel files for JetPack 5. https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 At the link below a user of Python 3.8 and JetPack 4.6.4 like you was advised that Pytorch will work with those versions if it is built from source code. This is similar to how the RealSense pyrealsense2 wrapper can be used with unsupported Python 3 versions if the wrapper is built from source code instead of using a wheel package. |
build/wrappers/python doesn't have anything other than .cmake files in it (even in subdirectories), but after running After adding (Edit: I also had to use the solution at #4350 (comment) to actually use my camera.) |
It's great to hear that you achieved a solution, @jackson-smith-a - thanks very much for the update! |
I’ve been attempting to get pyrealsense working on a Jetson Nano running Ubuntu 18. I’ve attempted to just use
pip
but it seems binaries aren’t available for it. I’ve attempted to compile from source, but my version of JetPack is unsupported (#12131) and I’m already at the max version allowed for my Nano. I was able to successfully install the precompiled version via Debian packages following the guide here but this doesn’t seem to provide the Python wrapper. I can successfully compile C++ programs and get camera feed overrealsense-viewer
, but I can’timport pyrealsense2
on Python 2 or Python 3. Is there a step I'm missing?The text was updated successfully, but these errors were encountered: