A basic walking motion

Your robot is poised to walk, however, you first have to get a leg off the ground. Of course, that is easy enough; if you simply lift the leg by changing the angle of the knee joint, your leg can get off the ground. You may also want to change the angle of the front to back ankle; this will allow you to lift the leg without raising it quite as high.

However, you'll have a problem if you change just these two servos; as you lift the leg, your robot will fall over. This is due to a simple principle called the center of gravity. When your robot is at rest, your center of gravity looks like this:

A basic walking motion

It is clear that if you lift a leg, ...

Get Raspberry Pi: Amazing Projects from Scratch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.