DEV Community

Richard Minsoo Go
Richard Minsoo Go

Posted on

Humanoid Robot Software — Ch.03: Biped Locomotion Control [EN]

STATERA Library · Series 08 · Volume 22 · Chapter 03 · EN
Source: https://github.com/Statera-Library/08_Vol_22_Humanoid_Robot_Software/blob/main/Chapter_03_Biped_Locomotion_Control/Chapter_03_Biped_Locomotion_Control_EN.md

Volume 22. Humanoid Robot Software

Chapter 03. Biped Locomotion Control

03.01. Biped Locomotion Challenges Inverted Pendulum

Biped locomotion is fundamentally difficult because a humanoid must continuously control an unstable body while alternating between small and changing support regions. Unlike wheeled robots with persistent ground contact, a biped repeatedly transfers its weight from one foot to the other. Every step changes the contact geometry, available ground reaction forces, and mechanical constraints, requiring balance and motion generation to operate as one tightly coupled control problem.

The human-like body structure places a relatively large mass above narrow feet, producing dynamics similar to an inverted pendulum. In a conventional pendulum, gravity naturally restores the mass toward a stable hanging configuration. In an inverted pendulum, gravity instead amplifies deviations from the upright state. A humanoid must therefore generate continuous corrective motion through ankle torque, body acceleration, momentum regulation, and foot placement to prevent divergence.

The Center of Mass (CoM) provides a useful reduced representation of whole-body motion. Although a humanoid contains many articulated links, its global balance can often be interpreted through the relationship between the CoM, support contacts, and ground reaction forces. When the CoM moves relative to the support region, the controller must regulate contact forces and future footholds so that the resulting acceleration remains compatible with the intended locomotion behavior.

Static stability concepts are insufficient for normal biped walking because the CoM does not need to remain vertically above the support polygon at every instant. Dynamic walking intentionally allows the body to move beyond configurations that would be stable under purely static assumptions. The robot uses momentum and future contact placement to maintain motion. Consequently, balance must be evaluated through dynamic quantities such as ZMP, Capture Point, DCM, centroidal momentum, and predicted future states.

The Zero Moment Point (ZMP) is a classical concept for describing dynamically balanced contact during supported locomotion. It represents the location on the support surface where the horizontal moment generated by the resultant ground reaction force satisfies the assumed balance condition. Under suitable model assumptions, maintaining the ZMP within the feasible support region provides a practical criterion for generating CoM trajectories that remain compatible with available foot contact.

The inverted-pendulum interpretation simplifies the full humanoid into a concentrated body mass supported above the ground. This reduction removes many joint-level details while retaining the dominant relationship among CoM position, gravity, contact location, and horizontal acceleration. Such simplified models are valuable because they enable fast trajectory generation and predictive control, but their assumptions must be understood when applying them to highly dynamic or uneven locomotion.

A major challenge is that the unstable dynamics continue to evolve even when the robot does not immediately change its control action. If the body begins falling forward, waiting too long before correcting the motion increases the required recovery effort. Balance control is therefore strongly time dependent. State estimation, trajectory generation, optimization, communication, and actuator response must operate with sufficiently low latency to prevent small deviations from becoming unrecoverable states.

Single-support locomotion is particularly demanding because only one foot provides the primary support region. The available Center of Pressure range becomes smaller than during double support, reducing the amount of balance correction that can be generated without changing the contact configuration. The swing leg must simultaneously move toward the next foothold, creating a strong coupling between current balance regulation and preparation for future support.

Double support provides a larger effective support region because both feet contact the ground, but it introduces the problem of distributing forces between multiple contacts. The controller must transfer body weight smoothly from the trailing foot to the leading foot while avoiding discontinuities in force and acceleration. Poorly coordinated load transfer can cause impact, foot slip, excessive joint torque, or disturbances that propagate into the following single-support phase.

Foot placement is one of the most powerful mechanisms for controlling unstable biped motion. When ankle and contact-force regulation are insufficient, the robot can move the next support location in the direction required to capture its momentum. A forward disturbance may require a longer step, while a lateral disturbance may require a wider or shifted foothold. This principle connects inverted-pendulum dynamics directly to step planning and recovery behavior.

The Capture Point describes a location where the robot can place its support to bring simplified unstable motion toward a recoverable state. It provides an intuitive bridge between body velocity and required foot placement. If the current Capture Point moves outside the region that can be controlled using the stance foot, the controller can modify the next step. This makes stepping a deliberate balance-control action rather than merely a predefined periodic movement.

The Divergent Component of Motion (DCM) extends this interpretation by explicitly representing the unstable component of inverted-pendulum motion. Tracking DCM behavior allows a controller to reason about how the robot is diverging relative to planned support. Desired DCM trajectories can be generated from future footsteps and used to adjust ZMP, contact forces, and foot placement. This creates a useful hierarchy connecting reduced-order planning to whole-body execution.

Lateral balance presents challenges different from forward locomotion. The robot must repeatedly shift its body between left and right support while maintaining sufficient clearance between the legs. Excessive lateral motion wastes energy and can reduce stability, whereas insufficient transfer may prevent safe unloading of the swing foot. Step width, pelvis motion, CoM trajectory, and timing must therefore be coordinated to maintain a repeatable alternating gait.

Vertical dynamics complicate the inverted-pendulum approximation because many simple models assume approximately constant CoM height. Real humanoids bend their knees, climb stairs, traverse uneven terrain, accelerate vertically, and use compliant motion. These behaviors change the relationship between horizontal force and CoM acceleration. More general models or Whole-Body Control may therefore be required when vertical motion becomes too significant for constant-height assumptions.

Angular momentum also influences balance. Arm motion, torso rotation, and leg swing can generate substantial momentum that is ignored by the simplest point-mass inverted-pendulum models. In dynamic locomotion, these effects can either disturb balance or provide useful control authority. Centroidal dynamics and Whole-Body Control can regulate linear and angular momentum together, allowing the robot to exploit its complete articulated structure while maintaining contact feasibility.

Contact itself is uncertain in physical systems. The foot may land slightly earlier or later than predicted, the ground may deform, friction may vary, and only part of the sole may initially touch the surface. A controller that assumes perfect rigid contact can therefore become fragile. Force sensing, contact estimation, compliant control, and event-based phase transitions help synchronize the mathematical locomotion model with the actual physical interaction occurring at the feet.

State estimation is essential because balance controllers operate on quantities that cannot always be measured directly. IMU signals, joint encoders, contact sensors, force measurements, and kinematic models are combined to estimate body orientation, velocity, CoM state, and contact condition. Small estimation errors can be amplified by unstable dynamics, particularly at higher walking speeds, making estimator accuracy, delay, and robustness central parts of locomotion performance.

Actuator limitations define the physical boundary of recoverable motion. Joint torque, velocity, acceleration, range of motion, thermal capacity, and control bandwidth restrict how rapidly the robot can modify its posture or contact forces. A theoretically valid balance command may therefore be impossible to execute. Practical locomotion controllers must preserve actuator margin so that additional control authority remains available when disturbances or modeling errors occur.

Terrain further complicates the problem because support surfaces may not be level, continuous, or accurately known. Slopes, stairs, stepping stones, low-friction regions, and obstacles constrain where the robot can place its feet and how contact forces can be generated. The locomotion system must combine perception with balance prediction so that dynamically desirable footsteps are also geometrically reachable and physically safe.

Model-based locomotion typically organizes these challenges into multiple control layers. Reduced-order models such as LIPM can generate CoM, ZMP, DCM, and footstep references, while Whole-Body Control converts them into coordinated joint and contact-force objectives. Lower-level joint controllers then execute torque, position, or impedance commands. This hierarchy separates planning complexity while preserving the relationships required for dynamic balance.

Learning-based approaches can complement these analytical methods by discovering coordinated responses across complex robot dynamics. Reinforcement Learning policies can learn foot placement, joint coordination, disturbance recovery, or residual corrections through simulation experience. However, the fundamental inverted-pendulum challenge remains: the learned controller must still regulate unstable body motion using finite contact regions, limited actuators, delayed observations, and discrete future footsteps.

A robust biped controller must therefore be evaluated under disturbances rather than only during nominal walking. Pushes, velocity changes, timing errors, friction variation, terrain uncertainty, and imperfect contact reveal whether the controller possesses meaningful stability margin. Measurements such as DCM error, ZMP or CoP margin, corrective step size, recovery time, joint saturation, foot slip, and fall probability provide a more complete view of locomotion robustness.

Biped locomotion can ultimately be understood as the continuous management of unstable motion through contact. The inverted pendulum provides a compact conceptual foundation for this problem by linking body state, gravity, support location, and acceleration. Combined with ZMP, Capture Point, DCM, footstep planning, state estimation, and Whole-Body Control, it forms the basis for transforming an inherently unstable humanoid structure into a controllable and repeatable walking system.

03.02. Linear Inverted Pendulum LIPM Controller [w/Code]

The Linear Inverted Pendulum Model (LIPM) provides one of the most influential reduced-order representations for biped locomotion control. Instead of describing every joint and link of a humanoid, it approximates the robot's body as a concentrated center of mass supported by a massless leg. By constraining the center of mass to move at an approximately constant height, the nonlinear dynamics become sufficiently simple for real-time walking control.

The central assumption of the LIPM is that vertical center-of-mass motion is small compared with horizontal motion during nominal walking. If the center-of-mass height is represented by \(z_c\), gravitational acceleration by \(g\), and the horizontal center-of-mass position by \(x\), the horizontal dynamics can be expressed as \(\ddot{x}=\omega^2(x-p)\), where \(\omega=\sqrt{g/z_c}\) and \(p\) represents the effective support or Zero Moment Point location.

This equation reveals an important property of humanoid walking: the center of mass behaves as an intrinsically unstable system. When the center of mass moves away from the support point, gravitational dynamics tend to increase rather than automatically eliminate the deviation. A controller must therefore continuously regulate the relationship among center-of-mass position, velocity, support location, and future foot placement to prevent the unstable component from growing beyond recoverable limits.

