Implementation of the FoundationPose library for Jetson Orin NX with live inference using Realsense D435i.
Follow the commented instructions in build_all.sh step by step. Do not run the whole script at once. Instead, copy and paste each command manually for ease of debugging.
- Run
librealsensesSDK_install.shto install the necessary dependencies for librealsense. - To enable
pyrealsense2support, copy the required.sofiles to the folder where the script will run in the Jetpose directory. Example:
cp ~/librealsense_build/librealsense-master/build/release/pyrealsense2.cpython-310-aarch64-linux-gnu.so.2.55.1 ~/Jetpose/FoundationPose/pyrealsense2.so
cp ~/librealsense_build/librealsense-master/build/release/librealsense2.so.2.55.1 ~/Jetpose/FoundationPose/librealsense2.so
cp ~/librealsense_build/librealsense-master/build/release/librealsense2-gl.so.2.55.1 ~/Jetpose/FoundationPose/librealsense2-gl.so- Open
run_live.pyand set the path for the.objfile. - Run the script using:
python run_live.py- During development, I couldn't use the cuDNN backend in PyTorch. As a workaround, I disabled it using:
torch.backends.cudnn.enabled = FalseThis results in slow inference, approximately 1 inference per second.
- Help is needed to enable cuDNN backend for PyTorch on Jetson Orin NX.