ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Pi4 Ubuntu MATE 22.04编译open3d点云库

2022-07-26 15:00:48  阅读:205  来源: 互联网

标签:lib 22.04 float c++ 编译 open3d dev Ubuntu filament


一、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()'

还未找到解决方法。。。

 

 

标签:lib,22.04,float,c++,编译,open3d,dev,Ubuntu,filament
来源: https://www.cnblogs.com/wzc0066/p/16521024.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有