Terrain-Aware Quadrupedal Locomotion via Reinforcement Learning