void cloudHandler(const sensor_msgs::PointCloud2ConstPtr& laserCloudMsg){ // 1. Convert ros message to pcl point cloud copyPointCloud(laserCloudMsg); // 2. Start and end angle of a scan findStartEndAngle(); // 3. Range image projection projectPointCloud(); // 4. Mark ground points groundRemoval(); // 5. Point cloud segmentation cloudSegmentation(); // 6. Publish all clouds publishCloud(); // 7. Reset parameters for next iteration resetParameters(); }
if (fullCloud->points[lowerInd].intensity == -1 || fullCloud->points[upperInd].intensity == -1){ // no info to check, invalid points groundMat.at(i,j) = -1; continue; }
这里是对提取完成地面的点云进行分割。使用的方法来源于文章 “Fast image-based segmentation of sparse 3D laser scans for online ooperation”。其主要的原理是,假设同一个团簇的点云之间的连线和于扫描设备的连线的夹角应该小于一个阈值。详细可以见下图。
if (timeLaserOdometry - timeLastProcessing >= mappingProcessInterval) { timeLastProcessing = timeLaserOdometry; // transform to the same coordinate system transformAssociateToMap();
// extract surrounding key frames based on the map format extractSurroundingKeyFrames();
本文介绍了使用Rust语言编写、保存和编译程序的简单步骤。首先,打开记事本文件并编写程序代码,然后将代码保存到一个以.rs为扩展名的文件中。接下来,使用rustc命令来编译运行程序。最后,通过命令行运行编译后的程序,得到输出结果。如果遇到编译错误,可以下载Build Tools for Visual Studio 2017来解决。 ...
[详细]