Building an Open Source 3DOF Palletizing Robot Part 3
I spent most of the day doing paperwork – the business of business. When I finally got a chance to have some fun I started building an OpenGL simulation of my arm in Java using the Light Weight Java Game Libarary, or LWJGL. I love working with Eclipse because it does such a great job of catching so many errors. When I was younger I had to hit compile and wait for the machine to tell me what I did wrong. Now I can change the program on the fly and it just works. There’s still a long way to go before programming isn’t The Suck, but at least it’s not as awful as it used to be. Maybe one day we’ll reach the future of programming.
…but I digress! What you’re seeing on the screen is a model of the most important measurements of the robot: white is from the center of the base to the shoulder; red is the bicep; green is the forearm; and blue is the fingertip. if there was a tool it would be at the far end of the blue bit. I can use QWEASD keys to move the simulated motors, just like when I first started moving the real robot. The next goal is to make QWEASD move the finger tip and then use the Inverse Kinematics code to find the angle at each joint. This way I’ll also be able to see if the IK code is calculating the elbow in the proper location. From here I also plan to tie in a lot of Makelangelo code so I can use QWEASD to drive the robot in real time and have the simulation match the movements. From there I could record and playback movements. I think it would be pretty cool to have two arms dance together.
As an added bonus now that I have OpenGL + Java working I might finally be able to port over the windows simulation I wrote for my very first robot, SPIDEE-1.
Special thanks to Hackaday.com for linking to my work. If you know of a site that talks about robots, I’d really appreciate it if you share what I’m doing with them.
Edit: 5 hours later the OpenGL version has helped me track down a sneaky one word typo that was giving almost correct results most of the time. Moving in straight lines is greatly improved as the shoulder is now moving more correctly. The change has been committed to github.