Hi Robot builders!
If you are searching for an OS for your robot, have a look at Femto OS: http://www.femtoos.org/
This OS is so small it fits on all ATtiny's so on the ATmega640
there will be a lot of space left for your own stuff. It is GPLv3,
[ this is not a commercial plug
] so why not give it a try?
I love to hear who made his robot running on this OS.