The Zero Moment Point (ZMP) provides a practical connection between the simplified pendulum dynamics and foot-ground interaction. During a stable support phase, the desired ZMP should normally remain within the feasible support polygon generated by the contacting foot or feet. By designing a time-varying ZMP reference and controlling the center-of-mass trajectory relative to it, the locomotion controller can generate dynamically balanced walking motions without explicitly solving the complete rigid-body dynamics at every planning step.

In the sagittal and lateral directions, the LIPM equations can usually be treated independently under the basic model assumptions. The sagittal component primarily describes forward and backward motion, while the lateral component describes side-to-side balance transfer between the feet. Combining these two planar dynamics produces a compact representation of three-dimensional walking in which the robot alternates support while its center of mass progresses through a sequence of dynamically controlled states.

A practical LIPM controller generally receives the estimated center-of-mass state, planned footsteps, support-foot information, and desired walking velocity. From these quantities, it constructs a reference trajectory for the ZMP, center of mass, or related stability variable. Feedback then compensates for deviations between the predicted and measured motion. This closed-loop structure is essential because modeling errors, actuator dynamics, sensor noise, terrain irregularities, and external disturbances invalidate perfectly open-loop execution.

Footstep planning and LIPM control are strongly coupled. A fixed support point provides only a limited region from which disturbances can be recovered without taking another step. When the center-of-mass state approaches the boundary of this recoverable region, the robot can modify the position or timing of the next foot contact. Foot placement therefore becomes an additional control mechanism that reshapes the future support geometry and arrests unstable center-of-mass motion.

Discrete-time prediction makes the LIPM particularly useful for computational locomotion controllers. The continuous dynamics can be discretized according to the control or planning interval, allowing future center-of-mass states to be predicted from the current state and a sequence of support-point commands. This formulation naturally supports preview control and model predictive control, where future footsteps and ZMP references are considered over a finite horizon rather than responding only to the instantaneous state.

Preview-based LIPM control exploits knowledge of upcoming support transitions. Because the planned foot sequence determines where feasible ZMP regions will exist in the future, the controller can begin adjusting the center-of-mass trajectory before each transition occurs. This anticipatory behavior produces smoother walking than purely reactive control and reduces abrupt acceleration near support exchanges, especially when walking speed, step length, or lateral step width changes over time.

The controller must explicitly manage single-support and double-support phases. During single support, the feasible center-of-pressure region is approximately bounded by the stance foot, making balance constraints relatively restrictive. During double support, both feet contribute to the support region and the effective pressure location can transfer from the trailing foot toward the leading foot. Smoothly scheduling this transfer is important for avoiding discontinuities in desired acceleration, contact wrench, and whole-body motion.

State estimation is equally important because the LIPM controller operates on quantities that cannot always be measured directly. Joint encoders, inertial measurements, kinematic models, and foot contact or force information are commonly combined to estimate the floating-base pose, center-of-mass position, velocity, and support state. Even a mathematically stable controller can perform poorly when delayed or biased state estimates cause the internal pendulum model to diverge from the physical robot.

The simplified LIPM output is normally passed to lower-level control rather than directly commanding individual actuators. Desired center-of-mass motion, pelvis motion, foot trajectories, and contact objectives can be supplied to inverse kinematics, inverse dynamics, or whole-body control. The lower layer then coordinates the many humanoid joints while satisfying contact, torque, friction, joint-limit, and posture constraints that are intentionally omitted from the reduced-order pendulum representation.

The constant-height assumption is both the major advantage and an important limitation of the LIPM. It enables elegant linear dynamics and fast prediction, but real humanoids change center-of-mass height while climbing stairs, crouching, running, stepping onto uneven terrain, or performing manipulation during locomotion. Large angular momentum generated by the torso and limbs can also violate the assumptions underlying the simple model, requiring extensions or more complete centroidal and whole-body dynamics.

Another limitation arises from contact feasibility. The mathematical LIPM may request a support point that cannot physically be generated because the center of pressure must remain within the contact surface and the ground reaction force must satisfy friction constraints. Real implementations therefore constrain ZMP or center-of-pressure commands and coordinate them with contact planning. When those constraints become insufficient, stepping, momentum regulation, or another recovery strategy must intervene.

Controller tuning should consider walking speed, center-of-mass height, sampling period, prediction horizon, foot dimensions, step timing, and state-estimation quality as an integrated system. Increasing feedback gains can improve disturbance rejection but may amplify measurement noise or excite actuator and structural dynamics. Excessively conservative ZMP margins improve nominal robustness yet reduce maneuverability. Effective tuning therefore balances tracking accuracy, stability margin, responsiveness, energy consumption, and hardware limitations.

For software implementation, the LIPM layer should maintain a clear separation among state estimation, gait scheduling, reference generation, predictive dynamics, feedback control, and whole-body command realization. Such modularity allows the same locomotion framework to be evaluated first in simulation and later on physical hardware while individual components are replaced or refined. Diagnostic signals should expose predicted and measured center-of-mass states, support phases, ZMP references, tracking errors, and constraint margins.

Validation should extend beyond visually successful walking. Useful tests include stationary balance, repeated stepping, commanded velocity changes, stopping, turning, variations in step length and width, model-parameter errors, sensor noise, timing jitter, and controlled external perturbations. Performance can be assessed through center-of-mass tracking error, ZMP margin, foot-placement accuracy, disturbance recovery, contact consistency, joint feasibility, and the absence of unstable oscillation over long walking sequences.

Within a humanoid locomotion architecture, the LIPM controller is best understood as a bridge between abstract gait planning and high-dimensional whole-body control. It compresses the essential unstable dynamics of biped walking into a model that can be predicted and regulated efficiently, while footstep planning supplies future support opportunities and whole-body control realizes the resulting motion on the actual robot. This layered interpretation makes LIPM a foundational baseline for more advanced capture-point, DCM, predictive, and learning-based locomotion methods.

03.03. 3D LIPM and Capture Point for Biped [w/Code]

Three-dimensional Linear Inverted Pendulum Model (3D LIPM) extends the simplified inverted-pendulum representation of biped walking into both sagittal and lateral directions. Instead of considering forward motion alone, it models horizontal Center of Mass motion over the ground plane while maintaining an approximately constant CoM height. This representation captures the essential balance dynamics required for alternating left-right support during humanoid locomotion.

Under the constant-height assumption, the horizontal CoM dynamics can be expressed independently along the x and y axes. For a CoM height \(z_c\), the natural frequency is defined as \(\omega=\sqrt{g/z_c}\). The corresponding equations become \(\ddot{x}=\omega^2(x-p_x)\) and \(\ddot{y}=\omega^2(y-p_y)\), where \(p_x\) and \(p_y\) represent the effective support point or ZMP coordinates on the ground plane.

Although the x and y equations appear independent mathematically, their physical interpretation is coupled through the robot\'s support geometry. Forward progression determines step length and velocity, while lateral motion transfers body weight between the left and right feet. A successful walking controller must coordinate both components so that the CoM evolves consistently with foot placement, support transitions, contact constraints, and the desired direction of travel.

A fundamental difficulty of the 3D LIPM is that its horizontal dynamics contain an unstable component. If the CoM moves away from the effective support point with sufficient velocity, simply maintaining the current foot contact cannot stop the divergence. This observation motivates the Capture Point concept, which directly relates the robot\'s instantaneous CoM state to the ground location at which support must be established to arrest the unstable motion.

For the basic LIPM, the Capture Point can be written as \(\xi=x+\dot{x}/\omega\) in one horizontal direction. In two dimensions, the same relation becomes a planar vector, \(\boldsymbol{\xi}=\mathbf{x}+\dot{\mathbf{x}}/\omega\). The Capture Point therefore combines position and velocity into a single stability-related quantity, providing more useful information than CoM position alone when determining whether a humanoid can recover balance.

The physical interpretation is intuitive. A stationary CoM directly above a support location has a Capture Point close to its current position. When the body moves rapidly forward, the Capture Point shifts ahead of the CoM because the robot must establish support farther forward to dissipate the unstable motion. Likewise, lateral velocity moves the Capture Point sideways, indicating where a corrective step may be required to prevent a sideways fall.

Capture Point control separates the CoM dynamics into components that are easier to reason about for balance regulation. Rather than attempting to independently regulate position and velocity, the controller can track a desired Capture Point trajectory associated with planned footsteps. If the measured Capture Point deviates from its reference, the controller modifies the effective support point, ZMP, or future foot placement to drive the unstable component back toward the planned motion.

During single support, the robot has limited authority to move its effective support point because the Center of Pressure must remain inside the stance-foot contact region. Small Capture Point errors can often be corrected by shifting the pressure distribution within this region. Larger errors may exceed the available ankle-control authority, requiring a change in the next foot location. This naturally connects continuous balance control with discrete stepping decisions.

The relationship between the Capture Point and foot placement provides a powerful mechanism for push recovery. Following an external disturbance, the state estimator detects changes in CoM position and velocity, causing the estimated Capture Point to shift. If the point remains recoverable using the current support polygon, the robot can apply ankle or whole-body corrections. If it moves beyond that region, the footstep planner can reposition the swing foot toward a feasible capture location.

In three-dimensional walking, lateral Capture Point behavior is particularly important because biped locomotion repeatedly transfers support between two narrow feet. The desired lateral trajectory must move the body toward the upcoming stance foot without producing excessive oscillation. Step width, support duration, CoM velocity, and foot placement must therefore be coordinated so that the Capture Point reaches an appropriate region as each left-right support transition occurs.

The desired Capture Point trajectory can be generated backward from future footsteps or forward from a planned CoM and support sequence. Because the unstable dynamics amplify errors over time, knowledge of future support locations is valuable for constructing a dynamically consistent reference. This allows the controller to anticipate upcoming steps rather than waiting for large balance errors, improving smoothness and reducing aggressive corrective action near contact transitions.

