Close

LIDAR Compass: Live Feedback

A project log for 2020 HDP Dream Team: CalEarth

The 2020 HDP Dream Teams are participating in a two month engineering sprint to address their nonprofit partner. Follow their journey here.

alexwhittemorealexwhittemore 08/10/2020 at 22:330 Comments

Last week, I showed the LIDAR system "verifying" a straight wall by printing out 1s and 0s to a terminal, to denote whether the distance measurement at that angle was "correct" to within +/- 2cm for a straight wall orthogonal to the 0* line from the LIDAR.

This is that same test, but running with a live visualization I put together using Python and Matplotlib. Blue-colored points are the "correct" distance assuming the infinite wall, while red points are "incorrect." You can see that as I rotate the LIDAR, the wall drifts in and out of "correctness." as more or fewer points fall within the +/- 2cm tolerance. 

It turns out, it's PRETTY hard to repeatedly update a Matplotlib plot in a performant way that doesn't take a ton of processing time away from your main run loop. Most of the effort to achieve this was fixing performance issues with mpl.

It may not seem like much (it doesn't to me), but this represents SIGNIFICANT effort towards the end-goal of live pass/fail feedback via laser.

I'll try to post code publicly ASAP.

Discussions