Let's Make Robots!

Programming Head Movements


One goal with Walter is to get him to the "being a pet" stage. One major aspect to this is his head and its movements and the "personality" it adds. Walter has a 3-axis head, able to pan and tilt, with the "tilt" being not only an up-and-down movement but also the ability to tilt left-to-right --kinda a "huh?" motion. I of course, could simply code each move, with say, a for-next loop incrementing from one position to the next. This works but well but looks like a robot moving it's head. Instead, I use a teaching pendant that allows me to "puppet" the head while recording the moves to be played back later exactly the same way a painting robot is taught how to paint a car in a factory. This teaching pendant has taken many forms. I have made actual mini heads with pots instead of servos as well as virtual ones on-screen and moved by a mouse. 

In the past (when Walter was a Picaxe robot) I recorded these moves to EEPROM chips. Between the 4Mhz picaxe and the horrible write times of the EEPROM's, I ended up with very herky-jerky movements. Now with the Propeller chip onboard, and the incredible speed of the SD card, my resolution has skyrocketed. Add to that the abiltiy to plug a mouse directly into the Prop this eleminates the need to run a Processing app. and then send the data via BT to the robot. It is literally the simplest system I have made thus far, the fastest and the one with the least number of parts.

In the videos, you will see my first run at just getting the head to respond to the mouse and in the second video, see a recording being made and played back.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Wow this robot is going to be amazing when its done.

For a rough test, I did this with a wii and a hat and some duct tape. It did work, but it was really hard to smooth out the data from the accel. sensors. Bottom line: the way I tried it was very, very herky-jerky. This is not to say that one could not code some "smoothing" into the mix.

I think  I have a great idea for the heads movements ,you said you tried something with pots.

My idea is to make something like a helmet or a hat and put a 3-axis accelometer  on it and connect it to a microcontroller

and record the angles your head goes and in what speed on each axis somewhere(eeprom) and then read the angles in each axis from the eeprom and programm the servos to do the proper movements .(big sentence ah?)

Is this ok?

Great video and explanation on Walter's head movements Chris. Awsome robot with beautiful polish finish. Thanks for showing your progress my friend :)