欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

error: ‘PassThrough’ is not a member of ‘pcl’

程序员文章站 2022-07-13 22:19:16
...

error: PassThrough is not a member of pcl

flyfish

错误详细内容

/home/pumpkinking/catkin_ws/src/gpd/src/interface/get_grasps.cpp: In function ‘void point_cloud_callback(const ConstPtr&)’:
/home/pumpkinking/catkin_ws/src/gpd/src/interface/get_grasps.cpp:190:5: error: ‘PassThrough’ is not a member of ‘pcl’
     pcl::PassThrough<pcl::PointXYZRGB> a;    
     ^
/home/pumpkinking/catkin_ws/src/gpd/src/interface/get_grasps.cpp:190:38: error: expected primary-expression before ‘>’ token
     pcl::PassThrough<pcl::PointXYZRGB> a;    
                                      ^
/home/pumpkinking/catkin_ws/src/gpd/src/interface/get_grasps.cpp:190:40: error: a was not declared in this scope
     pcl::PassThrough<pcl::PointXYZRGB> a;    
                                        ^

gpd/CMakeFiles/gpd_get_grasps.dir/build.make:62: recipe for target 'gpd/CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o' failed
make[2]: *** [gpd/CMakeFiles/gpd_get_grasps.dir/src/interface/get_grasps.cpp.o] Error 1
CMakeFiles/Makefile2:1371: recipe for target 'gpd/CMakeFiles/gpd_get_grasps.dir/all' failed
make[1]: *** [gpd/CMakeFiles/gpd_get_grasps.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

错误原因
缺少头文件

#include <pcl/filters/passthrough.h>