Closed g-gemignani closed 8 years ago
The number of scans should be calculated from min_angle, max_angle and angle_increment as stated in the LaserScan-Message from ROS. Have you checked whether these values are correct? This might even be a fence-post-error.
Thank you for the quick reply. I am not sure if I understood correctly. I checked if the messages sent from the bag are correct. These messages have the following parameters (I got them by echoing the topic on which they are published): angle_min: -1.96349537373 angle_max: 1.96349537373 angle_increment: 0.00872664619237 which give me: 449,999995519 messages. I also checked in those messages if there were too many range readings but I still got the correct number (450)... Thanks again!
If you have 450 segments [(max-min)/increment] in your scan-range, that means you should have 451 scans. (There is a scan at each end of the interval, see here: https://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error)
So your scans should indeed contain 451 scans.
Thank you for your replay. Then, I guess that the pull request that I created is not correct. I now suspect that there might be something wrong in the laser drivers that I am using. (maybe they are truncating [(max-min)/increment]). In any case, thank you so much for your help, I am now able to use the mapper. Cheers, Guglielmo
Hello, I was able to run the third tutorial, mapping the example world provided in simulation. At this point, I tried to create a map playing a bag recorded with our robot (the bag seems ok since I was able to use it both with hector_slam and gmapping). The launch file adopted is the following:
where ros.yaml is:
and mapper.yaml is:
However, when I run the launch file, I repeatedly get the following error:
Am I missing something or there is a problem with the code? Thanks!