Control of a quadrupedal manipulator using hierarchical inverse dynamics