A practical controller operates in discrete time and repeatedly updates the Capture Point estimate from the measured robot state. At every control cycle, it compares the measured and desired values, determines an admissible support-point correction, and passes the resulting motion objectives to lower control layers. The update rate must be sufficiently fast because delay in CoM velocity estimation or contact-state detection directly degrades the controller\'s ability to regulate unstable dynamics.

Capture Point estimation depends strongly on reliable floating-base state estimation. Joint encoders, IMU measurements, kinematic constraints, and foot-contact information are typically fused to estimate the robot\'s base motion and CoM state. Velocity estimation deserves particular attention because the Capture Point explicitly contains CoM velocity. Noise, bias, filtering delay, or incorrect contact detection can therefore produce substantial errors even when the estimated CoM position appears accurate.

The 3D LIPM and Capture Point layer does not replace whole-body control. It provides reduced-order objectives describing how the robot\'s global mass should move and where support should be generated. Whole-Body Control then converts these objectives into joint accelerations, torques, contact forces, pelvis motion, and swing-foot trajectories while respecting joint limits, friction constraints, actuator capabilities, and other high-dimensional requirements of the physical humanoid.

The basic Capture Point formulation inherits the assumptions of the LIPM. Constant CoM height, simplified contact geometry, negligible angular-momentum effects, and idealized support transitions may be reasonable during moderate walking but become less accurate during running, stair climbing, crouching, large upper-body motion, or aggressive disturbance recovery. In these situations, centroidal dynamics, variable-height models, momentum control, or nonlinear predictive methods may provide more faithful representations.

Another practical issue is reachability. A theoretically computed Capture Point does not guarantee that the robot can physically place its foot there. Kinematic limits, collision avoidance, swing duration, terrain geometry, friction, and actuator velocity restrict the set of achievable steps. Consequently, a production controller should project desired capture locations into a feasible footstep region and determine whether recovery is possible through pressure modulation, stepping, or a more aggressive whole-body strategy.

Multiple-step recovery extends the Capture Point idea beyond a single corrective step. A disturbance may be too large for the robot to stop with one feasible foot placement, but several dynamically planned steps can gradually reduce the unstable motion. The controller can therefore evaluate future support sequences and distribute recovery across multiple contacts, allowing the humanoid to remain upright under disturbances that exceed the one-step capture capability.

For software architecture, the 3D LIPM and Capture Point controller should expose clear interfaces to state estimation, gait scheduling, footstep planning, contact management, and Whole-Body Control. Useful diagnostic variables include CoM position and velocity, measured and desired Capture Points, ZMP or CoP commands, support-foot state, feasible support boundaries, footstep corrections, and recovery status. Logging these signals enables systematic analysis of failures that may otherwise appear simply as loss of balance.

Validation should include nominal walking and controlled perturbation scenarios across both sagittal and lateral directions. Tests can vary walking velocity, step length, step width, support duration, CoM-height assumptions, estimator noise, control delay, and external pushes. Important metrics include Capture Point tracking error, support-point margin, corrective footstep magnitude, recovery time, number of recovery steps, and the largest disturbance from which stable walking can be restored.

Within the biped locomotion stack, the 3D LIPM and Capture Point framework provides an important transition from basic inverted-pendulum modeling toward explicit unstable-motion regulation. The 3D LIPM predicts how the CoM evolves over planar support, while the Capture Point identifies where support must be generated to contain that evolution. Together they establish the conceptual foundation for DCM control, predictive footstep optimization, push recovery, and more advanced humanoid balance strategies.

03.04. Divergent Component of Motion DCM Control [w/Code]

The Divergent Component of Motion (DCM) provides a compact representation of the unstable part of biped locomotion dynamics. Building on the Linear Inverted Pendulum Model, it separates Center of Mass motion into convergent and divergent behavior. This separation allows a humanoid controller to focus directly on the component that must be actively regulated to prevent falling, while the naturally stable component requires less explicit intervention.

For a constant Center of Mass height \(z_c\), the LIPM natural frequency is defined as \(\omega=\sqrt{g/z_c}\). The DCM can then be expressed as \(\boldsymbol{\xi}=\mathbf{x}+\dot{\mathbf{x}}/\omega\), where \(\mathbf{x}\) is the horizontal CoM position and \(\dot{\mathbf{x}}\) is its velocity. This state combines position and velocity into a quantity whose evolution directly exposes whether the robot is moving toward or away from a recoverable support condition.

Under the basic LIPM assumptions, DCM dynamics can be written as \(\dot{\boldsymbol{\xi}}=\omega(\boldsymbol{\xi}-\mathbf{r})\), where \(\mathbf{r}\) represents the effective support point, commonly associated with the ZMP or virtual repellent point. The positive exponential behavior of this equation explains the term divergent: without suitable control of the support point, small errors between the DCM and its desired trajectory grow rapidly rather than naturally disappearing.

The DCM is closely related to the Capture Point, but it is particularly useful for continuous trajectory generation and feedback control across multiple walking phases. A Capture Point often emphasizes where the robot should step to stop unstable motion, whereas DCM control describes how the unstable state should evolve throughout locomotion. This makes the DCM suitable for continuous walking, support transitions, velocity regulation, disturbance recovery, and predictive footstep planning.

A desired DCM trajectory is normally constructed from a sequence of planned footsteps and support durations. During each support phase, the controller specifies an appropriate support-point evolution and determines the DCM trajectory that should lead toward the next contact configuration. Because DCM dynamics are unstable forward in time, trajectory generation is often performed backward from future boundary conditions, ensuring consistency between successive footsteps and the terminal locomotion objective.

Backward recursion is especially valuable when several future footsteps are already available from the gait planner. Starting from a terminal DCM condition, the planner propagates desired states backward through the sequence of support phases. Each preceding phase is therefore designed with knowledge of where the robot must arrive later. The resulting reference incorporates future support geometry and avoids relying only on reactive corrections after balance errors have already developed.

During single support, the stance foot limits the region in which the effective support point can be generated. The DCM controller compares the measured DCM with its desired trajectory and computes a corrective support-point command within this feasible region. Small disturbances can often be rejected through Center of Pressure modulation inside the stance foot, allowing balance to be recovered without modifying the planned footstep sequence.

When the DCM error becomes too large for pressure modulation alone, foot placement becomes an essential control variable. The next foothold can be shifted so that the future support region better captures the divergent motion. This creates a hierarchy of balance responses in which ankle or pressure control handles relatively small errors, while stepping handles larger disturbances. More severe cases may require multiple recovery steps or additional whole-body momentum regulation.

Double-support phases require careful treatment because the feasible support region extends across both feet and the load must transfer from the trailing foot to the leading foot. A discontinuous support-point reference can generate undesirable changes in CoM acceleration and contact forces. Practical DCM controllers therefore use smooth transition profiles that coordinate DCM evolution, pressure transfer, contact activation, and the beginning or completion of swing-foot motion.

Three-dimensional DCM control simultaneously regulates sagittal and lateral balance. Sagittal dynamics determine forward progression, acceleration, and stopping behavior, while lateral dynamics coordinate weight transfer between alternating feet. Although the simplified equations can be expressed independently in each horizontal direction, feasible footsteps and support polygons couple the motions physically. Step length, step width, timing, and turning direction must therefore be planned consistently.

Real-time feedback requires an accurate estimate of the current DCM. Because the DCM contains both CoM position and velocity, errors in floating-base state estimation directly affect the balance controller. Joint encoders, IMU measurements, contact sensing, force information, and robot kinematics are commonly fused to estimate the CoM state. Velocity filtering must balance noise suppression against latency because excessive delay can be particularly harmful when controlling exponentially divergent dynamics.

A practical DCM feedback law converts tracking error into a modification of the desired support point or contact wrench. Higher feedback gains can suppress disturbances rapidly, but commands remain constrained by the finite foot area, friction limits, actuator capability, and contact-force feasibility. Saturation must therefore be explicitly handled. A controller that requests an impossible ZMP or CoP location may appear stable mathematically while producing physically unrealizable commands on the robot.

DCM control can be combined naturally with Model Predictive Control. Instead of calculating only an instantaneous correction, an MPC formulation predicts future DCM evolution over a finite horizon and optimizes support-point trajectories, footstep locations, or step timing subject to physical constraints. This predictive formulation is particularly useful when disturbances require coordinated changes across several future steps rather than a single local correction.

Step timing provides another degree of freedom for DCM regulation. Because divergent dynamics evolve exponentially with time, changing when the next contact occurs can substantially alter the state at touchdown. Accelerating a step may reduce the time available for divergence, while delaying it may be appropriate under other gait conditions. Joint optimization of foot position and timing therefore expands the recoverable region beyond controllers that use fixed step durations.

The DCM reference generated by the locomotion layer is typically passed to a Whole-Body Control framework rather than directly to joint actuators. The whole-body controller realizes desired CoM motion, contact forces, pelvis behavior, and swing-foot trajectories while respecting joint limits, torque limits, friction cones, self-collision constraints, and posture objectives. DCM control consequently regulates global balance while the lower layer manages the robot\'s high-dimensional physical realization.

The classical DCM formulation inherits limitations from the constant-height LIPM. Significant vertical CoM motion, angular momentum, uneven terrain, running, jumping, deep crouching, and aggressive manipulation can violate its assumptions. Extensions may introduce variable-height inverted-pendulum dynamics, centroidal momentum models, enhanced support representations, or nonlinear optimization. These approaches preserve the idea of regulating unstable motion while representing richer humanoid dynamics.

Robust implementation also requires explicit handling of contact uncertainty. A planned foot contact may occur earlier or later than expected, or the foot may land on a surface with different height, orientation, or friction. Contact detection should therefore update the gait phase and DCM reference using measured events rather than relying exclusively on nominal timing. This event-aware behavior prevents reference trajectories from becoming inconsistent with the robot\'s actual support state.

