Close

Baby steps towards better walking

A project log for mjbots quad

An open-source, affordable, dynamic quadruped robot

josh-pieperJosh Pieper 06/21/2020 at 14:010 Comments

The quad A1 is nominally capable of aggressive dynamic motions, but so far the only implemented gait that takes advantage of that is the pronking one:

Pronking isn't a terribly efficient means of moving, so I wanted to start working towards better walking and running gaits.  I'm taking baby steps for now, so this is just a start.  To begin with, I'm tackling just making low-speed walking on flat terrain better.

I went through my old video footage and identified a number of instances where things weren't working as well as they could:

What happened in all of these instances was that during the flight phase (when only 2 legs are on the ground), the body end up tipping far over, resulting in one of the flight legs hitting the ground much sooner than expected.  This causes all sorts of problems, since the leg isn't where the software expects it to be, and now the body has an even larger angular roll rate as the early foot pushes the body back up.

I figured it should be possible to at least maintain balance during the flight phase as a first step.  My initial experiments were just in 1d, with a python script and a matplotlib rendering:

The key idea was twofold.  First, to keep the integral of time spend on both sides of the balance point the same, and the second is that this is trivial to do if there is no acceleration during the flight phase, as it means the distance and time traveled by the center of mass is the same on both sides of the support leg (and in any event, my formulation of acceleration can't actually accelerate the robot stably during the flight phase).  The example in 1D above shows acceleration happening when both legs are on the ground, and the timing of the flight leg is selected so that at the current velocity, equal time will be spent on both sides.

I added a maybe-good-enough heuristic to handle the case where acceleration causes the velocity to reverse, which in that case causes the leg switching order to reverse:

At that point, I extended the algorithm to 2 dimensions, where rotational rate is considered as well as linear translation rate and implemented it on the robot.  This just treats the pairs of legs each as a single "virtual leg", and calculates the time required for the center of mass to reach the support line drawn between the two stance legs to decide when to lift those virtual legs.

The result is pretty good on flat ground.  A much broader range of maneuvers can be executed now without tipping:

Lots still to do, mostly to go faster and handle a broader range of terrains.

Discussions