【发布时间】:2015-05-12 10:54:44
【问题描述】:
我正在为大学做一个项目,我需要提取人们的点云来使用它。我做了一个ROS节点适应教程Ground based rgdb people detection的代码,现在我想在一个主题中发布第一个检测到的集群的点云。
但是我无法提取那个点云,类的定义在这里定义person_cluster.h。还有一个公共成员:
typedef pcl::PointCloud<PointT> PointCloud;
所以要将其转换为 sensor_msgs::PointCloud2 我愿意:
pcl_conversions::fromPCL(clusters.at(0).PointCloud,person_msg);
其中person_msg 是PointCLoud2 消息,clusters 是pcl::people::PersonCluster<PointT> 的向量,我只想发布第一个点云,因为我假设场景中只有一个人。
编译器给了我这个错误:
错误:无效使用 ‘pcl::people::PersonCluster::PointCloud’ pcl_conversions::fromPCL(clusters.at(0).PointCloud,person_msg);
我对 C++ 了解不多,也无法克服这个错误。谷歌搜索该错误似乎是当您没有“定义”好一个类时出现的,但我怀疑在 pcl 库中他们定义了一个错误的类。
【问题讨论】:
标签: c++ detection point-cloud-library