Though the original 4 m LIDAR is a great low cost LIDAR, useful for many caves, there are many others where longer range is needed. At the time the Caveatron was first being assembled, the 4-m Neato XV LIDAR was the only realistic option. Other existing scanning LIDARs cost thousands of dollars and lower cost time of flight sensor that could be used for a LIDAR would have required a tremendous undertaking to develop it into a scanning component, which was far beyond the effort I could undertake. The XV LIDAR does work quite will for such a low cost component designed for a different application so long as you understand and anticipate its range limitations. This involves careful observation while scanning to watch for areas that might be outside the scan range to give them coverage through additional scans or for larger rooms, to make multiple passes to cover its full width.
About a year ago, I came across a new LIDAR module called the Scanse SWEEP
which advertised as having 10 times more range than the XV LIDAR. Though considerably more expensive ($350 vs around $80-$90 for the XV LIDAR) the SWEEP was still far less than any other long-range option. At first, this looked like the answer to all that the Caveatron would ever need for a LIDAR scanner, but the challenge of integrating it proved things to be more complicated.
After obtaining one and starting to test it against realistic surfaces, it became evident that it had several limitations. First, the useable range was more like 25 m rather than 40 m, although this is still a huge improvement on the XV LIDAR and there aren’t that many caves where you would need to scan a ceiling in excess of that height. The second limitation is that its sampling rate is about 1000 Hz compared to about 1700 Hz for the XV, meaning that the SWEEP collects about 40% fewer points. Fortunately, the rotation speed is adjustable and by reducing it to 4 rotations per second, it was possible to obtain about a point approximately every 1.4º (as compared to a point per 1.0º with the XV). This just means you need to move a little bit slower with the SWEEP to get similar resolution. One thing that I consider an advantage over the XV LIDAR is that the sampling angle is random rather than a fixed angle. That helps compensate some for the larger angle between points by filling in the spaces rather than having fixed large gaps. Finally, the other limitation of the SWEEP is that its distance accuracy starts dropping precipitously below 1.3 meters. By 0.5 m the distance error can be nearly 20%. This results in the shape of surfaces becoming rather distorted and fuzzy at ranges less than 1 m. Since most caves have many passages on this size scale, this is a significant limitation if you want to do a truly complete scan. Fortunately, the XV LIDAR works very well at those distances with an error of only about 1% down to its minimum range of about 0.13 m. As such, the two LIDARs complement each other rather well.
Since the LIDAR module was already designed to be removable, the decision was easy to make LIDARs interchangeable as well and modify the system to accommodate either LIDAR and allow them to be interchanged in the field for whatever conditions are encountered. Mechanically, the SWEEP is smaller, allowing a new smaller enclosure designed. The SWEEP had another big advantage over the XV. Being a time-of-flight sensor, the shape of the window it looked out through was no longer a factor, so a curved dome could be used, finally allowing a full 360º view, avoiding the small corner obscurations present with the 4 m module. Electrically, the SWEEP uses only 5V as compared to the approximately 3V needed for the XV LIDAR (I saw approximately since it has to be tuned for each unit to get the rotation speed right.) Since 5V is a more general purpose voltage, the Caveatron design was modified to remove the adjustable 3V regulator from the main enclosure and replace it with a fixed 5V regulator to feed into the LIDAR connector. The adjustable 3V regulator was moved into the LIDAR module enclosure for the XV and the SWEEP does not require an additional regulator in its module. Fortunately, both LIDARs use Serial communications so they can use the same interface, but whereas the XV uses only one-way communication, the SWEEP has a much more complex protocol that is two-way. As such more pins were needed, so the connector was switch from 4-pins to 6-pins. This had another advantage of adding a 2nd SENSE pin so that it was possible to distinguish between LIDAR types immediately at power-on and load the correct parameters for that particular LIDAR type.
The biggest challenge was integrating the SWEEP LIDAR into the code. It uses a packetized data structure that is more complex to handle and also requires a multi-step initialization routine. Fortunately an Arduino library was provided but it was not thoroughly documented, the startup examples provided did not work and the library was missing any ability to handle the checksum that is at the end of each data packet. The library was modified to handle the checksums and after many attempts including having to figure out a way log the serial communications from the desktop viewer application they provided in order to debug the initialization process, it was finally working. Since the SWEEP’s scan rate was considerably different, the timing of the LRF and compass readings in relation to the LIDAR scans had to be revised and tested to ensure that there was no data loss. One persistent issue was buffer overflow but this was finally resolved by additional timing adjustments with how often a write was performed to the SD card. I also had to add capability for additional magnetometer calibrations to be stored as the LIDAR modules generated significantly different magnetic distortions. Finally once everything was working and debugged, I was able to test in a cave. The test went mostly well but uncovered yet another problem. The LIDAR would not initialize about half the time. After trying a number of options, I eventually noticed that unlike the XV LIDAR, you couldn’t just activate the serial port on system start but had to wait until the LIDAR was powered on. Once corrected, the SWEEP initialization has become completely reliable.
Further testing in caves has shown that the data from the SWEEP is noisier than with the XV, but produces more consistent data with fewer cases of dropouts or missed points. Adjustment to the post-processing program were able to significantly reduce the additional noise.
A plethora of new low-cost scanning LIDAR modules are becoming available – a far cry from just a year or two ago. Although these new ones are triangulation based and do not have the extreme range that the SWEEP has, they appear to be able to exceed 10 m in range at a cost similar to the XV LIDAR but more significantly have a much higher sampling rate – up to 10,000 Hz and higher rotation speeds, allowing denser and more detailed point clouds. I will start investigating these in the coming months to see if they can completely replace the XV LIDAR or at least can be a higher detail, intermediate range option.