本文整理汇总了C++中pointcloudt::Ptr::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::clear方法的具体用法?C++ Ptr::clear怎么用?C++ Ptr::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pointcloudt::Ptr
的用法示例。
在下文中一共展示了Ptr::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: waitForCloudK
/* collects a cloud by aggregating k successive frames */
void waitForCloudK(int k){
ros::Rate r(30);
cloud_aggregated->clear();
int counter = 0;
while (ros::ok()){
ros::spinOnce();
r.sleep();
if (new_cloud_available_flag){
*cloud_aggregated+=*cloud;
new_cloud_available_flag = false;
counter ++;
if (counter >= k){
cloud_aggregated->header = cloud->header;
break;
}
}
}
}
示例2: computeNeonVoxels
void computeNeonVoxels(PointCloudT::Ptr in, PointCloudT::Ptr green, PointCloudT::Ptr orange) {
green->clear();
orange->clear();
//Point Cloud to store out neon cap
//PointCloudT::Ptr temp_neon_cloud (new PointCloudT);
for (int i = 0; i < in->points.size(); i++) {
unsigned int r, g, b;
r = in->points[i].r;
g = in->points[i].g;
b = in->points[i].b;
// Look for mostly neon value points
if (g > 175 && (r + b) < 150) {
green->push_back(in->points[i]);
}
else if(r > 200 && (g + b) < 150){
orange->push_back(in->points[i]);
}
}
}