pcl::VoxelGrid不使用pcl::PointCloud 我现在正在使用一些激光扫描,想在C++中对PointClouds进行下采样。 我在构建过程中遇到了一个奇怪的问题,当我试图编译代码时,我认为是在库链接过程中。在这里,最小的代码似乎是从哪里剪下来的: pcl::PointCloud<pcl::PointXYZ>::Ptr point_cloud_last (new pcl::PointCloud<pcl::PointXYZ>); pcl::PointCloud<pcl::PointXYZ>::Ptr downsampled (new pcl::PointCloud<pcl::PointXYZ>); point_cloud_last = _last_pt_cl.makeShared(); pcl::VoxelGrid<pcl::PointXYZ> sor; sor.setInputCloud (point_cloud_last); sor.setLeafSize (0.05f, 0.05f, 0.05f); sor.filter (*downsampled);

pcl::VoxelGrid不使用pcl::PointCloud 我现在正在使用一些激光扫描,想在C++中对PointClouds进行下采样。 我在构建过程中遇到了一个奇怪的问题,当我试图编译代码时,我认为是在库链接过程中。在这里,最小的代码似乎是从哪里剪下来的: pcl::PointCloud<pcl::PointXYZ>::Ptr point_cloud_last (new pcl::PointCloud<pcl::PointXYZ>); pcl::PointCloud<pcl::PointXYZ>::Ptr downsampled (new pcl::PointCloud<pcl::PointXYZ>); point_cloud_last = _last_pt_cl.makeShared(); pcl::VoxelGrid<pcl::PointXYZ> sor; sor.setInputCloud (point_cloud_last); sor.setLeafSize (0.05f, 0.05f, 0.05f); sor.filter (*downsampled);,c++,point-cloud-library,C++,Point Cloud Library,如果有人知道有什么问题,请告诉我。 我使用的是Eclipse、PCL1.7和ros indigo 似乎有点晚了,但我也遇到了这个问题。带有-lpcl\u过滤器的target\u link\u库对我很有帮助。什么对我有用: target_link_libraries(my_project ${catkin_LIBRARIES} ${PCL_LIBRARIES}) find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs cv_br

如果有人知道有什么问题,请告诉我。
我使用的是Eclipse、PCL1.7和ros indigo

似乎有点晚了,但我也遇到了这个问题。带有-lpcl\u过滤器的target\u link\u库对我很有帮助。

什么对我有用:

target_link_libraries(my_project ${catkin_LIBRARIES} ${PCL_LIBRARIES})
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
cv_bridge
tf
message_generation
)
find_package(OpenCV  REQUIRED)
find_package(PCL 1.7 REQUIRED
target_link_libraries(my_project ${catkin_LIBRARIES} ${PCL_LIBRARIES})