ubuntu下编译代码报pcl中voxel_grid.h和pcl/registration/impl/ndt.hpp报error: ‘Index’ is not a member of ‘Eigen’错误,网上查找说把相关头文件中的Eigen::Index直接改成int,但是这种方法需要修改系统库。
参考
https://xiaotaoguo.com/p/lego-loam-setup-ubuntu20/
根本的原因是低版本的 gtsam 中使用的是较低版本的 Eigen,还没有 Eigen::Index
这个定义。
将gtsam的版本升级成4.1及以上版本的即可解决。