zoukankan      html  css  js  c++  java
  • 编译依赖ndt_gpu库的包,遇到Eigen报错

    背景

    使用NDT建图,帧率比较慢,打算使用gpu加速计算。

    ndt_gpu是一个使用gpu加速ndt计算的库,首先在工作空间编译这个包。

    然后在ndtMap包中链接这个库,其CMakelists.txt添加如下内容,

    SET(CUDA_INCLUDE_DIRS /usr/local/cuda-10.0/include)
    find_package(CUDA)
    if (CUDA_FOUND)
        add_definitions(-DCUDA_FOUND)
        list(APPEND PCL_OPENMP_PACKAGES ndt_gpu)
    endif ()
    
    find_package(catkin REQUIRED COMPONENTS
                ${PCL_OPENMP_PACKAGES}
                )

    编译成功!

    运行却报错如下:

    ndtMap: /usr/local/gtsam/include/gtsam/3rdparty/Eigen/Eigen/src/Core/DenseStorage.h:109: 
    Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 16>::plain_array() [with T = float; int Size = 16; int MatrixOrArrayOptions = 0]: 
    Assertion `(internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) & (15)) == 0 && 
    "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " 
    **** READ THIS WEB PAGE !!! ****"' failed.
    Aborted (core dumped)

    问题解决思路

    https://blog.csdn.net/wojiushixiangshi/article/details/78356271

    http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html (更多详情需要参考这个网址)

    解决方案:

    在ndt_gpu库的CMakeLists.txt中添加下述指令,重新编译即可。

    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O3 -mtune=native ")
  • 相关阅读:
    关于ckeditor ajax提交到后台 问题
    关于ckeditor 第二次加载 出现问题
    jquery 面板拖拽
    【Sonarqube】——IDEA配置sonarlint
    【Sonarqube】——sonarqube配置代码检查规范
    算是一个新的开始吧
    简单的DBHelper类
    如何搭建MVC3与配置models层
    经典SQL语句大全
    c# lambda表达式学习
  • 原文地址:https://www.cnblogs.com/gdut-gordon/p/10940684.html
Copyright © 2011-2022 走看看