From 784a37caf7391834d937dfe9fd30dc41d34f6be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20R=C3=B6hling?= Date: Fri, 25 Oct 2013 11:26:21 +0200 Subject: [PATCH] Treat max_range as invalid measurement The stage simulator and the legacy projectLaser_ method for sensor_msgs::PointCloud treat the max_range/range_cutoff value as invalid, and so should the projector for sensors_msgs::PointCloud2. --- src/laser_geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/laser_geometry.cpp b/src/laser_geometry.cpp index fa1b88a..2e2befe 100644 --- a/src/laser_geometry.cpp +++ b/src/laser_geometry.cpp @@ -424,7 +424,7 @@ const boost::numeric::ublas::matrix& LaserProjection::getUnitVectors_(do for (size_t i = 0; i < n_pts; ++i) { //check to see if we want to keep the point - if (scan_in.ranges[i] <= range_cutoff && scan_in.ranges[i] >= scan_in.range_min) + if (scan_in.ranges[i] < range_cutoff && scan_in.ranges[i] >= scan_in.range_min) { float *pstep = (float*)&cloud_out.data[count * cloud_out.point_step];