This paper explores the benefits of using multiple gaits in a single robot. Inspired by
nature, where humans and animals use different gaits to increase their energetic economy,
we analyzed how increasing speed affects the choice of gait, and how the choice of gait
influences optimal speed. To this end, we used optimal control as a tool to identify
motions that minimize the cost of transport of two detailed models: a planar biped and a
planar quadruped. Both of these models are actuated with high compliance series elastic
actuators that enable a rich set of natural dynamics. These models have damping in their
springs, feet with mass, and realistic limitations on actuator torques and velocities.
They therefore serve as an intermediary between past simpler models and hardware. We
discovered optimal motions with an established multiple shooting implementation that
relies on pre-defined contact sequences, and with a direct collocation implementation in
which the footfall pattern was an outcome of the optimization. Both algorithms confirmed
findings from biology. For both models, changing gaits as speed varies leads to greatly
increased energetic economy. For bipeds, the optimal gaits were walking at low speeds,
grounded running at intermediate speeds, and running at high speeds. For quadrupeds, the
optimal gaits were four-beat walking at low speeds and trotting at intermediate speeds. At
high speeds, galloping and trotting were the best gaits, with nearly equal performance. We
found that the transition between gaits was primarily driven by damping losses and
negative actuator work, with collisions playing a relatively small role.