CmdrDats / igoki

Clojure Go Kifu recorder and OGS player
Eclipse Public License 1.0
161 stars 16 forks source link

Laser pointer method for feedback onto the board #65

Open diegocepedaw opened 3 years ago

diegocepedaw commented 3 years ago

I recently tried to take on this same issue and I created a prototype that uses a laser mounted on two servos to point at the point on the board the computer wishes to move to. You can see it in action here https://imgur.com/gallery/Q6CIae2 and look at the source code here https://github.com/diegocepedaw/lasergo. Since this project was a huge inspiration and seems much more mature I figured I would bring it up in case you wanted to give this approach a try.

CmdrDats commented 3 years ago

very cool, thank you for sharing! I might try put this together and give it a shot - only thing I'm lacking is a laser pointer xD my primary aversion is figuring out the calibration and how to turn the laser on and off. Do you have any docs on the rough maths you used to calibrate and convert the point into servo angles?

diegocepedaw commented 3 years ago

Currently, I'm only using a rough estimate by moving the laser pointer 1 degree and comparing the new position of the laser with the old and moving towards the target bit by bit but I was thinking of having the laser initially calibrate by visiting 4 points on the board after which the same 4 point perspective transform that is used to get a top-down view of the board could be used to get an accurate mapping of servo position to position on the original image.

As far as the laser, I just settled on it being always on and moving off the board after the computer's piece has been played. Btw I used these laser diodes wired directly to a 5v power supply I had lying around they were super cheap and worked great https://www.amazon.com/HiLetgo-10pcs-650nm-Diode-Laser/dp/B071FT9HSV/ref=cm_cr_arp_d_product_top?ie=UTF8