ignore measurements outside lidar range#544
ignore measurements outside lidar range#544981213 wants to merge 1 commit intoSteveMacenski:ros2from
Conversation
|
|
||
| m_UnfilteredPointReadings.push_back(point); | ||
| if (!math::InRange(rangeReading, pLaserRangeFinder->GetMinimumRange(), | ||
| pLaserRangeFinder->GetMaximumRange())) |
There was a problem hiding this comment.
The rangeThreshold is always less than GetMaximumRange so this is already true. You can revert these changes
| for (kt_int32u i = 0; i < pLaserRangeFinder->GetNumberOfRangeReadings(); i++, beamNum++) { | ||
| kt_double rangeReading = GetRangeReadings()[i]; | ||
| if (!math::InRange(rangeReading, pLaserRangeFinder->GetMinimumRange(), rangeThreshold)) { | ||
| if (rangeReading < pLaserRangeFinder->GetMinimumRange()) { |
There was a problem hiding this comment.
Why not using that InRange line that was there before math::InRange(rangeReading, pLaserRangeFinder->GetMinimumRange(), rangeThreshold)? This seems to remove the far-check
According to the comment in sensor_msgs/LaserScan, values < range_min or > range_max should be discarded. Without this, scan matching will fail for lidars publishing 0 for invalid measurements.
|
I moved the filtration outside karto_sdk in the latest iteration. The scan matching is fixed in both the old and this version, but loop closure still doesn't seem right with my half-blocked lidar. I placed a second lidar on top of the half-blocked one to do some comparison. Here's my robot setup: It would be great if someone can give me some suggestions on debugging. /scan is the half-blocked lidar and /scan2 is the one on top. |
|
Fixed with the latest commit, but I'm not sure if it's the correct fix because I haven't actually understood how ScanMatcher works yet. edit: dropped this. I should simply lower the threshold in config file instead. |



According to the comment in sensor_msgs/LaserScan, values < range_min or > range_max should be discarded.
Without this, scan matching will fail for lidars publishing 0 for invalid measurements.
Basic Info
Description of contribution in a few bullet points