sensor_msgs/LaserScan.msg ==> range_max should be discarded
Hi all, I have been dealing with slam_gmapping package and I have reached good results so far.(I created my map by the package) But I have a question about sensor_msgs/LaserScan.msg specifically. For describing my problem a lot faster, I want you to look at the picture below. In the picture, you can see my /scan topic and a view of Rviz. When you look at the /scan topic, I selected some of those ranges data where start off with the value of 65.53399. You can clearly see the relevant points in the Rviz screen too since they are far away from average measurements. As I pass such scan data into slam_gmapping package, the map is not created well.
I believe that the value of 65.53399 in the /scan topic is used for failed scan data or something like that. I should not take these measurements account in the context of creating a map. But how? In the LaserScan.msg there is an explanation goes like that:
float32[] ranges # range data [m] (Note: values < range_min or > range_max should be discarded)
What I should understand of discarding data in the ranges std::vector? What value I should give for such failed/max data instead of leaving them as they are? Any idea or useful links? Thank you all in advance!