Friday, December 31, 2010

Neato + SLAM

Here is yet another story for "the power of open source."

I've been spending quite a bit of time working on SLAM with the Neato XV-11 using both the built in laser and the Hokuyo URG-04LX-UG01. I had pretty much given up on gmapping working with the Neato -- until earlier today we found an issue with the scan angle increment computation in gmapping not working with the Neato laser specifications. I probably wouldn't have found this bug had it not been for a user of the Trossen Robotic Community pointing out some issues he was having with gmapping, as my version still had some modifications from my PML work earlier this year.

Anyways, for anyone wanting to use gmapping with the Neato robot, you can apply the following patch:

- gsp_laser_angle_increment_ = (angle_max - angle_min)/scan.ranges.size();
+ gsp_laser_angle_increment_ = scan.angle_increment;

to slam_gmapping.cpp. This uses the angle_increment from the laser scan, rather than the computed one, which is incorrect for full rotation scans. This will avoid issues with the scan being improperly inverted, and issues with scan matching.



  1. Hello,
    To be clear, this patch should be applied for anyone using the Hokuyo URG-04LX-UG01 that wants to use the GMapping node? Can you post your launch/config file for the hokuyo and gmapping?

  2. No the patch is only needed for the Neato Laser (which has 360 degree rotation). Launch files can be found in the maxwell_navigation package (part of fergy-ros-pkg)

  3. Just a note, this patch was incorporated into the Electric release. See