mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
ground segmentaiton: adjusted cluster inlier with centroid below max height of biggest cluster
This commit is contained in:
@@ -109,7 +109,7 @@ void segmentObstaclesFromGround(
|
|||||||
{
|
{
|
||||||
Eigen::Vector4f centroid(0,0,0,1);
|
Eigen::Vector4f centroid(0,0,0,1);
|
||||||
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
pcl::compute3DCentroid(*cloud, *clusteredFlatSurfaces.at(i), centroid);
|
||||||
if(maxGroundHeight==0.0f || centroid[2] <= maxGroundHeight) // epsilon
|
if(maxGroundHeight==0.0f || centroid[2] <= maxGroundHeight || centroid[2] <= max[2]) // epsilon
|
||||||
{
|
{
|
||||||
ground = util3d::concatenate(ground, clusteredFlatSurfaces.at(i));
|
ground = util3d::concatenate(ground, clusteredFlatSurfaces.at(i));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3360,7 +3360,7 @@ void DatabaseViewer::update(int value,
|
|||||||
{
|
{
|
||||||
cloudViewer_->addCloud("ground", util3d::laserScanToPointCloud(scan), pose, QColor(ui_->lineEdit_groundColor->text()));
|
cloudViewer_->addCloud("ground", util3d::laserScanToPointCloud(scan), pose, QColor(ui_->lineEdit_groundColor->text()));
|
||||||
}
|
}
|
||||||
scan = LaserScan::backwardCompatibility(localMaps.begin()->second.first.first);
|
scan = LaserScan::backwardCompatibility(localMaps.begin()->second.first.second);
|
||||||
if(scan.hasRGB())
|
if(scan.hasRGB())
|
||||||
{
|
{
|
||||||
cloudViewer_->addCloud("obstacles", util3d::laserScanToPointCloudRGB(scan), pose, QColor(ui_->lineEdit_obstacleColor->text()));
|
cloudViewer_->addCloud("obstacles", util3d::laserScanToPointCloudRGB(scan), pose, QColor(ui_->lineEdit_obstacleColor->text()));
|
||||||
|
|||||||
Reference in New Issue
Block a user