Orin NX 升级 cmake 3-16 到 3-23 和 安装 open3D C++ 和 PCL

1. 更新 cmake 版本

cmake --version

1. 1 下载:

https://cmake.org/files/v3.23/

wget https://cmake.org/files/v3.23/cmake-3.23.0-linux-aarch64.sh

1.2. 卸载原来的

sudo apt -y remove cmake

1.3 安装

sudo bash ./cmake-3.23.0-linux-aarch64.sh --skip-licence --prefix=/usr/local --exclude-subdir

输入两个 y

1.4 查看版本

cmake --version

1.5 删除安装包即可

rm cmake-3.23.0-linux-aarch64.sh

注意:如果你是 ubuntu ,那么下载对应的安装包即可。
wget https://cmake.org/files/v3.23/cmake-3.23.0-linux-x86_64.sh

2. 安装 open3D

https://www.open3d.org/docs/release/arm.html

git clone --recursive https://github.com/intel-isl/Open3D
cd Open3D

2. 1 安装依赖

# Install dependencies
./util/install_deps_ubuntu.sh

# Optional: ccache is recommended to speed up subsequent builds
sudo apt-get install -y ccache

# Check cmake version, you should have 3.19+
cmake --version

2. 2 cmake 配置

mkdir  build
cd build

cmake  -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D BUILD_CUDA_MODULE=ON -D BUILD_GUI=ON -D BUILD_TENSORFLOW_OPS=OFF -D BUILD_PYTORCH_OPS=OFF -D BUILD_PYTHON_MODULE=OFF  .. 

不要问我为什么不用 python, 因为我遇到的下面的致命错误,一直解决不了,Orin nx 的python版本是 3.8, 我可能也可以装个 conda 再进一步安装,懒得弄,python 也没必要装。

-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found suitable version "3.9.5", minimum required is "3.6")
CMake Error at CMakeLists.txt:337 (message):
BUILD_PYTHON_MODULE=ON requires Python >= 3.6. Please ensure it is in
PATH.

如需安装 python:

pip install open3d
python -c "import open3d; print(open3d.__version__)"

2. 3 Build C++ library

make -j 6

2.4 Install C++ package (optional)

sudo make install
sudo ldconfig

2. 5 清理安装包

删除下载的 open3d

启动 open3d

/usr/local/bin/Open3D/Open3D

或者点击图标


PCL

https://pointclouds.org/downloads/

sudo apt install libpcl-dev
posted @ 2024-03-29 18:34  cold_moon  阅读(197)  评论(2编辑  收藏  举报