配置GPD

论文地址:

https://arxiv.org/abs/1706.09911

代码链接:

https://github.com/atenpas/gpd

环境配置:

相关配置版本
GPD2.0 - (分支6327f20)
Ubuntu16.04 64bit
CUDA10.2
PCL1.9.0
Boost1.58
VTK8.2.0
OpenCV4.2.0
GCC7.5.0
  • 安装顺序 GCC -> VTK -> Boost -> OpenCV -> PCL
  • 以上配置使用Boost 1.68会报错
  • VTK最好选用8.2版本,对应 PCL-1.9.0
  • 最好不要用 PCL-1.11.0 与 PCL-1.12.0

重要参考:

  1. 在安装PCL-1.9.0 时会发生报错,需要更改源代码修正错误:
    pcl-pcl-1.9.0/visualization/src/pcl_visualizer.cpp3564 行左右更改为以下代码(主要添加 #if - #else - #endif,适配VTK8.2.0 )。

参考链接:
https://blog.csdn.net/czychen1997/article/details/107306674

    for (std::size_t t = 0; t < mesh.tex_coordinates.size (); ++t)
      if (t == tex_id)
        for (std::size_t tc = 0; tc < mesh.tex_coordinates[t].size (); ++tc)
          coordinates->InsertNextTuple2 (mesh.tex_coordinates[t][tc][0],
                                         mesh.tex_coordinates[t][tc][1]);
      else
        for (std::size_t tc = 0; tc < mesh.tex_coordinates[t].size (); ++tc)
          coordinates->InsertNextTuple2 (-1.0, -1.0);

#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 2
     mapper->MapDataArrayToMultiTextureAttribute(mesh.tex_materials[tex_id].tex_name.c_str(),
       this_coordinates_name.c_str(),
       vtkDataObject::FIELD_ASSOCIATION_POINTS);
#else
     mapper->MapDataArrayToMultiTextureAttribute(tu,
                                                 this_coordinates_name.c_str (),
                                                 vtkDataObject::FIELD_ASSOCIATION_POINTS);
     this_coordinates_name.c_str(),
     vtkDataObject::FIELD_ASSOCIATION_POINTS);
#endif

    polydata->GetPointData ()->AddArray (coordinates);
    actor->GetProperty ()->SetTexture (tu, texture);
    ++tex_id;
  }
  1. 在配置GPD CMakelist.txt 时参考以下PR:
    https://github.com/atenpas/gpd/pull/109/files

CMakelist.txt

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(gpd)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 14)
SET(CMAKE_AR  "gcc-ar")
SET(CMAKE_RANLIB "gcc-ranlib")
SET(CMAKE_NM "gcc-nm")
# CMAKE_CXX_FLAGS
set(CMAKE_CXX_FLAGS "-O3 -march=native -mtune=intel -msse4.2 -mavx2 -mfma -flto -fopenmp -fPIC -Wno-deprecated -Wenum-compare -Wno-ignored-attributes -std=c++17")

参考Issues:

https://github.com/atenpas/gpd/issues/103
https://github.com/atenpas/gpd/issues/107
https://github.com/atenpas/gpd/pull/109/files
https://github.com/atenpas/gpd/issues/88#issuecomment-833370948

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值