diff --git a/src/laser_geometry.cpp b/src/laser_geometry.cpp index fa9ea8c..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]; @@ -515,7 +515,7 @@ const boost::numeric::ublas::matrix& LaserProjection::getUnitVectors_(do //ensure that we use the correct timestamps channel_options |= channel_option::Index; - projectLaser_(scan_in, cloud_out, -1.0, channel_options); + projectLaser_(scan_in, cloud_out, range_cutoff, channel_options); //we'll assume no associated viewpoint by default bool has_viewpoint = false;