在服务器无显示器时,为了正常使用 Open3D,需要开启 Headless Rendering。而该功能必须要重新编译,下面给出详细过程。
使用环境Ubuntu 20.04.
主要参考
http://www.open3d.org/docs/latest/tutorial/Advanced/headless_rendering.html
http://www.open3d.org/docs/latest/compilation.html
–
步骤0 开启 Conda/VirtualEnv Python 环境
注意下列步骤安装的Open3D 将在该Python环境种适用。
步骤1 更新电脑中的 cmake
https://graspingtech.com/upgrade-cmake/
sudo apt install build-essential libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz
tar -zxvf cmake-3.20.2.tar.gz
cd cmake-3.20.2
./bootstrap
make -j
sudo make install
步骤2 Install OSMesa
sudo apt-get install libosmesa6-dev
步骤3 编译
git clone https://github.com/isl-org/Open3D
util/install_deps_ubuntu.sh
mkdir build
cd build
cmake -DENABLE_HEADLESS_RENDERING=ON
-DBUILD_GUI=OFF
-DUSE_SYSTEM_GLEW=OFF
-DUSE_SYSTEM_GLFW=OFF
-DBUILD_WEBRTC=OFF
…
make -j
make install-pip-package
搞定!
–
最后:Test headless rendering
$ cd …/Open3D/examples/python/visualization
$ python headless_rendering.py
如果看到输出说明成功:
Capture image 00000
Capture image 00001
Capture image 00002
Capture image 00003
Capture image 00004
Capture image 00005
:
Capture image 00030

5142

被折叠的 条评论
为什么被折叠?