Software architecture should separate DCM reference generation, state estimation, feedback control, footstep adjustment, contact scheduling, and Whole-Body Control. Useful runtime diagnostics include measured and desired DCM, DCM tracking error, CoM state, support-point commands, CoP or ZMP margins, support phase, footstep corrections, and controller saturation. These signals make it possible to distinguish estimation failures, planning errors, contact problems, and insufficient control authority.

Validation should evaluate more than nominal straight walking. Tests should include starts and stops, velocity changes, turning, variable step width, lateral transitions, controlled pushes, timing errors, model mismatch, state-estimation noise, and constrained foot placement. Relevant metrics include DCM tracking error, support-point margin, recovery time, corrective step displacement, number of recovery steps, contact consistency, and the maximum disturbance that can be rejected without falling.

Within the biped locomotion stack, DCM control provides a direct bridge from simplified pendulum dynamics to predictive balance regulation and adaptive stepping. By explicitly representing the exponentially unstable component of CoM motion, the controller can coordinate support-point modulation, future footholds, and step timing around a common stability variable. This framework forms a practical foundation for robust humanoid walking, push recovery, predictive locomotion control, and integration with Whole-Body Control.

03.05. Foot Step Planner and ZMP Reference [w/Code]

Footstep planning is the process of converting a desired walking direction and velocity into a sequence of physically feasible foot contacts. For a biped robot, each step changes the support geometry that determines how the Center of Mass can evolve. The planner must therefore select not only where each foot lands, but also when contact occurs and how the resulting support sequence contributes to dynamic balance throughout locomotion.

A typical footstep state contains the planar position and orientation of each foot together with its support timing. Desired forward velocity influences step length, lateral velocity affects sideways displacement, and yaw rate determines progressive foot orientation. These commands cannot be converted directly into arbitrary footsteps because leg reachability, minimum and maximum step width, collision avoidance, joint limits, and swing duration constrain the set of physically achievable contacts.

Alternating left and right support introduces additional geometric requirements. The planner should maintain sufficient lateral separation between the feet while avoiding configurations that cause leg crossing or excessive hip motion. During turning, the inner and outer feet follow different trajectories and orientations. A practical planner therefore generates footsteps in a local walking frame and transforms them into the world frame while maintaining consistent left-right support relationships.

The Zero Moment Point (ZMP) reference provides the dynamic connection between planned footsteps and Center of Mass motion. During contact, the ZMP represents the ground location about which the horizontal moment of the resultant contact wrench satisfies the balance condition assumed by the reduced-order model. For stable nominal walking, the reference is generally constrained to remain inside a feasible region associated with the active foot contacts.

During single support, the ZMP reference is normally placed within the stance-foot support polygon. Its exact location may be selected near the foot center or varied according to the desired Center of Mass trajectory and available stability margin. Keeping the reference away from the contact boundary provides robustness against modeling errors, state-estimation uncertainty, imperfect terrain contact, and disturbances that require additional Center of Pressure adjustment.

Double support provides a transition interval in which both feet contribute to the support region. The ZMP reference can move from the trailing foot toward the leading foot as the load transfers between contacts. Rather than switching instantaneously from one foot to the other, a smooth transfer profile reduces discontinuities in desired Center of Mass acceleration and contact forces. The duration and shape of this transition strongly influence walking smoothness.

A footstep sequence can be converted into a piecewise ZMP reference by associating each support phase with the corresponding contact region. Single-support segments remain associated with one foot, while double-support segments interpolate between successive contacts. This reference becomes an input to LIPM, preview, DCM, or Model Predictive Control methods that calculate dynamically consistent Center of Mass trajectories over the future walking horizon.

Step timing is as important as step location because inverted-pendulum dynamics evolve continuously while the support configuration remains active. Longer support durations allow the unstable component of motion more time to develop, whereas shorter steps change the support geometry sooner. The planner must therefore coordinate step period, single-support duration, double-support duration, swing-foot feasibility, and desired velocity rather than treating temporal and spatial planning as independent problems.

Nominal footsteps can initially be generated from a regular gait pattern, but feedback should modify them when the measured robot state departs from the planned state. A disturbance that increases forward Center of Mass velocity may require a longer or earlier step, while a lateral disturbance may require shifting the next foothold sideways. Capture Point or DCM errors provide useful signals for translating balance deviations into corrective foot placement.

Footstep adjustment must remain inside a feasible region determined by the robot\'s kinematics and environment. A mathematically desirable landing point may require excessive hip motion, exceed leg extension, cause self-collision, or lie outside a safe terrain patch. The planner should therefore project corrective requests onto reachable foothold regions and preserve minimum clearance between the legs while respecting orientation and contact constraints.

Terrain information becomes increasingly important when walking extends beyond flat ground. Candidate footholds should be evaluated for surface height, inclination, roughness, available contact area, friction, and obstacle clearance. On stairs or stepping stones, the geometric constraints may dominate nominal gait preferences. The planner must then coordinate foot position and orientation with swing trajectory generation and appropriate changes in body motion.

The ZMP reference itself must remain physically realizable. Although a reduced-order controller may compute an ideal support point, the actual Center of Pressure cannot move outside the available contact surface. Practical implementations therefore apply support-polygon constraints and often retain a configurable safety margin around its boundary. If the required correction exceeds this region, the locomotion system should modify future footsteps instead of requesting an impossible pressure shift.

Predictive planning allows footstep and ZMP decisions to be optimized jointly. A Model Predictive Control formulation can predict future Center of Mass or DCM evolution and optimize several footsteps, support points, and sometimes step durations over a finite horizon. Constraints can represent reachable step regions, support polygons, velocity limits, and desired motion. Receding-horizon execution then repeats the optimization as new state estimates become available.

Turning requires particular attention because the walking reference frame changes continuously. Foot orientations should progress toward the desired heading without demanding excessive yaw rotation in a single step. The ZMP and Center of Mass references must remain compatible with the rotated support polygons. Smooth curvature can be obtained by distributing heading changes over several steps while adapting the lateral placement of the inner and outer feet.

Starting and stopping are also distinct planning conditions. At gait initiation, the robot must transfer weight toward the first stance foot before lifting the opposite foot, requiring a preparatory ZMP shift. During stopping, the planner should reduce forward motion while arranging the final footsteps so that the Center of Mass and unstable motion state converge toward a stable double-support configuration rather than simply terminating the swing sequence.

The planner must interact closely with swing-foot trajectory generation. A selected foothold is useful only if the swing foot can reach it within the available time while maintaining ground and obstacle clearance. Large corrective steps may require increased swing velocity or modified timing, which can violate actuator limits. Consequently, footstep feasibility should account for both endpoint reachability and the dynamic ability to execute the complete swing motion.

Contact events should update the plan during execution. Early touchdown, delayed contact, slipping, or incomplete support can invalidate the nominal gait schedule and ZMP reference. Event-based contact detection allows the controller to synchronize support phases with the physical robot rather than relying exclusively on a predefined clock. The remaining footstep and ZMP trajectories can then be shifted or regenerated from the newly observed state.

In a layered humanoid software architecture, the footstep planner receives navigation or velocity commands and produces future foot poses, support phases, and timing information. The ZMP reference generator converts this contact schedule into a dynamic support reference, while LIPM or DCM control determines global balance behavior. Whole-Body Control subsequently realizes the desired CoM, contact, pelvis, and swing-foot objectives through the robot\'s joints and actuators.

Runtime diagnostics should expose planned and measured foot poses, current support phase, future contact timing, ZMP reference, measured CoP, support-polygon margins, footstep corrections, and planner feasibility status. These variables help distinguish whether a walking failure originated from poor balance regulation, an unreachable foothold, inaccurate contact detection, swing-foot tracking, or a mismatch between the planned and physically realized support conditions.

Validation should include straight walking, lateral walking, diagonal motion, turning, acceleration, deceleration, starting, stopping, and controlled disturbances. Tests should vary step length, width, timing, terrain geometry, state-estimation error, and contact uncertainty. Useful metrics include foothold error, ZMP or CoP margin, step adjustment magnitude, planning latency, disturbance recovery, swing feasibility, and the percentage of walking cycles completed without constraint violation.

Footstep planning and ZMP reference generation together form the spatial and temporal foundation of model-based biped locomotion. Footsteps determine where future support becomes available, while the ZMP reference describes how support should evolve between those contacts. Coordinated with LIPM, Capture Point, DCM, predictive control, and Whole-Body Control, these components transform high-level motion commands into dynamically balanced and physically executable humanoid walking.

03.06. Swing Foot Trajectory Generation [w/Code]

Swing-foot trajectory generation transforms a planned foothold into a continuous motion that moves the non-supporting foot from its current contact to the next contact location. The trajectory must satisfy position, orientation, velocity, acceleration, timing, and clearance requirements while remaining compatible with whole-body balance. For a humanoid, this process is essential because even a dynamically valid footstep plan can fail if the swing motion cannot be executed safely.

A swing phase begins when the foot unloads and leaves the ground and ends when the next stable contact is established. The trajectory generator receives the initial foot pose, target foothold, swing duration, terrain information, and gait state. It then produces time-indexed references for the foot position and orientation. These references are tracked by inverse kinematics, inverse dynamics, or Whole-Body Control while the opposite leg maintains support.

Horizontal foot motion can be represented using polynomial, spline, or other smooth interpolation functions. A common design imposes zero or small velocity at lift-off and touchdown while allowing higher velocity during the middle of the swing. Cubic or quintic polynomials are useful because boundary position, velocity, and acceleration conditions can be specified explicitly, reducing discontinuities that could generate abrupt joint commands or undesirable reaction forces.

Vertical motion requires a different profile because the foot must rise above the ground before descending toward the target. The trajectory is commonly divided conceptually into lifting and lowering portions with a specified maximum swing height. Clearance should be large enough to avoid terrain collision but not unnecessarily high, because excessive vertical motion increases joint velocity, energy consumption, and the time required to reposition the leg.

Foot orientation must also evolve smoothly throughout the swing. On flat terrain, the sole can remain approximately parallel to the ground for much of the motion, while toe-off and heel-strike strategies may introduce controlled pitch changes. On slopes, stairs, or irregular surfaces, the final orientation should align with the expected contact plane. Orientation interpolation must avoid abrupt angular velocity and maintain feasible ankle, knee, and hip configurations.

