Show HN: Lidar Obstacle Detection in 50 Lines of Go(bugfix-66.com)
bugfix-66.com
Show HN: Lidar Obstacle Detection in 50 Lines of Go
https://bugfix-66.com/eecd7c58653351b58c1ea1dd0c5feab80021ee16e4235dd7b8e6332923b55192?t=1
https://bugfix-66.com/eecd7c58653351b58c1ea1dd0c5feab80021ee16e4235dd7b8e6332923b55192?t=1
The lidar code (in an almost-C dialect of C++, a ROS node) appears to be written for the Velodyne HDL-32E. It operates in a series of stages, each stage refining the output of the previous stage. This algorithm is in the second stage. It is the primary obstacle detection method, with the other methods making only small improvements.
The leaked code uses a column-major matrix of points and it explicitly handles NaNs (the no-return points). We've rewritten it to use a much more cache-efficient row-major matrix layout and a conditional that will ignore the NaN points without explicit testing.
This is an amazingly effective method of obstacle detection, considering its simplicity. We've tested this using a VLP-32C lidar, user manual here if you're interested:
https://icave2.cse.buffalo.edu/resources/sensor-modeling/VLP...