Nov 2, 2010

Android is smoking

This is my first Android development test using the NDK and OpenGL-ES. I quickly adapted some simulation code I found on the web and rewrote the rendering layer to make it compatible with OpenGl-ES. I also fixed a couple of bottlenecks to make it run faster. Here's a video of the result.



So far I like working with the Android NDK and OpenGL-ES although I'm not a big fan of the Eclipse IDE (development environment). Now I'm going to start a shippable project to really get the feel for this new platform.

Snow balling

I admit I'm still buying Legos and a vast majority of those are Lego Technics and Mindstorm that I use for prototypes and robots. But, from time to time like any 37 year old kid, I get a kit simply because it looks cool. Hence I have the Lego X-Wing.

This magnificent piece of design dating from the back-when-lucas-was-good era was siting on my work desk and my son, playing with it, said “Dad, can you make the ladder to climb in?”. Any reason to get my Legos out is a good reason, so Voila!



My son was happy but, like any good geek would, he had the obvious thought; what about the cane gizmo to get R2 in and out of the ship? The clouds parted and a ray of light beamed down on me. I was so ready for his demand... maybe I was too ready.
Not only did I built it but I made a working version using Lego Mindstorm motors and the remote control.



The rotation is powered with gears and the up-down motion is done with a pneumatic piston and a switch to select up or down (directing the air flow to the top or bottom of the piston). This extra manual step will come back to haunt me latter.
After watching my son playing with the crane for a bit, it was apparent that it's reach had to be improved. After all, I could still plug a third motor to the system. Some minutes latter version 2 was alive.



The base is resting on gliding 'skis' and stays in place because two of them are sitting in a groove. One side of the groove serves also as the row of teeth used by a gear (attached to the crane base) to pull or push the whole system. This gear is using a pulley system and so it just slips if the kids reach the end of the tracks (no grinding gears). The pneumatic switch had to be repositioned so that it would not jerk the whole assembly every time it's used (that switch is a real pain). Finally. the arm of the crane was also lengthened.
The kids (and I) played with that version for days. I added a weight in the back to prevent the 'gliding gear' to skip. This is the final version of this design:




In conclusion
The main problem with this crane is the pneumatic switch. All the other movements are made with the remote and the switch make the experience of using the crane awkward.

A second important point is to make it error proof. The pneumatic piston system and the pulley system permit the errors in the crane manipulation without breaking anything. On the other hand, the direct gears that are used to rotate the crane can skip, grind or break if something goes wrong. Also the tubing for the piston prevents the crane from doing a continuous rotation and could rip of. (We had a terrible accident where Han Solo was thrown across the flight deck...)

So the next project will be a new crane with a completely different design that can lift heavier loads and where all the controls are done using the remote. This system will also be error proof by using systems like:
* Pulleys
* Slip gears
* Automatic reverse

“Gentleman, we can rebuild it. We have the technology. [...]”