mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 09:17:47 +08:00
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:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user