Boundary conditions strongly influence trajectory quality. At lift-off, the generated reference should connect continuously with the measured or commanded stance-foot state. At touchdown, position and velocity should support stable contact establishment without producing excessive impact. A trajectory with zero terminal velocity can reduce impact, but real walking may require a small controlled downward velocity to ensure reliable contact detection and accommodate uncertainty in terrain height.

Swing duration is coupled to both locomotion stability and actuator capability. A short swing allows the support configuration to change rapidly but requires larger foot velocity and acceleration. A long swing reduces motion demands but leaves the robot in single support for more time, allowing unstable body dynamics to evolve. The trajectory generator must therefore respect timing supplied by the gait planner while detecting when a requested foothold cannot be reached within actuator limits.

Mid-swing clearance should account for more than nominal ground height. Terrain maps, stair edges, obstacles, and uncertainty in perception can require additional vertical margin. Instead of using one fixed swing height for every step, an adaptive generator can estimate the highest obstacle along the foot path and construct a trajectory above it. This approach reduces unnecessary leg lifting on flat ground while increasing safety in geometrically complex environments.

Foot geometry must be considered because collision checking based only on the ankle or foot-center point is insufficient. The toe, heel, and lateral edges can strike obstacles even when the nominal reference point remains clear. A practical system therefore evaluates the swept volume of the foot or representative collision points along the trajectory. Additional clearance may be introduced when uncertainty exists in terrain geometry or foot-pose estimation.

The swing trajectory must remain consistent with kinematic reachability. A target foothold that appears feasible in the ground plane may require joint angles beyond their limits when combined with the current pelvis position and body posture. During trajectory generation, intermediate poses should also remain reachable. Whole-Body Control can redistribute motion among the pelvis and stance leg, but the planner should avoid trajectories that depend on extreme configurations.

Balance regulation can require modification of the swing trajectory after the foot has already left the ground. Capture Point or DCM feedback may determine that the original landing position is no longer sufficient after an external disturbance. The trajectory generator should therefore support online target updates and smoothly deform the remaining trajectory toward the corrected foothold without introducing discontinuities in foot position, velocity, or acceleration.

Online replanning becomes more difficult as touchdown approaches because less time remains to move the foot. A large late correction may demand unrealistic acceleration or produce a dangerous landing orientation. Practical controllers therefore limit corrections according to remaining swing time, actuator capability, and reachable-set estimates. When the requested correction exceeds these limits, alternative recovery strategies such as additional steps or momentum control may be necessary.

Contact preparation is an important part of the final swing phase. As the foot approaches the surface, the controller may reduce horizontal and vertical velocity, align the sole with the estimated terrain plane, and prepare the contact-force controller for load transfer. Smooth coordination between trajectory generation and contact management prevents a sudden transition from unconstrained swing motion to rigid stance constraints that could destabilize the whole robot.

Touchdown detection should use physical sensing rather than relying only on the planned trajectory time. Force or torque sensors, joint torque estimates, foot switches, proprioceptive signals, or other contact observations can indicate that the foot has reached the ground. Early contact should terminate or modify the descending trajectory, while missing contact at the expected time may require controlled extension, terrain re-estimation, or a protective recovery response.

Unexpected early contact is particularly important on uneven terrain. Continuing to command the nominal downward trajectory after the foot has already encountered an obstacle can generate large contact forces or destabilize the robot. A compliant response can reduce commanded motion, switch the affected direction to force regulation, and update the estimated contact state. This transition should occur quickly while preserving support for the rest of the body.

The trajectory generator also interacts with toe-off and heel-to-toe contact strategies. Allowing the stance foot to rotate around the toe can increase effective step length, while controlled heel contact at landing can produce more human-like progression. These behaviors require coordination among foot orientation, contact constraints, Center of Pressure evolution, and Whole-Body Control. Simpler robots may instead use approximately flat-foot contacts to improve robustness.

For stair climbing, the swing foot requires increased clearance and accurate vertical placement. The foot should rise sufficiently before advancing to avoid striking the stair riser, then approach the tread with an orientation compatible with stable contact. Descending stairs presents different challenges because the target surface lies below the current support level and may be difficult to perceive. Conservative touchdown motion can reduce impact and compensate for height uncertainty.

Trajectory generation should produce derivatives that are sufficiently smooth for lower-level control. Discontinuous velocity creates theoretically infinite acceleration, while abrupt acceleration changes can excite mechanical compliance and produce high torque transients. Polynomial or spline representations with continuous derivatives allow joint-level controllers to track references more effectively and improve compatibility with torque-controlled or compliant humanoid actuators.

In a layered software architecture, the footstep planner determines the target contact and timing, while the swing-foot generator converts that discrete decision into continuous Cartesian motion. State estimation supplies the current foot and body state, terrain perception provides geometric constraints, and balance control may request online foothold corrections. Whole-Body Control then maps the resulting foot references together with CoM and contact objectives into coordinated joint commands.

Runtime diagnostics should include commanded and measured foot pose, swing phase, target foothold, remaining swing time, maximum clearance, tracking error, online foothold correction, and touchdown status. Monitoring velocity and acceleration limits is also important for identifying trajectories that are mathematically smooth but physically demanding. These signals help separate trajectory-generation failures from perception, planning, actuator, or contact-estimation problems.

Validation should cover flat-ground walking, different step lengths and widths, rapid velocity changes, turning, obstacle clearance, stairs, stepping stones, and externally induced footstep corrections. Tests should include early and delayed touchdown, terrain-height errors, tracking disturbances, and reduced swing duration. Useful metrics include landing-position error, orientation error, minimum clearance, peak velocity and acceleration, impact magnitude, replanning latency, and successful contact rate.

Swing-foot trajectory generation ultimately connects discrete footstep planning with continuous physical execution. A robust generator must simultaneously provide smooth motion, sufficient clearance, accurate landing, online adaptability, and safe contact transitions while respecting kinematic and actuator limits. Integrated with footstep planning, DCM or Capture Point regulation, contact management, and Whole-Body Control, it enables planned support changes to become reliable executable steps on a physical humanoid.

03.07. RL Based Biped Walking Policy PPO [w/Code]

Reinforcement Learning (RL) provides an alternative to explicitly designing every component of a biped walking controller. Instead of prescribing detailed rules for balance, joint coordination, and disturbance recovery, an RL policy learns a mapping from observations to actions through repeated interaction with a simulated environment. For humanoid locomotion, this approach can discover coordinated behaviors that are difficult to construct using manually designed control laws alone.

Proximal Policy Optimization (PPO) is widely used for locomotion learning because it combines relatively stable policy updates with efficient parallel simulation. PPO follows an actor-critic structure in which the actor produces actions from the observed robot state, while the critic estimates the expected future return. During training, collected trajectories are used to improve both networks while limiting excessively large changes to the policy between successive optimization iterations.

The observation vector should contain information sufficient to infer the robot\'s locomotion state without unnecessarily exposing simulation-specific variables. Typical observations include base orientation, angular velocity, projected gravity, joint positions and velocities, previous actions, commanded linear and angular velocity, and contact-related information. Some training systems also provide gait phase or reference signals that help the policy organize periodic left-right stepping behavior.

Actions commonly represent desired joint positions, joint position offsets, joint velocities, or torque commands. Position-target policies combined with low-level PD control are frequently used because they provide a useful compromise between learning flexibility and actuator stability. Direct torque policies offer greater control authority but require the network to learn more of the actuator-level behavior and can be more sensitive to simulation mismatch when transferred to physical hardware.

The reward function defines the locomotion behavior that PPO is encouraged to discover. A primary reward typically measures tracking of commanded forward, lateral, and yaw velocities. Additional terms can encourage upright posture, appropriate body height, smooth actions, stable foot contacts, low joint acceleration, limited torque, and energy efficiency. The relative weighting of these terms strongly influences the style, robustness, and physical feasibility of the learned gait.

Reward design should avoid optimizing a single performance measure in isolation. A policy rewarded only for forward velocity may discover unstable hopping, excessive body motion, or actuator-intensive behavior that satisfies the numerical objective without producing useful walking. Combining task rewards with regularization and safety-related penalties guides learning toward solutions that achieve commanded motion while remaining compatible with mechanical and operational constraints.

PPO updates the policy using a clipped surrogate objective that discourages excessively large changes in action probability during one training iteration. The probability ratio between the updated and previous policies is constrained around a limited interval, reducing destructive policy updates. This mechanism does not guarantee stability, but it generally makes optimization more predictable than unconstrained policy-gradient updates and is well suited to large parallel locomotion experiments.

Parallel simulation is critical for practical humanoid RL training. Hundreds or thousands of simulated robots can execute different episodes simultaneously, generating large quantities of experience within each optimization cycle. GPU-accelerated physics simulation can further increase throughput. This large-scale data collection allows the policy to encounter diverse initial states, disturbances, command velocities, and terrain conditions without exposing physical hardware to repeated falls.

Episode initialization should cover more than one perfectly upright pose. Randomizing joint configuration, base velocity, gait phase, and small orientation errors forces the policy to recover from states that occur during realistic operation. Episodes normally terminate when the robot falls, exceeds orientation limits, violates critical constraints, or reaches a maximum duration. Carefully designed termination criteria prevent training data from being dominated by physically meaningless states after failure.

Command sampling determines the range of locomotion behaviors learned by a single policy. During training, desired forward velocity, lateral velocity, and yaw rate can be sampled from predefined ranges and changed periodically. The policy then learns conditional behavior rather than one fixed gait. Curriculum learning can begin with moderate commands and gradually introduce faster speeds, sharper turns, disturbances, and more difficult terrain as training performance improves.

