#347 Bug in laserrescan driver

3.1.0
closed-accepted
Rich Mattes
player (137)
5
2014-02-18
2010-12-02
Black Ivory
No

If the laserrescan-driver is used to generate an interpolated scan with an angle that doesn't completely overlap the angle of the original laser-range-finder it generates values for single beams (the first one) which are over 600 meters.

example:
original scan( min_angle -1,57 max_angle 1,57, scan_count 511)
interpolated scan( min_angle: -1,5708 max_angle: 1,5708 scan_count 181)

This large value produced crashes of other drivers for mapping (usually bad_allocs)

My solution:
- fixed the bug that produced the really high value (caused by casting from small negative value to unsigned int)
- print a warning of the angles of original and interpolated scan don't overlap completely.

I don't know what format to use for patches so I attached my complete version of laserrescan.cc

Discussion

  • Black Ivory
    Black Ivory
    2010-12-02

    patched version of laserrescan.cc

     
    Attachments
  • Rich Mattes
    Rich Mattes
    2014-02-18

    • status: open --> closed-accepted
    • assigned_to: Brian Gerkey --> Rich Mattes
    • Group: --> trunk
     
  • Rich Mattes
    Rich Mattes
    2014-02-18

    Not winning any awards for response time, but I've applied your fix as r9138. Thanks for the report!

     
  • Rich Mattes
    Rich Mattes
    2014-02-18

    • Group: trunk --> 3.1.0