Pi4 Ubuntu MATE 22.04编译open3d点云库
2022/7/28 5:25:12
本文主要是介绍Pi4 Ubuntu MATE 22.04编译open3d点云库,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
一、Raspberry Pi4安装Ubuntu MATE 22.04详细过程
二、Ubuntu 20.04编译安装open3d点云处理库
三、Build on Pi4 with Ubuntu MATE 22.04(流程参照上面PC上的编译流程)
(1) change util/install_deps_ubuntu.sh libc++-7-dev/libc++abi-7-dev to libc++-14-dev/libc++abi-14-dev (2) sudo apt install cmake git python-setuptools python3-wheel pip python3-numpy (3) cmake(使用上面带编译选项的那个,不要编译filament; 由于选项里面关闭了GUI的编译,所以filament就默认不会编译了) (4) install (5) 测试import open3d时出现错误:libOpen3D.so: cannot allocate memory in static TLS block
解决方法:
export LD_PRELOAD=/usr/local/lib/libOpen3D.so可以添加到~/.bashrc里面,source一下一劳永逸。 然后基本的测试功能都可以了。 但是还是不能绘制视图窗口,报错如下(尚未解决):
GLFW Error: GLX: Failed to create context
四、更多探索
尝试打开GUI选项(cmake里面的 DBUILD_GUI=ON,然后就会自动编译filament模块)重新编译:
需要安装更多软件包:sudo apt install clang libclang-cpp-dev libc++-dev libc++1 libc++abi1 libc++abi-dev
否则在编译filament时会报错,如:
Could not find CPP_LIBRARY using the following names: c++ Could not find CPPABI_LIBRARY using the following names: c++abi
然后还会遇到错误:
filament/libs/image/src/ImageSampler.cpp:41:17: error: expected unqualified-id
解决方法:https://github.com/google/filament/issues/5203
index 98073c489..d8bc32f82 100644 --- a/libs/image/src/ImageSampler.cpp +++ b/libs/image/src/ImageSampler.cpp @@ -38,7 +38,7 @@ struct FilterFunction { bool rejectExternalSamples = true; }; -constexpr float M_PIf = float(filament::math::F_PI); +constexpr float M_PI_f = float(filament::math::F_PI); const FilterFunction Box { .fn = [](float t) { return t <= 0.5f ? 1.0f : 0.0f; }, @@ -50,7 +50,7 @@ const FilterFunction Nearest { Box.fn, 0.0f }; const FilterFunction Gaussian { .fn = [](float t) { if (t >= 2.0) return 0.0f; - const float scale = 1.0f / std::sqrt(0.5f * M_PIf); + const float scale = 1.0f / std::sqrt(0.5f * M_PI_f); return std::exp(-2.0f * t * t) * scale; }, .boundingRadius = 2 @@ -86,7 +86,7 @@ const FilterFunction Mitchell { // Not bothering with a fast approximation since we cache results for each row. float sinc(float t) { if (t <= 0.00001f) return 1.0f; - return std::sin(M_PIf * t) / (M_PIf * t); + return std::sin(M_PI_f * t) / (M_PI_f * t); }
接着出现一堆类似下面的错误:
undefined reference to `spvtools::val::BasicBlock::immediate_dominator()'
还未找到解决方法。。。
这篇关于Pi4 Ubuntu MATE 22.04编译open3d点云库的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-01为什么公共事业机构会偏爱 TiDB :TiDB 数据库在某省妇幼健康管理系统的应用
- 2024-04-26敏捷开发:想要快速交付就必须舍弃产品质量?
- 2024-04-26静态代码分析的这些好处,我竟然都不知道?
- 2024-04-26你在测试金字塔的哪一层?(下)
- 2024-04-26快刀斩乱麻,DevOps让代码评审也自动起来
- 2024-04-262024年最好用的10款ER图神器!
- 2024-04-2203-为啥大模型LLM还没能完全替代你?
- 2024-04-2101-大语言模型发展
- 2024-04-17基于SpringWeb MultipartFile文件上传、下载功能
- 2024-04-14个人开发者,Spring Boot 项目如何部署