Domain randomization is essential when a policy trained in simulation will be deployed on a real humanoid. Physical parameters such as mass, inertia, joint friction, motor strength, control latency, sensor noise, ground friction, and terrain properties can be randomized between episodes. Training across this distribution discourages dependence on one exact simulator configuration and increases the probability that the learned policy remains effective when confronted with real hardware uncertainty.

External perturbations can be introduced during training to improve disturbance recovery. Random pushes applied to the torso or changes in ground conditions force the policy to experience deviations from nominal walking. Through repeated exposure, the network can learn coordinated ankle, hip, stepping, and whole-body responses without explicitly programming each recovery mode. Perturbation magnitude should increase progressively so that training remains learnable while robustness expands.

The simulation control frequency should reflect the intended hardware architecture. Physics may run at a high internal rate while the neural policy operates at a lower frequency and low-level joint controllers execute faster local loops. Action decimation can reproduce this hierarchy during training. If timing differs substantially between simulation and deployment, the policy may encounter dynamics it has never experienced, making latency randomization and realistic actuator modeling particularly important.

Observation normalization improves neural-network optimization because locomotion variables can have very different numerical scales. Joint angles, angular velocities, command velocities, and previous actions are commonly normalized or clipped before entering the policy. The same normalization parameters must be reproduced during deployment. Differences between training and inference preprocessing can cause severe behavior degradation even when the policy network itself has been transferred correctly.

Asymmetric actor-critic training can provide additional information to the critic without making the deployed actor depend on unavailable measurements. For example, the critic may receive privileged simulation information such as accurate terrain properties, contact forces, or physical parameters, while the actor observes only quantities available on the real robot. This can improve value estimation and training efficiency while preserving a deployable observation interface for the learned locomotion policy.

The learned policy should operate within an explicit safety envelope. Action outputs can be clipped to valid joint ranges, rate limits can restrict rapid command changes, and lower-level controllers can enforce torque or velocity limits. Additional safety logic can monitor body orientation, contact state, actuator temperature, communication health, and state-estimation confidence. RL should therefore be treated as one control component rather than as an unrestricted replacement for deterministic safety mechanisms.

Sim-to-real transfer requires careful matching of actuator behavior. Real joints contain delay, friction, backlash, compliance, saturation, and bandwidth limitations that ideal simulation models may omit. System identification can improve the nominal actuator model, while domain randomization covers residual uncertainty. Policies trained with unrealistically powerful or instantaneous actuators often perform well in simulation but fail when the same commands are executed by physical motors.

State estimation is another critical interface between the learned policy and the robot. The policy may rely on base orientation, angular velocity, joint states, and estimated body velocity at every inference cycle. Noise and delay in these quantities can change the observation distribution relative to training. Injecting realistic sensor noise and latency during simulation helps the policy learn behaviors that remain stable when estimates are imperfect on physical hardware.

A production locomotion stack can combine RL with model-based control rather than choosing one exclusively. The RL policy may generate joint targets, residual corrections, gait parameters, or reference trajectories, while deterministic controllers enforce contact constraints and safety limits. Conversely, model-based quantities such as phase, desired footholds, or balance references can be supplied to the policy. Hybrid architectures can preserve interpretability while exploiting learned adaptation.

Policy deployment requires deterministic and bounded inference latency. The trained actor network is exported to the target runtime and evaluated at a fixed control frequency on the onboard CPU, GPU, or NPU. Input preprocessing, neural inference, output scaling, and safety filtering must complete before the control deadline. Runtime monitoring should record observation validity, action magnitude, inference time, saturation events, and deviations from commanded locomotion.

Validation must extend far beyond average training reward. The policy should be tested across velocity commands, turns, starts, stops, terrain variations, friction changes, payload differences, sensor noise, actuator degradation, and controlled external pushes. Important metrics include velocity tracking error, fall rate, recovery success, energy consumption, foot slip, action smoothness, joint-limit margin, peak torque, and the duration of stable continuous walking.

Simulation evaluation should use parameter distributions and scenarios that were not directly encountered during optimization. This helps determine whether the policy has learned robust locomotion principles or merely exploited regularities in the training environment. Comparisons with model-based baselines are also valuable because they reveal whether RL provides measurable improvements in disturbance tolerance, terrain adaptation, efficiency, or achievable locomotion range.

An RL-based biped walking policy trained with PPO ultimately converts locomotion commands and estimated robot states into coordinated whole-body actions through learned feedback. Its effectiveness depends not only on the neural network but also on reward design, simulation fidelity, domain randomization, actuator modeling, state estimation, safety supervision, and systematic validation. Integrated carefully, PPO provides a powerful complement to LIPM, DCM, footstep planning, and Whole-Body Control within a humanoid locomotion architecture.

03.08. Gait Transition Walk Jog Run Mode Switch [w/Code]

Gait transition allows a biped robot to change its locomotion pattern as commanded speed, terrain, stability requirements, or task conditions evolve. Walking, jogging, and running are not merely different velocity settings of one controller; they involve different contact timing, support structure, body dynamics, and energy exchange. A reliable humanoid must therefore manage transitions explicitly rather than switching abruptly between independent motion modes.

Walking is typically characterized by alternating single-support and double-support phases in which at least one foot remains in contact with the ground. As speed increases, double-support duration generally decreases and the required step frequency and momentum grow. Jogging introduces more dynamic motion and may approach or include short aerial phases, while running relies more strongly on compliant leg behavior, impact management, and rapid exchange of kinetic and potential energy.

A gait-mode manager determines which locomotion regime should be active. Inputs may include commanded linear velocity, acceleration demand, terrain condition, robot state, actuator margin, and stability indicators. Instead of changing mode at one fixed speed threshold, practical systems can use separate entry and exit thresholds. This hysteresis prevents repeated walk-jog or jog-run switching when the commanded velocity fluctuates near a transition boundary.

Mode switching should normally be performed through an intermediate transition state. When changing from walking to jogging, the controller can progressively increase step frequency, modify step length, shorten double support, and adjust Center of Mass motion before enabling more dynamic behavior. The reverse transition gradually removes momentum and restores longer support intervals. Such blending reduces discontinuities in contact force, joint torque, and whole-body acceleration.

Contact scheduling is one of the defining differences among locomotion modes. A walking scheduler explicitly represents left support, double support, right support, and another double-support interval. Faster modes progressively reduce the duration of simultaneous contact and may introduce a flight phase in which neither foot supports the body. The control architecture must therefore support changing contact-state sequences without losing synchronization between planning and physical execution.

Step timing becomes increasingly important as locomotion speed rises. A slow walking controller may tolerate moderate timing errors, but jogging and running require accurate coordination between touchdown, lift-off, and body momentum. The gait generator must adapt stance duration, swing duration, cadence, and phase relationships continuously. Timing changes should respect actuator bandwidth and swing-leg capability so that faster commanded motion does not create unreachable foot trajectories.

Foot placement also changes with locomotion mode. Walking may prioritize conservative support margins and moderate step lengths, whereas faster locomotion requires footholds that regulate greater forward momentum. Lateral placement must preserve balance as contact time decreases. Capture Point, DCM, predictive control, or learned policies can modify future footholds according to the measured body state so that acceleration and transition behavior remain dynamically consistent.

Center of Mass trajectories should evolve smoothly across gait transitions. A sudden change in desired CoM height, velocity, or acceleration can generate large joint torques and contact-force transients. Transition trajectories can gradually modify vertical oscillation, forward lean, and lateral motion according to the target gait. Running may permit greater vertical CoM variation than conventional constant-height walking models, requiring a richer dynamic representation during high-speed motion.

The validity of simplified balance models can change during a transition. LIPM and ZMP methods are well suited to walking conditions with continuous support and moderate vertical motion, but become less representative when vertical acceleration, angular momentum, or flight phases become significant. A locomotion system may therefore blend model-based controllers, switch dynamic models, or activate a learned policy while maintaining a common state-estimation and safety framework.

Whole-Body Control must adapt its objectives and constraints as the contact configuration changes. During walking, it can enforce stance-foot constraints while tracking CoM, pelvis, and swing-foot objectives. During running, shorter contacts and possible flight phases require different force distribution and momentum objectives. Contact activation and deactivation should be synchronized with measured events to prevent the controller from applying stance constraints to a foot that has already left the ground.

Smooth force transfer is essential during transition. Abrupt changes in desired ground reaction force can excite structural vibration, cause foot slip, or exceed actuator limits. Force references should evolve continuously where possible, particularly around touchdown and lift-off. Compliant joint control, impedance regulation, and contact-force feedback can reduce impact while allowing the robot to accommodate small discrepancies between predicted and actual contact timing.

Swing-foot trajectories must also adapt to gait mode. Faster locomotion leaves less time to reposition the leg, increasing required velocity and acceleration. The trajectory generator may adjust clearance, touchdown velocity, foot orientation, and retraction behavior according to the target gait. During running, preparing the foot for rapid load acceptance becomes particularly important because high impact forces can destabilize the robot if contact occurs with an unsuitable configuration.

State estimation becomes more challenging during high-dynamic transitions. Rapid angular motion, impact, temporary loss of contact, and vibration can degrade assumptions used by floating-base estimators. The estimator must distinguish true support contacts from transient impacts and correctly handle periods with reduced kinematic constraints. IMU, joint, force, and contact information should be fused without introducing excessive delay into the locomotion feedback loop.

Transition decisions should consider actuator capability rather than commanded velocity alone. Joint torque, motor speed, temperature, battery condition, and available control margin can determine whether a faster gait is safe. If the robot approaches hardware limits, the gait manager should reject or reduce acceleration requests instead of entering a mode that cannot be sustained. This makes locomotion mode selection part of system-level resource and safety management.

Terrain can restrict which gait transitions are appropriate. Flat, predictable ground may support jogging or running, while stairs, loose surfaces, narrow footholds, or uncertain terrain may require slower walking even when a higher velocity is requested. Terrain perception can therefore provide gait constraints or confidence estimates to the mode manager. Conservative fallback behavior should be available when environmental quality becomes uncertain during fast motion.

