在nx上安装librealsense可以使用由jetsonhacks开源的安装脚本installRealSenseSDK
克隆仓库,进入目录
$ git clone https://github.com/jetsonhacks/installRealSenseSDK.git
$ cd installRealSenseSDK
若不需要最新版本的librealsense,则运行:
$ ./installLibrealsense.sh
如果需要最新版本的librealsense则需要源码安装。
使用gedit打开buildLibrealsense.sh
,将LIBREALSENSE_VERSION修改为最新版本。
例如:
LIBREALSENSE_VERSION=v2.45.0
在librealsense github的tag处可以看到目前的最新版本为v2.45.0
运行以下命令进行安装:
$ ./buildLibrealsense.sh -nc
如果需要使用CUDA,使用gedit打开buildLibrealsense.sh
,修改NVCC_PATH指向cuda库nvcc目录。然后运行以下命令安装:
$ ./buildLibrealsense.sh