ubuntu18.04安装open3d报错解决方法

问题描述

按照open3d官方安装教程在Ubuntu18.04上安装过程中的make步骤遇到问题,


问题描述如下:
在这里插入图片描述
显示文件“https://github.com/isl-org/open3d_downloads/releases/download/boringssl-bin/curl_7.79.1_linux_x86_64.tar.gz”下载失败。这是由于国内的用户无法访问github网站导致的。这时需要我们手动下载此文件到

open3D解压后文件夹路径/3rdparty_downloads/curl/

当然可能遇到的无法下载的包不止这一个,按照这个方法依次将无法下载的包手动下载到3rdparty_downloads/目录对应的文件夹里就可以了。(看起来名字差不多的文件夹就是对应的文件夹)接下来就可以流畅地编译并且安装open3d了:
在这里插入图片描述

测试用例

Cmakelist文件:

cmake_minimum_required(VERSION 3.20)
project(open3d_library_test)

set(CMAKE_CXX_STANDARD 14)

find_package(Open3D REQUIRED)
include_directories(${Open3D_INCLUDE_DIRS})
message(${Open3D_INCLUDE_DIRS})

add_executable(open3d_library_test main.cpp)
target_link_libraries(open3d_library_test ${Open3D_LIBRARIES})

测试代码:

#include <iostream>
#include <open3d/Open3D.h>

int main(int argc, char * argv[]) {
    std::cout << "Hello, Open3D!! " << std::endl;

    open3d::utility::SetVerbosityLevel(open3d::utility::VerbosityLevel::Debug);

    auto pcd = open3d::io::CreatePointCloudFromFile(argv[1]);

    // 1. test downsample
    auto downsampled = pcd->VoxelDownSample(0.05);
    {
        open3d::utility::ScopeTimer timer("FPFH estimation with Radius 0.25");
        open3d::pipelines::registration::ComputeFPFHFeature(*downsampled, open3d::geometry::KDTreeSearchParamRadius(0.25));
    }
    // 2. 估计点云的法向量
    {
        open3d::utility::ScopeTimer timer("Normal estimation with KNN20");
        for (int i = 0; i < 20; i++){
            downsampled->EstimateNormals(open3d::geometry::KDTreeSearchParamKNN(20));
        }
    }
    std::cout << downsampled->normals_[0] << std::endl;
    std::cout << downsampled->normals_[10] << std::endl;
    {
        open3d::utility::ScopeTimer timer("Normal estimation with Radius 0.01666");
        for(int i=0; i<20; i++){
            downsampled->EstimateNormals(open3d::geometry::KDTreeSearchParamRadius(0.01666));
        }
    }
    std::cout << downsampled->normals_[0] << std::endl;
    std::cout << downsampled->normals_[10] << std::endl;

    open3d::visualization::DrawGeometries({downsampled}, "TestPCD", 960, 540);

    return 0;
}

编译后运行

./open3d_library_test  安装包路径/examples/test_data/ICP/cloud_bin_0.pcd 

测试结果:
在这里插入图片描述

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值