Learning-based locomotion policies can represent multiple gait modes within a single neural controller. Command velocity, gait phase, desired mode, or other conditioning variables can allow one policy to produce walking, jogging, and running behaviors. Training should expose the policy to transitions rather than only steady-state examples. Otherwise, individual modes may perform well while intermediate states remain unstable because the policy has not learned how to connect them.

Another approach uses separate policies for different gait regimes and a supervisory controller to manage switching. This can simplify specialization but creates the problem of transferring internal state and action references between policies. Directly replacing one policy output with another can cause abrupt joint commands. Blending regions, shared observation conventions, compatible action spaces, and transition policies can reduce these discontinuities and improve mode-switch reliability.

Reinforcement learning can also discover gait transitions automatically when reward functions encourage velocity tracking, stability, efficiency, and smooth action. Rather than assigning explicit gait labels, a policy may develop different locomotion patterns at different commanded speeds. However, emergent transitions must still be evaluated for repeatability, hardware safety, contact quality, and interpretability before deployment because high reward alone does not guarantee operationally acceptable behavior.

A finite-state machine or hierarchical state machine provides a practical supervisory structure for production systems. States can represent standing, walking, transition-to-jog, jogging, transition-to-run, running, deceleration, and recovery. Each transition is guarded by conditions involving command persistence, estimated stability, contact phase, and hardware readiness. Timeouts and fallback transitions prevent the system from remaining indefinitely in an unsafe intermediate condition.

Emergency behavior must remain independent of normal gait transitions. If excessive body tilt, unexpected loss of support, actuator faults, or severe tracking errors are detected, the system should prioritize stabilization or protective behavior rather than completing the requested mode switch. A fast gait should be able to fall back toward a recoverable stepping pattern, controlled stop, or protective response according to the available physical state.

Runtime diagnostics should record commanded and active gait mode, transition state, phase timing, contact sequence, CoM state, foot placement, ground reaction forces, joint limits, and mode-switch reason. Logging transition duration and rejected switch requests is also useful. These signals allow engineers to distinguish failures caused by supervisory logic from those caused by trajectory generation, state estimation, contact control, or actuator limitations.

Validation should test transitions in both directions across a broad operating envelope. Walk-to-jog, jog-to-run, run-to-jog, and jog-to-walk sequences should be evaluated under acceleration, deceleration, turning, disturbances, parameter variation, and different surfaces. Metrics can include transition success rate, speed tracking, peak force, torque margin, foot slip, body attitude deviation, transition time, energy consumption, and the number of recovery actions required.

Gait transition control ultimately coordinates changes in contact topology, timing, foot placement, body dynamics, and control strategy while preserving continuous physical behavior. Reliable switching between walking, jogging, and running requires more than selecting a new velocity reference. By integrating supervisory mode management, adaptive trajectory generation, state estimation, balance regulation, Whole-Body Control, and safety constraints, a humanoid can expand its locomotion envelope without sacrificing stability during the transitions themselves.

03.09. Stair Climbing and Stepping Stone Control [w/Code]

Stair climbing and stepping-stone locomotion require a biped robot to control balance while placing its feet on discrete support surfaces with significant geometric constraints. Unlike nominal flat-ground walking, the robot cannot assume that every location inside a continuous ground plane is available for contact. Each step must satisfy foothold position, orientation, height, contact area, reachability, and stability requirements while coordinating whole-body motion across changing support levels.

Reliable control begins with an environment representation that identifies candidate support surfaces. Depth cameras, stereo vision, LiDAR, or other perception systems can estimate stair treads, risers, platform boundaries, and stepping-stone geometry. The locomotion system converts this information into terrain patches containing position, surface normal, dimensions, confidence, and traversability attributes that can be evaluated by the footstep planner.

Stair geometry imposes structured but demanding constraints. The planner must estimate tread depth, riser height, staircase direction, and the location of usable landing regions. A foothold should provide sufficient sole contact while maintaining clearance from tread edges and risers. Accumulated perception error can become important over multiple steps, so the robot should continuously update the staircase model rather than relying entirely on a map generated before ascent or descent begins.

Stepping stones create a different planning problem because feasible support regions may be separated by gaps and arranged irregularly. The planner must select a sequence of reachable surfaces that connects the current configuration to the desired destination. Each candidate step is constrained by leg reach, allowable step width, body orientation, collision risk, and the ability to maintain balance after touchdown. Geometric path planning and dynamic feasibility therefore become tightly coupled.

Foot placement should consider the complete sole geometry rather than only a nominal foot-center point. A target may appear valid at its center while leaving the toe or heel outside the support surface. Practical planners shrink terrain patches by a safety margin or explicitly test the transformed foot polygon against the available region. This provides robustness to localization error, perception uncertainty, and small landing inaccuracies during physical execution.

Vertical transitions change the kinematic relationship between the pelvis and the feet. When climbing stairs, the swing foot must rise above the stair edge while the body prepares to elevate onto the next support level. Excessive pelvis height can approach leg-extension limits, whereas insufficient elevation can create poor configurations for load transfer. The planner should therefore coordinate foothold selection with feasible pelvis and Center of Mass trajectories.

The swing-foot trajectory requires greater attention than during flat-ground walking. For ascent, the foot should first obtain sufficient vertical clearance before advancing across the riser and descending toward the tread. The trajectory must consider the entire foot geometry because the toe can strike the stair even when the ankle trajectory appears collision-free. Adaptive clearance based on perceived stair height provides a safer alternative to a fixed swing-height parameter.

Descending stairs presents additional difficulties because the target support lies below the current stance surface and may be partially occluded. The robot must lower the swing foot without excessive impact while preventing the body from progressing too far before reliable contact is established. Conservative forward motion, controlled downward foot velocity, and rapid touchdown detection can improve robustness when the estimated tread height contains uncertainty.

Stepping-stone swing trajectories must account for gaps as well as obstacle clearance. Because intermediate ground contact may be impossible, a failed landing can immediately create a critical balance condition. The trajectory generator should therefore prioritize accurate terminal placement and orientation while retaining sufficient time for online correction. Near touchdown, aggressive lateral corrections should be limited because they can produce poor contact or exceed swing-leg capability.

Center of Mass motion must remain compatible with the available support geometry. On broad flat ground, balance control can exploit relatively large support regions, but stairs and small stepping stones may provide narrow Center of Pressure margins. The controller should regulate CoM and DCM behavior so that the unstable component of motion evolves toward the next feasible support rather than toward an area where no foothold exists.

ZMP or Center of Pressure references should reflect the actual contact surface. During a stair step, the support polygon belongs to a foot positioned at a different height from the next contact, making simple planar assumptions less accurate during transitions. For moderate motion, local support-plane approximations may remain useful, while more demanding maneuvers can benefit from centroidal dynamics or contact-wrench optimization that explicitly handles non-coplanar contacts.

Footstep timing is strongly coupled with geometric difficulty. A large vertical step or distant stepping stone may require additional swing time, while extending single support also allows unstable body motion more time to develop. The controller must balance these competing requirements. Adaptive timing can increase the swing duration when necessary, but the associated CoM and DCM references should be regenerated so that the new contact time remains dynamically consistent.

Whole-Body Control coordinates the locomotion objectives with the robot\'s high-dimensional constraints. During stair ascent, it can regulate CoM motion, pelvis orientation, stance-foot contact, and swing-foot tracking while respecting joint, torque, and friction limits. Arm and torso motion may also be used to manage angular momentum. This becomes increasingly valuable when large vertical steps force the legs into configurations with reduced balance authority.

Contact-force distribution requires special consideration when the feet occupy different heights. During double support between adjacent stair treads, the robot may simultaneously contact two non-coplanar surfaces. The controller should distribute normal and tangential forces while respecting friction constraints and preventing excessive loading of one leg. Smooth transfer from the lower support to the upper support reduces sudden changes in body acceleration and actuator torque.

Touchdown detection is essential because perceived terrain height rarely matches physical geometry perfectly. Force sensors, joint torque estimates, foot contact sensors, and proprioceptive observations can detect contact earlier or later than predicted. When early contact occurs, the controller should avoid continuing the nominal downward trajectory. When contact is delayed, a controlled search or extension motion may be preferable to abruptly committing body weight to an unsupported foot.

Perception uncertainty should be represented explicitly in planning margins. A foothold with high geometric confidence can permit relatively precise placement, while uncertain or partially observed terrain should trigger larger edge margins, reduced speed, or an alternative support choice. If no foothold satisfies minimum confidence and reachability requirements, the robot should stop or reobserve the environment rather than continue with an unsupported assumption.

Online foothold adjustment allows the system to respond to both perception updates and balance disturbances. If a stepping stone is localized more accurately during the swing, the landing target can be refined within the remaining reachable region. Similarly, a DCM deviation may request a balance-oriented correction. The trajectory generator must combine these requests while preserving the requirement that the complete foot remains on the available support surface.

Recovery strategies are more constrained than on continuous ground. A push on flat terrain may be handled by stepping toward a Capture Point, but on stepping stones the desired recovery location may contain no support surface. The controller must instead search among available footholds and determine whether one can capture the current motion. If not, torso and arm momentum, contact-force modulation, or a sequence of additional feasible steps may be required.

Stair and stepping-stone control can be integrated with Model Predictive Control to reason about several future contacts simultaneously. The optimizer can consider foothold locations, contact timing, CoM or DCM evolution, and support constraints over a finite horizon. This is useful when choosing the locally easiest step would create an unfavorable configuration later. Predictive planning instead evaluates how each contact contributes to continued traversal.

A layered software architecture should connect terrain perception, support-surface extraction, footstep planning, swing-foot generation, balance control, contact estimation, and Whole-Body Control through clearly defined interfaces. Terrain updates should carry confidence and geometry information, while the planner should expose selected footholds and feasibility margins. The controller should report contact events and execution errors so that perception and planning can update subsequent steps.

