slam_gmapping icon indicating copy to clipboard operation
slam_gmapping copied to clipboard

Why do laser scan values outside of maxRange get discarded?

Open juanluishortelano opened this issue 7 years ago • 3 comments

I am struggling to understand why .inf values from the laser scan are not used to mark the space as free space until the max range.

The attached image illustrates the issue. Why are do the v-shapes appear instead of a circunference around the robot that extends until the max range of the laser?

http://i.imgur.com/qDN4RT8.png

juanluishortelano avatar Mar 31 '17 09:03 juanluishortelano

I think this mainly comes from the design of gmapping - it was originally applied only to very long range lasers (50-80m), in which case, you rarely have out-of-range values, and when you do, it might be a closer object that is actually too low of reflectance to register a reading.

I don't remember exactly, but I think the library does not store separate clear/mark buffers the way that the costmap_2d does, so adding support for "clearing only" readings is probably quite involved.

mikeferguson avatar Apr 02 '17 03:04 mikeferguson

Would you be able to tell me in which part of the code that happens? I still struggle to see a good enough reason to discard all out of range values, I think having the option of not discarding them could improve the behaviour of the algorithm.

juanluishortelano avatar Apr 03 '17 07:04 juanluishortelano

This can be achieved by setting the parameters maxUrange and maxRange: maxUrange < maximum range of the real sensor <= maxRange:

Described here: http://wiki.ros.org/gmapping

~maxRange (float) The maximum range of the sensor. If regions with no obstacles within the range of the sensor should appear as free space in the map, set maxUrange < maximum range of the real sensor <= maxRange.

euronautic avatar Dec 10 '18 12:12 euronautic