I just finished the second version of my device for distance measurement. Took me more than a year to finally come back to this fun little project, though. Now I am using a line laser instead of a regular laser pointer. This enables us to map all objects in a horizontal row simultaniously, so you could use this to avoid obstacles for example :)
To be honest: This was one of these projects that are in an "almost finished" state for about a year. This annoyed me more and more and I am so happy that I can finally get this off my list. Don'T get me wrong - it was a very interesting project. I am really happy with the outcome and I learned a lot in the process. But posting this now, is such a relief :D
More about the project
The project was kind of born when I bought my first quadcopter. Initially I had the insane idea of building something that could fly the quad inside our appartment. To achieve this I needed to know where it was. I bought a GPS signal that I could use outside, but for indoor I needed something different.
During my research I found Lidars are pretty good at measuring distances to objects, but they are also very expensive. That was when I stumbled on the paper of Todd Danko where he described distance measurement with a laser pointer and a webcam. So I created my first device and posted it on reddit. I received quite a lot of feedback and really wanted to keep on going. But then there were other interesing projects and this one stayed in an unfinished state for way to long. I moved and developed a huge interest in cryptocurrencys (especialls Gridcoin).
I posted the first video here on Steemit to force me to finally finish it, so I could deliver the second part (as I promised). It worked out in the end and now I am really happe with the result.
You can find the code on GitHub by the way if you are interested. It is specific to my very own setup though, so you will have to adjust the trigonometry part to your specific settings (distance of cam to laser, FOV of cam and so on).