Runtime diagnostics should include detected terrain patches, selected footholds, foot-polygon margins, stair dimensions, swing clearance, measured and commanded foot poses, CoM and DCM states, contact forces, touchdown events, and planning feasibility. Monitoring these variables is particularly important because a failure that appears to be a balance problem may actually originate from terrain estimation, insufficient clearance, unreachable placement, or inaccurate contact timing.

Validation should progress from controlled geometry toward uncertain environments. Tests can include stairs with different tread depths and riser heights, ascent and descent, isolated platforms, regular and irregular stepping stones, varying gaps, surface inclination, localization error, and controlled disturbances. Metrics should include foothold accuracy, minimum edge margin, clearance, contact success, impact force, traversal time, recovery rate, and the percentage of steps completed without replanning or constraint violation.

Stair climbing and stepping-stone control extend biped locomotion from continuous planar walking to locomotion over discrete three-dimensional support structures. Success depends on tightly integrating terrain perception, constrained footstep planning, adaptive swing trajectories, dynamic balance regulation, contact management, and Whole-Body Control. By reasoning about both where support exists and how the robot\'s unstable motion evolves toward it, a humanoid can traverse stairs and discontinuous footholds with greater reliability and safety.

03.10. Biped Locomotion Benchmark Speed Stability [w/Code]

Biped locomotion benchmarking evaluates whether a humanoid can move quickly while preserving balance, controllability, repeatability, and mechanical safety. Maximum speed alone is not a sufficient measure because a robot that achieves high velocity only under ideal conditions may have little practical value. A useful benchmark therefore measures speed together with stability margins, tracking accuracy, disturbance tolerance, contact quality, and the probability of completing locomotion tasks without falling.

Forward walking speed is one of the most visible performance indicators. It can be measured as average base or Center of Mass velocity over a defined test distance after excluding acceleration and deceleration regions. Peak instantaneous velocity should be reported separately because it may not represent sustainable locomotion. Benchmark protocols should specify commanded speed, achieved speed, test duration, surface condition, and whether external support or safety devices influence the measurement.

Velocity tracking provides more information than maximum speed because practical robots must follow commands rather than simply move as fast as possible. Tests can command a sequence of forward, lateral, and rotational velocities and compare them with measured body motion. Metrics such as mean absolute error, root mean square error, settling time, overshoot, and steady-state bias reveal how accurately the locomotion controller responds across the operational velocity envelope.

Stability should be evaluated using multiple complementary indicators. Center of Pressure or ZMP margin relative to the support boundary provides information about available contact authority, while Capture Point or DCM tracking error characterizes unstable body motion. Base roll and pitch, angular velocity, CoM deviation, foot slip, and unexpected contact events provide additional evidence. No single scalar metric completely describes dynamic biped stability across all locomotion regimes.

Fall rate is a direct system-level reliability metric. A benchmark can repeat the same walking task many times and record successful completion, controlled recovery, emergency stop, and fall outcomes. Reporting only one successful demonstration can hide sensitivity to initialization, state-estimation noise, or contact variation. Repeated trials provide a statistical measure of whether the controller performs consistently rather than succeeding under one favorable condition.

Disturbance-rejection testing measures the robot\'s ability to remain upright when nominal locomotion is disrupted. Controlled pushes can be applied in forward, backward, and lateral directions at different gait phases. The benchmark should record disturbance magnitude, application duration, body location, gait state, and recovery behavior. Recovery can involve ankle regulation, hip motion, modified foot placement, additional steps, or coordinated whole-body momentum.

Push-recovery performance can be summarized using the largest disturbance that the robot can reject without falling, but the recovery process itself should also be measured. Useful quantities include peak DCM deviation, number of corrective steps, maximum footstep displacement, recovery time, body attitude excursion, and whether the commanded velocity is restored. These metrics distinguish rapid controlled recovery from cases in which the robot technically survives but remains unstable for an extended period.

Step-level performance should measure both spatial and temporal accuracy. Commanded and measured foothold positions can be compared in forward, lateral, vertical, and yaw directions, while touchdown timing can be compared with the planned contact schedule. Errors in foot placement directly affect future support geometry and may accumulate over multiple steps. Benchmarking should therefore examine both individual landing errors and long-horizon drift across repeated gait cycles.

Contact quality is particularly important because visually successful walking can conceal poor interaction with the ground. Measurements can include foot slip distance, impact force, contact-force distribution, premature toe or heel contact, and unintended edge loading. Excessive impact may reduce hardware life even if the robot remains balanced. A locomotion benchmark should therefore consider whether the achieved speed is compatible with acceptable mechanical loading and contact behavior.

Speed and stability should be examined as a tradeoff rather than as independent metrics. Increasing commanded velocity typically reduces the time available for swing-foot placement, state estimation, disturbance correction, and support transitions. A useful benchmark sweeps velocity gradually and records how tracking error, stability margin, impact force, slip, and fall probability change. The resulting performance envelope is more informative than a single advertised maximum speed.

Acceleration and deceleration capability should be benchmarked separately from steady walking. The robot can be commanded to transition from standing to a target velocity, change between velocity levels, and stop within a defined distance. Measurements can include acceleration, stopping distance, transient body attitude, peak contact force, and overshoot. Rapid speed changes often expose weaknesses that are not visible during constant-speed locomotion.

Turning performance extends the benchmark beyond straight-line motion. Tests can specify constant yaw rates, circular paths, slalom trajectories, or discrete heading changes while maintaining forward motion. Metrics include heading error, path deviation, inner and outer foot placement accuracy, speed reduction during turning, and stability margin. Turning at high speed is especially demanding because lateral balance and rotational momentum must be coordinated with asymmetric foot placement.

Lateral and diagonal locomotion should also be included because a humanoid may need to reposition without aligning its body with every movement direction. Side stepping changes the relationship between support width, hip motion, and lateral CoM dynamics. Benchmark commands can combine forward, lateral, and yaw velocities to evaluate multidirectional tracking. This exposes limitations that remain hidden when testing only forward walking on a straight path.

Terrain conditions should be standardized and progressively diversified. A baseline test can use a level, high-friction surface, followed by low-friction flooring, slopes, small height variations, stairs, and discrete footholds. The same controller should be evaluated across defined terrain classes where appropriate. Results should clearly identify environmental conditions because speed or stability values measured on different surfaces cannot be compared meaningfully without terrain context.

Energy efficiency provides another important dimension of locomotion performance. Electrical energy consumption can be measured over a known distance and normalized by robot mass, travel distance, or task duration. Mechanical cost of transport can also be estimated when actuator power is available. A fast controller that consumes excessive energy or generates high thermal load may be unsuitable for sustained deployment even when its short-duration locomotion performance appears strong.

Actuator utilization should be monitored throughout benchmark trials. Joint torque, velocity, power, temperature, and saturation frequency indicate how much hardware margin remains at a given locomotion speed. A gait that repeatedly reaches torque or velocity limits may have little robustness against disturbances. Reporting actuator margin together with speed helps distinguish sustainable performance from operation that depends on continuously pushing hardware close to its physical limits.

State-estimation robustness should be tested because locomotion performance depends on accurate feedback. Controlled sensor noise, latency, contact-detection errors, or temporary measurement degradation can be introduced in simulation and carefully reproduced in hardware where safe. Metrics should measure changes in tracking accuracy, stability, and recovery performance. This reveals whether a controller depends on unrealistically precise state information or remains functional under realistic uncertainty.

Control latency and computational performance should form part of the benchmark for production systems. Locomotion planning, policy inference, Whole-Body Control, and safety supervision must complete within their assigned deadlines. Measurements should include average execution time, worst-case latency, deadline misses, and timing jitter. A controller that performs well dynamically but cannot execute deterministically on the target computing platform is not ready for reliable deployment.

Model-based and learning-based controllers should be evaluated using the same physical tasks whenever possible. LIPM, DCM, MPC, Whole-Body Control, and RL-based policies may optimize different internal objectives, so comparison should focus on externally measurable behavior. Common metrics such as speed tracking, fall rate, disturbance recovery, energy use, contact quality, and actuator margin allow meaningful comparison without assuming that one controller architecture is inherently superior.

Simulation benchmarking is useful for large-scale parameter sweeps and dangerous failure conditions. Thousands of trials can vary friction, mass, payload, actuator strength, sensor noise, terrain, and disturbance magnitude. However, simulation results should not be treated as equivalent to hardware results. Real experiments reveal unmodeled compliance, backlash, communication delay, thermal effects, surface variation, and contact behavior that may substantially alter locomotion performance.

Hardware validation should progress from conservative tests toward the limits of the operating envelope. Initial trials can use low speed, flat terrain, and safety equipment before increasing velocity, disturbance magnitude, turning rate, and terrain difficulty. Safety systems should record intervention events because frequent protective stops indicate insufficient robustness even if falls are prevented. Benchmark results should distinguish autonomous recovery from external or supervisory intervention.

Repeatability requires standardized initial conditions and reporting procedures. Robot configuration, software version, payload, battery state, surface material, footwear, control frequency, and relevant controller parameters should be documented. Each test should contain enough repeated trials to characterize variation. Mean values should be accompanied by dispersion measures or success rates so that performance differences are not inferred from isolated best-case runs.

A comprehensive benchmark can summarize locomotion capability as a multidimensional operating envelope rather than one ranking score. Axes may include sustainable speed, velocity-tracking accuracy, disturbance tolerance, terrain difficulty, energy efficiency, actuator margin, and fall probability. This representation makes engineering tradeoffs visible and prevents optimization for one metric from concealing degradation elsewhere. It also supports systematic comparison between controller revisions.

Biped locomotion benchmarking ultimately determines whether improvements in control algorithms translate into reliable physical mobility. Speed demonstrates how rapidly the robot can move, while stability metrics reveal whether that motion remains controllable under disturbances, uncertainty, and hardware constraints. By combining repeatable speed tests, balance measurements, push recovery, contact analysis, energy evaluation, computational timing, and hardware validation, developers can quantify a humanoid\'s practical locomotion performance rather than relying on isolated demonstrations.


Author: Richard Minsoo Go

LinkedIn: Richard Minsoo Go

Top comments (0)