arXiv:2610.24895cs.ROOct 2026

Manuscript Offprint

arXiv:2610.24895

Anticipatory Gait Switching for Quadrupeds via Look-Ahead MDP Planning

Kelvin Aladum, Justin Peel, Nisar Ahmed

Kelvin Aladum 1^{1}, Justin Peel 2^{2}, Nisar Ahmed 1^{1}

Abstract—Quadruped robots often switch gaits to traverse mixed terrain safely. Many practical supervisors enforce hardware constraints (e.g., dwell or guard intervals) using a transition handler. However, the switch decision itself is often driven by near-field thresholds, which can delay commitment when rough terrain is only detected shortly before contact in the local height map. We propose a lightweight height-map-only gait supervisor that unifies look-ahead and locomotion constraints in a single decision policy. A robot-centered height map is partitioned into near-, mid-, and far-field bands, each discretized into a terrain class, and band evolution is modeled as a Markov process. Gait selection is cast as a look-ahead Markov Decision Process whose transition model and cost explicitly encode platform-specific switching constraints. Indoor and outdoor experiments on a Unitree Go2 platform show reduced late switching, lower time spent using ineffective gaits on rough terrain, and improved roll stability compared to tuned reactive baselines. Overall, the MDP formulation yields anticipative constraint-aware gait switching that improves robustness without course-specific retuning.

I. INTRODUCTION

Legged robots often operate over terrain that changes within a few steps, from flat ground to curbs, stairs, rubble, or uneven outdoor surfaces. Quadrupeds handle this variability by switching among locomotion gaits with different tradeoffs in speed, stability, and clearance. Trotting is efficient on smooth ground but can become risky on rough terrain due to foot scuffing and body impacts. Climbing or stair gaits improve clearance and stability but are slower and inefficient when used unnecessarily.

A central challenge is not only how robots should walk, but when their manner of walking should change. Existing systems either rely on rich perception and learned policies for terrain-aware locomotion [1], or use perception-driven heuristics that trigger gait switching from local terrain cues [2]. Here, reactive switching refers to gait switching decisions driven by instantaneous local cues rather than look-ahead, cost-aware planning. On physical platforms, reactive switching can be unreliable when gait transitions are disruptive or delayed by onboard controller logic and safety checks [3].

This issue is pronounced on the Unitree Go2 studied in this work, where gait switching is asymmetric. Switching from climb to trot is essentially seamless. In contrast, switching from trot to climb requires the robot to stop and wait for the gait to engage. If it does not, the transition can be poorly handled and lead to stumbling. In some cases, the command is ignored and the robot continues trotting. Simple reactive threshold rules can enforce conservative stop-and-wait behavior, but they do not decide when it is worth paying

Figure

Fig. 1: Banded look-ahead from a local height map enables anticipative trot-climb switching.

the transition cost based on what lies ahead. Height maps from low-cost LiDAR can also be noisy and can overestimate obstacles in vegetation such as tall grass, which can trigger unnecessary switching to climb gait.

To address this, we propose a lightweight gait switching supervisor for LiDAR-enabled quadrupeds that uses an instantaneous robot-centered height map and makes gait switching decisions using a Markov Decision Process (MDP). Fig. 1 provides an overview of the proposed pipeline. The forward height map is partitioned into distance bands that provide a compact look-ahead representation. Each band is summarized into a discrete terrain class using robust elevation statistics, and uncertainty in the band evolution is captured in the transition model. The resulting MDP explicitly accounts for asymmetric switching latency and produces an offline-computed policy for online gait switching.

The main contributions of this work are:

• A height map only, anticipative gait switching supervisor that requires minimal sensing and is compatible with existing gait controllers;

• An MDP formulation that models asymmetric gait transition latency, including a dwell state for trot-to-climb switching, and yields a compact optimal switching policy solved offline;

• An empirical indoor and outdoor evaluation on the Unitree Go2 comparing the proposed look-ahead MDP policy against a tuned hysteresis baseline, demonstrating improved switching behavior under real transition constraints.

We describe related work and our problem formulation in Sec. II. Sec. III-B describes the height map processing and band abstraction technique and Sec. III-C presents the

MDP model and offline optimal solution procedure. Secs. IV and V evaluate the approach in representative mixed-terrain experiments.