A continuation of Reading the XV11 Neato Botvac LIDAR with the Raspberry Pi and C++, I’ve managed to get nonsense data to make sense pretty reliably and get that into an organized format the mapping functions can use. Basically, the robot looks for an existing map and either loads it or creates a blank template if it doesn’t exist yet. It starts itself in the middle of the map and is calibrated such that facing its dock is “due North” (if you’re used to cartesian coordinates). From there it scans and changes the working map to reflect the lidar data. For the moment I have to move it by commanding it myself, but it compensates for varying headings and locations within the map, and just adds the new scan data. Once I put all these (currently separate) mapping and navigation and sensor files all together, the idea is that the robot will run it’s own mapping missions during downtime – moving itself to check whatever location has not been checked yet (or has the oldest scan data) and scanning that area.