Hi, I’m the one to blame for the spikes on 4.1 (changes and reasons described here)
In my personal experience with the TeraRanger sensors, they don’t have the precision to read with high accuracy under 50cm because their infrared beam is quite diffuse. They report an “unable to measure” flag when the distance is unreadable (different from being “too close”), which is currently handled in 4.1 by returning an out_of_range_high value (i.e. 60m + 1m, which is the distance displayed in the log above). Actually, from the log the status of the rangefinder is correctly updated when those peaks are shown. Before 4.1, the reading was simply not handled, so it was normal for a log to not display anything without any measurement. This is how the Benewake driver operates as well if I’m not mistaken. I haven’t looked much in the Terrain library, but it should report a “Terrain Unhealthy” status when processing this too high reading.
@rmackay9, as explained I am able to reproduce the peaks (61m) when the sensor fails to read the distance, and mainly, the rangefinder status is correctly updated. While I think the behavior is correct at the moment, displaying these spikes may not be appropriate, especially for log analysis… In any case, I do not perceive any steps when I slowly move the sensor away from an obstacle as @buckker sees them, so this might be the main problem here (Although it’s very dependent on the surface pointed by the beam). I intend to use a TeraRanger for terrain following in the upcoming weeks, so I can manage some tests if you like.