Lidar scanning on the Raspberry Pi

Tom Jacobs
2 min readJul 17, 2017

Resuming the work from yesterday’s XV lidar post, I tried the Visual Test lidar.py script, which uses VPython to display the live scan.

It worked a little better, showing this map:

The red dots are coming from inside the house.

But it didn’t respond very quickly to changes. I waved my hand there, and placed objects near it, and they’re not very quickly reflected on screen. I did rotate the lidar and saw the three wall segments rotate within a few seconds, so that’s encouraging.

I suspect it’s a matter of the VPython 3D renderer not being able to render the scene quickly enough. Zooming and panning with the mouse was very slow too. And the whole Raspbian OS ran like an asleep dog while it was rendering; that is, it didn’t really get very far.

So next up, finding a way to quickly render a 2D live-updating map of dots from Python with minimal CPU usage. Matplotlib might be the answer here when it’s working on the Pi.

Half the time of this sort of development is just getting dependencies installed and running properly…

--

--