December 29, 2010
Proposal of MoMo 0.9 with WiiDAR
|DVD Burner Laser diode - 650 nm ??mW||WiiMote $38|
|DVD Reader diode - 650 nm||WiiMote|
|Focused IR LED - IR beam flashlight|
|Key-Chain Laser 650 nm 5 mW $10||WiiMote|
Webcam $30 / OpenCV
|None||Webcam / OpenCV|
LK Optical Track
I have changed the title from WiiDAR to DIY SLAM because I'm more interested in the resulting simultaneous localization and mapping (SLAM). The WiiDAR hopefully will be a means to that end. When I entered the webcam entry in the sensor matrix, an old nagging thought came back to me. Which is, it's frustrating that I am turning an exceptional passive sensor (webcam) into a marginal active one (webcam + laser - ambient light). I will have to add some more passive entries.I recently acquired a wiimote and blue-tooth pc usb dongle. The idea being I might be able to create some form of simple LIDAR to do SLAM. In the past I have several experiments involving laser pointers and webcams. I have also previously utilized functions from OpenCV to create virtual models of some interiors.
In order to get some range information, I will need to find out what is available from a wiimote. There is a considerable amount of wii-hack information available. One of the greatest resources is wiibrew. They have many wii-hacking projects. I was interested in getting data from my device in Java on Linux. WiiBrew has created a listing of libraries to interface with the wiimote.
- wiiuse - this looks like a impressive and extensive C library that can work for more than one platform - I downloaded the source - I got the necessary parts to compile. The SDL graphics will not compile on my system, but I don't think I need it.
- CWiid - this was easy for me to install since it is in the Fedora repos - yum list \*wii\* - it connected and the example wminput worked. This was the first library I looked at but the wiiuse looks more powerful and is cross-platform
- WIIREMOTEJ - this initially looked promising, however - the README said you needed a JSR082 bluetooth implementation, which seemed problematic, and worse - it appears WiiRemoteJ is free but not open source, so I wont be using it
- motej - Yay! Apache open source. Nothing better, unfortunately... nothing is really there. There is no user doc, and no explanation on how any of the classes would work. There has to be some JNA or JNI interface, but its not mentioned. Beyond bleeding edge !
- WiiuseJ - sweet - I'll was planning to have to do this, but someone has already done it (and probably better!) JNI access to wiiuse
- wiimote-whiteboard - this looks like a nice & open source project - I downloaded it but it failed to connect to the bluetooth stack - another JSR082 problem probably
Downloaded WiiuseJ sample app. I can see it comes with binaries (libwiiuse.so & libWiiuseJ.so) . I compiled my own libwiiuse.so and it is already installed. I'll try the supplied libWiiuseJ.so, which "should" work since its just a simple java / jni interface library.
Wheeee ! - .so / .dll hell ! /usr/lib/libWiiuseJ.so: libbluetooth.so.2: cannot open shared object file: No such file or directory
Juggling binaries now ... wheee !
Yay ! substituted supplied so's made symbolic link to libbluetooth - app started ! (goodtimes)
Here is a data frame from WiiUseJ simple app example