作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我现在正在使用一些 Laserscans,并希望在 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);
当我尝试编译时出现以下错误:
undefined reference to `pcl::VoxelGrid<pcl::PointXYZ>::applyFilter(pcl::PointCloud<pcl::PointXYZ>&)'
我发现,这可能是因为 CMakeList 中缺少组件。在这里我的 CMakeList 被剪断了:
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
cv_bridge
tf
message_generation
)
find_package(OpenCV REQUIRED)
find_package(PCL 1.7 REQUIRED
如果有人知道,有什么问题,请告诉我。我正在使用 Eclipse、PCL 1.7、ros indigo。
最佳答案
似乎有点晚了,但我也遇到了这个问题。 target_link_libraries
和 -lpcl_filters
在我的案例中有所帮助。
关于c++ - pcl::VoxelGrid<PointXYZ> 不适用于 pcl::PointCloud<PointXYZ>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48292715/
我现在正在使用一些 Laserscans,并希望在 C++ 中对 PointClouds 进行下采样。我在构建过程中遇到了一个奇怪的问题,我认为在我尝试编译代码时的库链接过程中。这里是问题似乎来自的最
在 PCL(点云库)数据类型(即 PointXYZ)上进行数学运算、加法、减法的常用方法是什么?即使是基础知识,似乎也没有定义运算符。 我想也许 PCL 方法是转换为特征向量,但似乎也没有构造函数。
我有一些代码如下所示: typedef pcl::PointXYZRGB pcl_ColorPointType; typedef pcl::PointXYZ pcl_PointType; typede
我是一名优秀的程序员,十分优秀!