I purchased another Dynamixel AX-12A servo for each leg to give me eight degrees of freedom (DOF) in total. The hope was that this would result in a much more life like walking gait. Whilst ordering the servos, I also bought some more Robotis plastic frames to ease bolting this lot together.
The new servos and frames were fixed together similar to the previous design, but now with an enhanced ankle joint. With 8 DOF, I could no longer work out joint ankles in my head. It was time to break out some inverse kinematics!
Designing a walking gait from scratch is not that simple. I started by watching how people walk and tried to establish some simple rules I could emulate in code. My first observation was that humans have a really efficient walking gait. Our bodies carry a large mass above the waistline and we tend to keep that fairly stable whilst walking.
Rule #1: The robot’s hip height should remain constant.
Secondly, we raise and lower our feet very smoothly, just enough to achieve forward movement, which peaks in the middle of our stride.
Rule #2: The robot’s feet should follow clipped sine wave.
With these two rules established I could now generate a system of triangles to calculate all servo positions at each point of the stride. I could solve any missing angles using the law of cosines. To help me with this job I wrote a C# application to crunch the numbers and visualise the task. The result was a [52, 8] matrix of servo positions that I could paste into a very small Arduino program.
I will walk through the C# application in detail in my next post.
The resulting Arduino code is posted below. Like before, the program refers to my Dynamixel class created in a previous post.
I’m really pleased with the results. Here is a video of my new 8 DOF biped walking across a glass table - it looks and sounds pretty sinister…