Learning Locomotion on Discrete Terrain
via Minimal Proximity Sensing
June 30, 2026
Learning-based control has revolutionized dynamic locomotion, yet navigating unstructured terrain remains limited by a robot’s incomplete awareness of imminent ground contact. While global perception systems such as LiDARs and depth cameras provide environmental context, they are frequently plagued by latencies, occlusions, and the high computational cost of dense geometric reconstruction. On the other hand, proprioceptive feedback is purely reactive, initiating corrections only after impact has occurred. This work explores embedding a minimal suite of low-cost, high-frequency infrared proximity sensors directly into the feet of a quadrupedal robot. These sensors provide “pre-contact” feedback that is robust to self-occlusions and significantly less computationally demanding than conventional vision-based pipelines. By integrating these localized signals into a reinforcement learning framework, we enable the robot to anticipate terrain discontinuities such as gaps and stepping stones that are problematic for traditional perception stacks due to occlusions or state estimation drift. We demonstrate that such sparse, near-field sensing can be reliably modeled in simulation and transferred to the real world with high fidelity. Experimental results show that local proximity sensing substantially improves traversal robustness over discrete terrain and offers a low-power, low-latency alternative or complement to complex global perception suites in unpredictable environments. For more information about results and methods, please see the project website: https://sites.google.com/view/foot-tof/home.
Advances in learning-based control have enabled legged robots to engage in increasingly dynamic behaviors, including agile locomotion, object interaction, and whole-body manipulation [1]–[4]. Yet, the performance of most legged systems remains limited by incomplete awareness of impending contact with the terrain. Decisions about foothold placement, impact timing, and impact force modulation are often made using inferred or delayed information about contact onset. This lack of environmental awareness is particularly detrimental in unstructured environments with terrain discontinuities, such as gaps, edges, or protrusions. Locomotion failure may occur if such features are not detected at an appropriate spatial and temporal scale [5]–[7].
Legged robots frequently rely on cameras, depth sensors, and proprioceptive joint measurements (e.g., torques, velocities, tracking accuracy) to infer information about themselves and the environment. Depth sensors (LiDAR or RGB-D cameras) provide rich global context but are susceptible to (self or environment) occlusions, limited fields of view, and time synchronization issues. State estimation can serve to create more complete and accurate 3D reconstructions of the environment. However, most state estimation methods are susceptible to small errors and latency issues [2], [8]–[10]. Limitations of existing state estimators are particularly pronounced during highly dynamic maneuvers, where drift and time-synchronization issues become more pronounced [11]. Additionally, with sensors mounted on the robot’s chassis, limbs can self-occlude incoming or current contacts, making direct estimation from sensor data challenging [12], [13].
Complementary approaches leverage filter-based state estimation using inertial measurements and contact constraints to explicitly model the robot’s motion and contact state [14]–[17]. Modern reinforcement learning (RL)-based control policies take raw sensor observations as input to implicitly infer latent state and contact information [18]. Teacher policies in simulation, granted full access to ground-truth terrain geometry and contact states, can acquire highly dynamic skills with impressive agility. However, when distilled to student policies constrained to onboard sensing and subject to real-world noise, performance degrades because existing onboard sensing modalities provide no direct, spatially resolved measurement of imminent contact [2], [10].
Contact sensors, such as pressure-sensitive resistors, have also been integrated into quadruped feet to provide explicit signals that facilitate better terrain state estimation [19]. However, contact sensing at the moment of impact does not provide the necessary in-advance information about local terrain geometry. For dynamic foothold selection and gap traversal, anticipating contact before impact is essential.
Moreover, many simulators struggle to realistically model high-frequency contact forces [20], [21]. Unlike contact sensing, which makes necessary simplifying assumptions, proximity sensing is a straightforward sensor to simulate during training because it uses hardware-accelerated ray casting.
Short-range proximity and time-of-flight (ToF) sensors may thus offer a solution to this state estimation quandary. Proximity sensors have been outfitted onto tabletop manipulators to permit body-scale collision detection and reactive behaviors [22]–[24], as well as on small wheeled [25] or legged [26] robots. Even so, the influence of proximity sensing in learning-based, whole-body legged locomotion over unstructured terrain remains relatively underexplored.
Herein, we investigate lightweight, low-cost proximity sensors (that use infrared wavelengths) embedded directly into the feet of a quadruped robot (Fig. 1). We develop sensing units that are integrated into existing modular leg hardware with minimal modifications. By scanning a grid of points under the robot’s foot prior to contact, the sensors provide local geometric awareness independent of global line-of-sight constraints. Proximity measurements are fed as observations into a learning-based control policy to generate emergent, agile, and safe terrain-seeking maneuvers. The contributions of this work are as follows:
The design and deployment of low-cost, readily integrable proximity sensing modules for the feet of quadruped robots that facilitate locomotion in discrete terrain environments.
Characterization of the proximity sensor to obtain models of sensor noise, latency, and failure modes, which are in turn implemented in simulation training environments to bridge the sim-to-real gap; furthermore, evaluations of how a learned locomotion policy reacts to perception and model inaccuracies across different perceptive sensor sources.
Validation of the proposed sensing framework through real-world experiments, showcasing reliable traversal of discontinuous terrain.
Overall, this work interfaces a minimal sensing paradigm with learning-based control for legged locomotion. Rather than relying on complex global perception stacks, we find that strategically placed, task-relevant local sensors constitute a scalable component of systems intended for operation in real-world, unstructured environments.
The feet of a commercially available ANYmal-D robot (ANYbotics) were modified to house an STMicroelectronics VL53L5CX ToF proximity sensor and the corresponding signal-processing electronics. The sensor has a 45 ° \(\times\) 45 ° Field of View (FoV), split into a \(4 \times 4\) grid, which corresponds to the sensor’s resolution (see Fig. 2). We configure the sensor to use a resolution of \(4 \times 4\) to obtain data at 60 Hz, to match the motion controller’s frequency described in Sec. 2.2. Data is relayed from the sensor to the robot via a USB buffer with a measured delay of 20-60 ms.
Unlike other commonly-used depth sensors that output discrete point measurements, the VL53L5CX evenly covers the entire FoV with only 16 cells. For each cell in the \(4 \times 4\) grid, the sensor reports the minimum distance to an obstacle within that cell. Each zone of the sensor grid provides a range value with a resolution of 1 mm and a binary measurement-validity flag. Sensor readings above 1 m are clipped because beyond this value, noise increases and the relevance to planning locomotion footholds decreases.
The proximity sensor was placed snugly inside the rubber ball foot with a machined aperture for the FoV (Fig. 2). The optical axis is tilted approximately 15 ° outward relative to the sagittal plane to expand coverage of the anticipated foothold region during a standard foot swing.
Application of the ToF sensor on the bottom of a quadruped’s feet requires it to operate over a wide range of distances and incidence angles while stepping on different surfaces. To characterize sensor reliability under these conditions, we collected measurements at different distances and angles on representative deployment surfaces. We found that the sensor is highly accurate and reliable at short range (e.g., under 0.6 m) and when oriented nearly perpendicularly to the target surface (Fig. 3). However, greater distances and oblique incidence angles cause increased measurement noise and missing data. We use the data collected from this experiment as the basis for the sensor-noise model in simulation.
Leveraging foot-centric proximity sensor feedback, we propose a minimal approach for learning robust locomotion policies over discrete terrain. The approach is characterized by:
No reliance on a standalone map-generation stack (e.g., [27], [28]), which typically requires extensive tuning and is highly sensitive to noise.
No need for dedicated map-processing mechanisms to handle the high dimensionality of elevation maps, which often involve computationally expensive operations such as multi-head attention (e.g., [29], [30]).
A single unified policy for all terrain types without relying on terrain-specialist training (e.g., [31]).
The policy directly takes as observations the low-dimensional foot proximity sensor readings, implemented in simulation as ray casters mounted on the robot’s feet with an analogous FoV to those of the real sensors. We simulate the large FoV of the beams by ray casting at a higher resolution (ray casted towards the 4 corners and the center of each sensor zone) and then using linear interpolation to approximate the closest point in each of the \(4\times 4\) grid cells. In addition to ToF readings, other proprioceptive inputs including joint position, gravity, body linear and rotational velocities are given to the network. The policy is implemented as a Long Short-Term Memory (LSTM) network [32] trained with Proximal Policy Optimization (PPO) [33], [34] entirely in the Isaac Gym simulation environment [35]. The robustness of the proposed method is examined in Sec. 3.
Training is conducted in two stages. Stage 1 primarily lets the robot familiarize itself with the terrain types and learn the contexts associated with different sensory inputs. Stage 1 training employs a terrain composition comprised mostly of stepping stones. For each terrain type, a curriculum progressively increases in difficulty within each terrain type by interpolating geometric parameters from easy to hard settings (Fig. 4). As the curriculum progresses, the foothold size decreases, inter-foothold spacing increases, and vertical irregularity increases. By the end of Stage 1, the robot should learn to interpret the perceptual signals, develop basic locomotion reflexes, and traverse all terrains under ideal sensing conditions.
Stage 2 includes training terrains from Stage 1, but these terrains are shifted into a more challenging regime from the outset (e.g., stones are constrained to smaller size bounds with larger minimum gaps and height variations), while the variety of initial robot poses is also expanded. Additional terrain types, like stairs and faceted ground (see Fig. 4), are introduced to promote generalization to environments that require diverse gaits and walking styles. By the end of the two training stages, a single unified policy is obtained that can traverse all target terrain types.
The robot continuously observes distance and direction to a specified target position in each episode. The reward function comprises sparse task rewards provided only at the end of each episode, dense task rewards that offer strong guidance during learning, and regularization rewards (following [31] with modifications) that encourage efficient use of limited energy and suppress undesirable behaviors. Regularization rewards mitigate abnormal postures after reaching the target position, excessive jumping, stagnation, or overly aggressive gaits. For more detailed information about reward formulation, see the supplementary document on the project website.
We strive to model the degradation characteristics of the proximity sensors to make policies trained in simulation more readily transferable to the real-world quadruped platform. Namely, measurement inaccuracies are modeled as a static offset, proportional noise, and Gaussian noise during training. Missing distance readings are modeled by randomly marking a fraction of readings as missing at each timestep and replacing them with zeros. Finally, we explicitly introduce temporal delays in the foot proximity sensor readings by delaying the measurements for a few steps, which corresponds to the real-world delays measured in Sec. 2.1.
For each degradation type, at the beginning of each episode, the randomization level is sampled uniformly from \([0,\text{upper bound}]\). This procedure ensures that the full spectrum of sensing conditions–ranging from ideal perception to severely corrupted observations–is encountered, reducing the risk of overfitting to any specific degradation level. The degradation level is kept very low in Stage 1 to facilitate rapid skill acquisition, and is then increased in Stage 2 to mirror real-world levels.
As benchmarks for comparison, we investigated whether imminent contact information could be effectively recovered from conventional, base-centric sensors as an alternative to the foot-centric proximity pipeline. We conducted experiments in simulation to remove biases arising from varying real-world depth noise and the sensor-specific tuning often required during training.
Specifically, we evaluated locomotion performance across two configurations: Mock (Ideal Height Scan) and Mock (Aggre. Elevation Map). In these variants, the “pre-contact” signals are not measured directly at the feet but are instead kinematically projected from global robocentric observations (Fig. 5). The Mock (Ideal Height Scan) is a top-down ray caster in simulation that projects only against the terrain. This provides a \((5 \mathrm{m} \times 5 \mathrm{m})\) 2.5D scan with a spatial resolution of 5cm, and no depth noise. In Mock (Aggre. Elevation Map), we further emulate the pipeline of iteratively constructing the height scan from depth images acquired by six chassis-mounted depth cameras. At each timestep, cells within the FoV of all depth cameras are updated directly from depth measurements, whereas cells in the dead zones instead rely on the prior map transformed to the current frame. We assume that this transformation is obtained via zero-order integration of the estimated base linear and angular velocities.
With these two benchmarks, we effectively isolate the benefits of local, direct sensing from the inaccuracies inherent in estimating near-foot terrain geometry from a distal, body-fixed perspective. Height scans are sampled from Mock (Ideal Height Scan) and Mock (Aggre. Elevation Map) near the feet to generate data analogous to foot-mounted proximity sensors. The consistent data structures permit the use of the same locomotion policy across all evaluations, ensuring that performance comparisons reflect only the differences in sensor input modality. Since all ray casters in simulation cast only against the terrain, not the robot, there are no self-occlusions. This enforces a fair comparison between the proximity and benchmark sensor modalities, as we do not have to implement arbitrary rules about how to handle occlusions.
Performance is evaluated by the success rate over 1000 runs on a challenging test terrain combination composed of 80% stepping-stone terrain and 20% gap terrain, with difficulty levels corresponding to 90% curriculum progress for their respective terrain types in Stage 1. A run is considered successful only if the robot reaches a commanded position within 0.5 m by the end of the episode; otherwise, it is classified as a failure. The same locomotion policy, trained without any of the tested noise models presented below, is used for all evaluation runs. All ray caster distances return are noise-free. The robustness evaluation is conducted in the Isaac Gym simulator.
Static joint position reading offsets occur when a fixed value is added to the position readings of all joints. This significantly differs from the standard Gaussian noise added to the joint readings in training. We compared the performance of Foot Proximity Sensor and Mock (Ideal Height Scan) policies under this perturbation in Fig. 6A. When no static offset is present, Mock (Ideal Height Scan) performs on par with foot-centric sensing. However, once a static bias is introduced into the joint readings, the performance of base-centric sensing diminishes significantly faster than that of foot-centric sensing. Performance reduces because the biased joint measurements corrupt the estimated foot positions used to query the proximity readings.
Model mismatch (differences between a robot’s real body and the simulated body on which the policy was trained) can stem from inaccuracies in hardware mounting, manufacturing tolerances, or wear. We investigated a representative case of model mismatch by varying the robot’s shank length by up to \(\pm 20 \%\) while keeping its mass and inertia constant (Fig. 6B). Both the policy and the kinematics-based proximity retrieval module continue to assume the nominal robot model. Under this perturbation, Foot Proximity Sensor demonstrated greater robustness than Mock (Ideal Height Scan) in the presence of shank length mismatch. Similar to the case of static joint offsets, the performance of Mock (Ideal Height Scan) declines due to shifts in the estimated foot positions caused by the unmodeled shank lengths, which in turn cause errors in estimating proximity to the ground.
Acquiring an elevation map on a quadruped typically relies on a sophisticated perception stack that processes depth camera streams (e.g., [27]). Due to blind zones and sensor occlusions, elevation maps from previous time steps must be aggregated into the current base frame using odometry. However, odometry for legged systems is prone to drift, and Simultaneous Localization and Mapping systems are challenging to deploy due to the controller’s real-time requirements.
We treat the commonly-used velocity estimation noise in training (linear velocity: uniformly within \(\pm 0.1\,\mathrm{m/s}\) along each axis in the base frame; angular velocity: uniformly within \(\pm 0.2\,\mathrm{rad/s}\)) as the \(100\%\) odometry noise level, and evaluate performance under noise levels ranging from \(0\%\) to \(400\%\) (Fig. 6C). Results show that the degradation in Mock (Aggre. Elevation Map) remains substantially more pronounced than that of Foot Proximity Sensor, since the success rate drop from noise level 0% to 400% is 51.7% to %).
Across all three types of evaluations, in the absence of injected degradations, base-centric sensing models achieve reasonable performance. However, once perturbations were introduced, the performance of base-centric sensing deteriorated markedly faster than that of foot-centric sensing. These results suggest that foot-centric sensing constitutes a viable strategy for narrowing the gap between simulation and real-world behaviors. More broadly, the results underscore that sensing as close as possible to the point(s) of interest may be the most effective sensing strategy to obtain clear and reliable environmental information. Adding intermediary components based on other proprioceptive or exteroceptive components increases the number of failure points and the sensitivity to noise.
We deployed our policy on an ANYmal-D robot (ANYbotics) on the following canonical sparse terrains:
Horizontal gaps of up to 60 cm.
Aligned or scattered rows of stepping stones; each stone has a 20\(\times\)20 cm top area. A layer of supporting square bricks is used for stabilization. The bricks’ top surfaces are 20 cm lower than the regular stepping stones and can also serve as valid footholds. We also sporadically include 20 cm higher stepping stones to vary the vertical profile.
A straight row of stones at the same height, forming a beam 20 cm wide.
The robot can traverse all terrain types with an average speed of 0.52 m/s and a balance of stability and agility (Fig. 7). One representative run is shown in Fig. 8A, in which the robot sequentially traverses a gap, then a sparse stepping-stone section featuring elevated stones, and finally successfully reaches the target platform. Fig. 8B illustrates the process by which the robot detects an elevated stone, identifies its top surface, determines a suitable foothold, and sequentially places the left front and left hind feet onto the stone.
Fig. 8C presents the proximity readings averaged across all zones per foot over the entire run, providing an approximate representation of the terrain characteristics perceived by the robot at each moment. Further details are provided in Fig. 8D, which shows the readings from all zones of the LF foot proximity sensor. When we examine the gap-traversal segment (0.6–1.6 s), several distinct phases are apparent, providing insight into the policy’s reflexive behavior when equipped with foot-centric proximity sensing. First, between 0.80 s and 1.00 s, the foot is lifted, and the measured distances increase sharply, indicating that the robot becomes aware of the trench. As the foot continues to move (1.00–1.26 s), a reversal in the relative ordering of the zone readings signals detection of the side surface of the next platform; the robot subsequently reaches toward it as the measured distances decrease. Finally, another reversal in the zone ordering (1.26–1.40 s), together with a sudden increase in distance, indicates that the foot has approached the upper surface of the next platform, which naturally leads to a touchdown.
To provide further insight into the active perception behaviors learned by the policy from direct foot proximity inputs, Fig. 8E presents the z-coordinate of the LF foot with respect to the odometry frame over time, with color indicating the index of the zone exhibiting the minimum range measurement at each timestep. The identity of the minimum-reading zone can be interpreted as a coarse proxy for the surface normal direction of the prospective foothold, under the simplifying assumption that all ray intersections lie on a common planar surface. The results indicate that touchdown events are typically initiated only when a nearby, approximately horizontal surface is detected. Conversely, sustained detection of a quasi-vertical surface at a distance correlates with continued foot-lifting behavior, which ultimately guides the robot towards the elevated stone.
This work demonstrates that high-fidelity locomotion in complex environments does not strictly require high-bandwidth, computationally expensive vision pipelines. By integrating low-latency, foot-mounted infrared proximity sensors, we provide quadrupedal platforms with a pre-contact reflex that significantly improves reliability in environments where traditional sensors fail. As a result, our platform successfully navigated challenging tasks such as stepping-stone traversal and gap-crossing, where vision-based methods often struggle due to self-occlusion or perceptual aliasing. Our approach additionally yields emergent active perception behaviors, such as using the feet sensors to scan the environment. Despite these performance gains, several physical and environmental constraints remain that merit further investigation.
The accuracy of ToF measurements depends on the optical properties of the substrate, and highly absorptive or specular surfaces can lead to signal attenuation and unreliable distance estimates. Furthermore, hardware longevity in the field remains a concern. Sensor apertures are susceptible to clogging by mud or debris during high-impact locomotion, suggesting a need for IR-transparent housings or self-clearing mechanisms. Future research will also focus on morphological optimization to determine the optimal density and placement of these sensors across the robot’s limbs and undercarriage to provide a more holistic near-field awareness. Overall, this work suggests that the path to truly robust autonomous robots may not only lie in ever-more complex algorithms, but in better-integrated, task-informed, and localized sensing.
All authors are with the Robotic Systems Lab, ETH Zurich. E-mail: jialfan@ethz.ch↩︎
This work was supported by an ETH RobotX research grant funded through the ETH Zurich Foundation, the Branco Weiss Fellowship - Society in Science, administered by ETH Zurich, and the European Union’s Horizon Europe Framework Programme under grant agreement No 1011213. This work was conducted as part of ANYmal Research, a community to advance legged robotics.↩︎