  In this letter, we present a versatile hierarchical offline planning
algorithm, along with an online control pipeline for agile quadrupedal
locomotion. Our offline planner alternates between optimizing centroidal
dynamics for a reduced-order model and whole-body trajectory optimization, with
the aim of achieving dynamics consensus. Our novel momentum-inertia-aware
centroidal optimization, which uses an equimomental ellipsoid parameterization,
is able to generate highly acrobatic motions via ``inertia shaping". Our
whole-body optimization approach significantly improves upon the quality of
standard DDP-based approaches by iteratively exploiting feedback from the
centroidal level. For online control, we have developed a novel convex model
predictive control scheme through a linear transformation of the full
centroidal dynamics. Our controller can efficiently optimize for both contact
forces and joint accelerations in single optimization, enabling more
straightforward tracking for momentum-rich motions compared to existing
quadrupedal MPC controllers. We demonstrate the capability and generality of
our trajectory planner on four different dynamic maneuvers. We then present one
hardware experiment on the MIT Mini Cheetah platform to demonstrate the
performance of the entire planning and control pipeline on a twisting jump
maneuver.
