From 87912d2ff9c55ad94b752103b3b2ced2f34d18cf Mon Sep 17 00:00:00 2001 From: Demonmasterlqx <183842220@qq.com> Date: Sun, 6 Apr 2025 19:20:57 +0800 Subject: [PATCH] Update lidar_node.cc Due to the lidar will get the point cloud of chassis itself, I add a lower bound to correct it Signed-off-by: Demonmasterlqx <183842220@qq.com> --- ionic/tutorials/sensors/lidar_node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/tutorials/sensors/lidar_node.cc b/ionic/tutorials/sensors/lidar_node.cc index 7b6e744583..f6ae0648e5 100644 --- a/ionic/tutorials/sensors/lidar_node.cc +++ b/ionic/tutorials/sensors/lidar_node.cc @@ -33,7 +33,7 @@ void cb(const gz::msgs::LaserScan &_msg) bool allMore = true; for (int i = 0; i < _msg.ranges_size(); i++) { - if (_msg.ranges(i) < 1.0) + if (0.85<_msg.ranges(i) && _msg.ranges(i) < 1.5) { allMore = false; break;