Only segement obstacle that are at least 0.8m away, this is a hack to remove noisy reading AND the fact that we don't clear the costmap when something is closer than 75cm from the robot

This commit is contained in:
JRombouts
2015-07-13 13:27:37 -07:00
parent f75744217c
commit b98cff41e3
2 changed files with 1 additions and 5 deletions
+1
View File
@@ -216,6 +216,7 @@ private:
pcl::PointCloud<pcl::PointXYZ>::Ptr hypotheticalGroundCloud_back = rtabmap::util3d::passThrough(originalCloud_back, "z", std::numeric_limits<int>::min(), maxFloorHeight_);
obstaclesCloud = rtabmap::util3d::passThrough(originalCloud, "z", maxFloorHeight_, maxObstaclesHeight_);
obstaclesCloud = rtabmap::util3d::passThrough(obstaclesCloud, "x", 0.8, std::numeric_limits<int>::max());
//STEP 1.
rtabmap::util3d::segmentObstaclesFromGround<pcl::PointXYZ>(hypotheticalGroundCloud_front,
-5
View File
@@ -169,7 +169,6 @@ private:
if (special_filter_close_object_){
cv::Mat pRoi = image(cv::Rect(int(0.05*(float(cols))),int(0.05*(float(rows))),int(0.9*(float(cols))),int(0.9*float(rows))));
//cv::GaussianBlur(pRoi, pRoi, cv::Size(3, 3), 0, 0);
cv::medianBlur(pRoi, pRoi, 3);
//Do filter of close objects
@@ -186,10 +185,6 @@ private:
}
}
}
image_geometry::PinholeCameraModel model;
model.fromCameraInfo(*cameraInfo);
float fx = model.fx();