Low Cost DIY Bipedal
This is my second robot.
This bipedal is made with 12 low cost servos (MG995), 4 atmega168, aluminium material for window frames, and with small hand drills, hand saws and files.
It is still in progress. I would like to remote control it first, and later to have it self-navigate in the house. Will post to show how to make it. But you can check out also in my blog :
In the planning stage, I actually possessed very limited knowledge in controlling servos. I knew that I need powerful servos. Thus I got some TowerPro MG995 to play around. I started by writing a simple servo controller, which supports group movement. I mean that a group of servos to move together to various positions within a fix period.
After that I realized MG995 is too shaky for bipedal robot. I go immediately to try out openservo software. This fix the problem and bring me quite a number of skills, like TWI communication, TWI bootloader, etc.
It is a big question mark to me on how to mount a servo. I don't want to drill holes on the servo and have no budget to buy the nice looking mounts on the net. Finally I figure out the way to make the mounts and the cross joint from aluminium window frame material. It is low cost, easily crafted, strong enough for robotic usage:
It would be nice to have autocad or similar tools to simulate the design before actual development. Of course, I don't have the money and I don't want to use illegal software, usually. Python is my primary development tools on PC side robotic development. Thus I try the vPython 3D package and it is surprisingly easy to use. However, vPython is just a simple 3D presentation tool. I added the pyODE (a physical engine) so that I can model a robot in a physical world:
Later, I found out that it is just a nice-to-have tool in robot development. I will tell you later why. But the simulator does help me to visualize the robot before I build it. Also, it helps me to develop the first version of the sequencer, which is very important in later development. More info
How to walk
The first step to walk is to shift the CG (center of gravity) to one leg, and lift the other leg up. This is very simple task to human being but a bit tricky to a robot. It is because of the control logic on your servo can deal with itself only. Usually a servo uses control logic like PID You specific a position, the servo will move to the position precisely at the maximum speed but not overshoot. When a bipedal robot is built, the overall weight will be a big burden to your servos. Thus the servo is always at certain offset from the target position that you specified. The situation is more serious when the robot is standing on one leg, when walk upstairs and etc.
This is why I said a simulator is not very useful at this stage. It is because it is hard to simulate this situation for a real robot that may have different minor defects in physical structure and servos performance. It is also why you would like to use powerful servos instead of the small one.
On top, you will need to control your servos to move at a predefined speed/timeslot and synchronized them. It will rely on your servo controllers (or openservo already support it). I also recommend to have curve motion function if you want a more natural and fast motion. Curve motion means your servo can move non-linearly. e.g. move more initially and gradually move to the target slowly. Openservo supports beizer curve motion, which I think a bit complicated to use. I've made a semi-circle-like curve motion (check the blog for more information if you want to).
To walk naturally, here is a good reference link. I would say minimize the shifting of the CG (center of gravity) of your robot will be a key. It also minimizes the energy lost when the robot walks if the CG is kept at constant level.
How to work fast
From the first walking sequence @ 6 second per step, to the latest working sequence at 0.55 second per step. The improvement is not only from the optimizing each movement of the servo, but also overcome the bottlenecks between the communication paths to the servo.
On average it takes 4 sets of 12 servo movement to complete one walking step. If you are using a 9600 bps link, and a send and acknowledge protocol, the max data rate is no more than 600 bytes per second. Thus your servo controller must support a batch mode in specifying servo movement (allow setting of 12 servo together in one command.).
If one servo command is 3 byte, here is a simple comparison of 4 set of 12 servo commands to send:
Your controller support batch commands: 4 x 12 x 3 / 600 = 0.24 seconds
Your controller does not support batch commands, so each commands has to be acknowledged: 0.24 x 12 = 2.88 seconds
On the other hand, if your controller supports a one way protocol (no acknowledgement required), the situation will be much better. It takes 0.12 seconds to complete in both case.
Still, if your controller does not support batch mode, the different between first servo command and the final servo command may be more than 0.06 second. This is significant to demage the walking sequence. A high speed link is recommended in this case.
Thus pay attention to the controller design and speed of communication. High speed, batch commands, curve motion, linear motion, and high speed servos are the keys to archieve fast walking.
Robot Simulator Source Code
I have packed the source code for your download at http://code.google.com/p/clrobotsim/
To be continued....