Source-linked AI summary
A Trainable CPG Framework for Quadruped Locomotion
Xiyan Liu, Yide Liu, Guoyong Mao, Shaoxing Qu
TL;DR
The paper addresses limitations in speed tracking and transitions when a multi-gait CPG relies on predefined gait-specific motion parameters. It combines explicit CPG rhythm generation with learned joint-space motion realization and feedback modulation. The framework supports five gaits and reports reliable gait transitions, including without transition training.
Problem
An existing eight-neuron CPG supported five quadrupedal gaits and transitions but relied on predefined gait-specific motion parameters, with speed scaling that did not track target velocity and some transitions showing lower success and large speed transients.
Source: §I · p. 1Method
CPG–ENN combines CPG rhythm generation with a leg-shared ENN mapping rhythmic signals and trajectory parameters to joint targets, while one feedback policy adjusts six motion parameters.
Source: §I · pp. 1–2Results
The controller achieves close to 100% transition success across all 20 directed gait pairs, and ablations show high success without transition exposure.
Source: §I · p. 2, E. Ablation of CPG Transition… · p. 7Takeaways & Limitations
One policy realizes walk, trot, pace, bound, and pronk with a shared modulation space and reward formulation, without gait-specific learned controllers or gait-style rewards.
Source: §I · p. 2
Abstract
from arXiv · showhide
We present CPG-ENN, a trainable quadruped locomotion framework that combines explicit neural coordination with learned motion realization. A symmetry-based eight-neuron central pattern generator (CPG) supplies gait rhythms, while a pretrained, leg-shared execution neural network (ENN) maps rhythmic signals and trajectory parameters to joint-angle references without online inverse kinematics. A single feedback policy modulates six physically interpretable trajectory variables. The controller tracks planar velocity and yaw-rate commands across walk, trot, pace, bound, and pronk without gait-specific learned controllers or transitionspecific rewards. Simulation yields 99.39% transition success across all 20 directed gait pairs and all source-target speed combinations from {0.5, 1.0, 1.5, 2.0} m/s. Ablations show high cross-gait transition feasibility without transition exposure; exposure mainly refines gait acquisition and velocity transients. Comparisons with AllGaits and Walk These Ways demonstrate accurate gait-speed regulation, and Unitree Go2 experiments validate five gaits and their transitions.
I. INTRODUCTION
The introduction motivates a controller that preserves explicit rhythmic coordination while learning motion realization and velocity feedback. CPG–ENN applies one modulation space and reward formulation across five gaits, with reliable transitions across all 20 directed gait pairs.
I. INTRODUCTION
- Animal locomotion is described as innately organized yet trainable: neural mechanisms generate rhythmic coordination, while learning refines its expression.The introduction motivates a robotic architecture that preserves explicit rhythm generation while enabling learned modulation.Source: §I · p. 1
- CPG–ENN retains CPG coordination while learning to map CPG signals and independently defined trajectory shapes to motion.The ENN maps signals and motion parameters to joint targets; offline IK supplies joint-angle supervision, and one feedback policy adjusts six motion parameters using target velocities and proprioception.Source: §I · pp. 1–2
- An earlier eight-neuron CPG supported five quadrupedal gaits and transitions but relied on predefined gait-specific motion parameters and showed speed-tracking and transition limitations.Step-length scaling changed speed without tracking a target velocity, and some transitions had lower success and large speed transients.Source: §I · p. 1
- A single policy realizes walk, trot, pace, bound, and pronk using the same modulation space and reward formulation, without gait-specific learned controllers or gait-style rewards.The CPG specifies gait rhythm, while the policy adapts motion to commands and proprioception.Source: §I · p. 2
- The controller achieves an overall success rate close to 100% across all 20 directed gait pairs.Ablations indicate reliable transitions persist without transition training; training mainly shortens gait acquisition and reduces post-switch velocity error.Source: §I · p. 2
A. Learning-Based and CPG-Based Legged Locomotion
- The framework places learning at different levels of motion generation from prior hybrid controllers, and instead learns a shared mapping from CPG signals and motion parameters to joint targets.Prior approaches place learned feedback in oscillator dynamics, trajectory generation, or joint-space realization.Source: §I · p. 1, A. Learning-Based and CPG-Based Legged… · p. 2
B. Multi-Gait Locomotion and Transitions
The paper situates CPG–ENN among multi-gait controllers and describes its pipeline from commanded gait rhythms to joint references. Its eight-neuron CPG uses gait-dependent phase relationships, with rhythmic coordination generated by coupled neuron layers.
B. Multi-Gait Locomotion and Transitions
- AllGaits uses coupled oscillators, explicit foot-trajectory mappings, and online IK, whereas CPG–ENN learns a shared mapping from CPG signals and motion parameters to joint targets.Other cited approaches include multi-gait policies, phase-based controllers, energy minimization or viability, and gait-parameter or disentangled representations.Source: B. Multi-Gait Locomotion and Transitions · p. 2
A. Overview
- The actor maps commands and proprioception to six trajectory-modulation variables, while the eight-neuron CPG supplies the commanded gait rhythm and a leg-shared ENN maps rhythmic signals and parameters to desired joint positions.A joint-level PD controller tracks the references, and training uses offline IK joint targets; the ENN is frozen during policy optimization.Source: A. Overview · p. 2
1) CPG Rhythm Generation:
- The eight-neuron CPG comprises two four-neuron layers and provides gait-dependent phase relationships for walk, trot, pace, bound, and pronk.Its neuron model is described by the Stein model; the driving signals combine periodic drive with within- and cross-layer coupling, with gait-specific parameter settings following.Source: 1) CPG Rhythm Generation · p. 2
2) Locomotion Trajectory Parameterization:
Foot-trajectory shapes are defined independently of CPG signals and converted by inverse kinematics into joint-angle supervision. Their parameters describe trajectory geometry and timing, with leg side determining lateral placement.
2) Locomotion Trajectory Parameterization:
- Offline ENN supervision converts independently defined foot trajectories into joint-angle targets using inverse kinematics.The trajectory is parameterized by body height, duty factor, ground clearance, ground penetration, step length, and orientation.Source: 2) Locomotion Trajectory… · p. 2
- Duty factor is the stance-duration fraction of a gait cycle, while phase moves from π to 0 during swing and 0 to −π during stance.Source: 2) Locomotion Trajectory… · p. 2
- The foot-position description uses the lateral hip-axis offset and assigns opposite side signs to left and right legs.The lateral offset is between the hip-abduction and hip-flexion axes; left legs use +1 and right legs use −1.Source: 2) Locomotion Trajectory… · p. 2
- The trajectory controls include body height, ground clearance, ground penetration, and step length in the sagittal plane, plus planar rotation ψ about the hip-abduction frame’s +z-axis.Source: Figure 4 · p. 3
3) Learned Joint-Space Realization:
A single leg-shared ENN learns to realize CPG states and trajectory parameters as joint-angle references, using offline IK-derived supervision. After pretraining, it remains fixed during policy optimization and deployment.
3) Learned Joint-Space Realization:
- The ENN maps CPG states and motion parameters to IK-derived joint targets, using one MLP shared across all four legs.Source: 3) Learned Joint-Space Realization · p. 3
- Each leg’s 17-D input combines six global features, including a 5-D gait encoding and body height, with eleven per-leg features; three outputs per leg form a 12-D reference.Source: Figure 5 · p. 3
- The input ranges for body height, duty factor, ground clearance, ground penetration, step length, and orientation are linearly mapped to [−1, 1] during offline pretraining.Source: 3) Learned Joint-Space Realization · p. 3
- Training covers all five gait encodings and minimizes mean-squared joint-angle error; the MLP uses ELU activations and is pretrained with AdamW.The initial learning rate is 10−3 and weight decay is 10−5.Source: 3) Learned Joint-Space Realization · p. 3
- After pretraining, the ENN is fixed during policy optimization and deployment, generating joint-angle references without online trajectory evaluation or inverse kinematics.Source: 3) Learned Joint-Space Realization · p. 4
C. Reinforcement Learning for Trajectory Modulation
The framework trains an asymmetric actor–critic policy for trajectory modulation. During training, the critic receives privileged observations, while the actor uses a partial observation that excludes base linear velocity.
C. Reinforcement Learning for Trajectory Modulation
- The policy uses an asymmetric actor–critic architecture.Source: C. Reinforcement Learning for… · p. 4
1) Observation Space:
- The critic’s training observation includes base-frame velocities, unit gravity direction, joint-position offsets, joint velocities, and the velocity command.It also includes cached CPG state and derivative, normalized modulation parameters available before the action, and executed-action history.Source: 1) Observation Space · p. 4
- The actor receives a partial observation that excludes base linear velocity from the critic’s observation.Source: 1) Observation Space · p. 4
2) Action Space:
The actor’s bounded six-dimensional action is perturbed and mapped to six trajectory-modulation variables. Their ranges stay within the ENN training domain, while duty factor is set by the commanded gait rather than the policy.
2) Action Space:
- After perturbations, the executed action is mapped to six trajectory-modulation variables.Source: 2) Action Space · p. 4
- The modulation ranges for body height, ground clearance, ground penetration, and step length remain within the ENN training domain; orientation ψ ranges from −0.35 to 0.35 rad.The executed turn modulation δturn ranges from −1 to 1.Source: 2) Action Space · p. 4
- Duty factor is not policy-controlled: the gait command sets it to 0.75 for walk, 0.70 for trot, 0.68 for pace, 0.55 for bound, and 0.58 for pronk.Source: 2) Action Space · p. 4
3) Reward Function:
All five gaits use the same reward terms, while bounded trajectory-modulation actions are modeled with a Beta policy.
3) Reward Function:
- The shared reward combines four command-tracking terms with nine regularizers, without foot-timing or gait-style rewards.The CPG supplies gait coordination.Source: 3) Reward Function · p. 4
4) Beta Policy for Bounded Actions:
- Independent Beta distributions match the finite support of physically bounded trajectory-modulation variables, avoiding the clipping mismatch of an unbounded Gaussian policy.The policy is optimized with PPO.Source: 4) Beta Policy for Bounded Actions · p. 4
- Each action dimension uses parameters greater than one, and inference uses the Beta distribution mean as the action.The parameters are obtained with a softplus followed by a unit offset.Source: 4) Beta Policy for Bounded Actions · p. 4
D. Training Procedure
Training expands a single policy from trot to five gaits and then adds cross-gait transitions, while keeping the architecture, reward, and modulation interface fixed. Across the five gaits, the policy tracks forward and lateral velocity and yaw-rate commands, with stride and posture adapting to commands.
D. Training Procedure
- Stage 1 expands gait coverage from trot to all five gaits; Stage 2 replaces 50% of episodes with one of the 20 ordered cross-gait transitions while retaining the final single-gait distribution.The architecture, reward, and modulation interface remain unchanged.Source: D. Training Procedure · p. 4
- At gait switches, common-time state selection chooses the target gait’s CPG state at the current global time, without interpolation or oscillator reset.Training randomizes contact properties, rigid-body dynamics, actuation, and action execution for sim-to-real robustness.Source: D. Training Procedure · p. 4
A. Experimental Setup
- Evaluation covers command-responsive locomotion, cross-gait transitions, and gait–speed generalization; transition success requires target-gait acquisition within 4 s and specified posture and height bounds.The setup reports velocity-tracking RMSE, absolute mean forward-speed error, and integrated absolute error for ablations.Source: §IV · p. 4, A. Experimental Setup · p. 5
B. Single-Policy Multi-Gait Locomotion
- Across the five gaits, the policy tracks forward velocity, lateral velocity, and yaw rate, with full-record RMSEs of 0.073–0.149 m/s, 0.029–0.078 m/s, and 0.052–0.098 rad/s, respectively.Figure 6 shows command and measured-response traces by gait, with temporal means and standard deviations.Source: Figure 6 · p. 5, B. Single-Policy Multi-Gait Locomotion · p. 5
- Step length generally increases with commanded speed; trajectory orientation rises with lateral-velocity commands, while left–right step-length difference generally decreases with yaw-rate commands.Trot and pace combine longer steps with lower trajectory height, whereas pronk uses shorter steps and higher height over its higher-speed range.Source: B. Single-Policy Multi-Gait Locomotion · p. 5, Figure 7 · p. 5
C. Unified Multi-Gait Transitions
The same policy executes gait sequences in both directions, maintaining forward locomotion and recovering target speed after switches. Base height follows the gait-conditioned policy output across transition directions.
C. Unified Multi-Gait Transitions
- Across 5 s gait segments in both transition sequences, forward-velocity RMSEs range from 0.0402 to 0.0764 m/s; peak mean-response roll and pitch are 0.0434 and 0.0726 rad.Figure 8 presents forward velocity, policy and measured base height, and roll/pitch across the two sequences.Source: C. Unified Multi-Gait Transitions · p. 5, Figure 8 · p. 6
- Measured base height follows the gait-dependent policy height and reaches comparable levels for the same gait in both transition directions.This consistency indicates gait-conditioned motion realization is retained across the two transition sequences.Source: C. Unified Multi-Gait Transitions · p. 6
D. Comparative Evaluation in the Gait–Speed Space
- The comparison evaluates CPG–ENN and AllGaits on five gaits, and WTW on four, excluding walk, using shared command grids and success criteria where gait sets overlap.The compared systems are Go2 adaptations.Source: D. Comparative Evaluation in the… · p. 6
1) Forward-Speed Tracking Across Five Gaits:
CPG–ENN tracks forward speed across five gaits and outperforms the evaluated baselines on the gait–speed transition benchmark. Ablations show that transition feasibility is present without transition exposure, while transition rules and bounded policy parameterization shape transient performance.
1) Forward-Speed Tracking Across Five Gaits:
- CPG–ENN maintained forward locomotion in all five gaits and kept absolute mean forward-speed errors below 0.10 m/s over 0.3–2.0 m/s.Bound and pronk reached 2.34 and 2.98 m/s, respectively, under a 3.0 m/s command, beyond their 2.0 m/s upper training limit.Source: 1) Forward-Speed Tracking Across Five… · p. 6, Figure 9 · p. 6
2) Gait–Speed Transition Performance:
- CPG–ENN maintained 96.7–100% success across gait pairs and 97.4–100% across speed pairs, while baselines had gait- or speed-dependent failure regions.The evaluated grid spans all 20 directed gait pairs and 16 source–target speed pairs.Source: 2) Gait–Speed Transition Performance · p. 6, Figure 10 · p. 7
- 99.39% transition success for CPG–ENN exceeded AllGaits (91.41%) and WTW (95.63%) across the tested gait–speed grid.Mean trial-wise RMSE over successful trials was 0.133 m/s for CPG–ENN, 0.259 for AllGaits, and 0.282 m/s for WTW.Source: 2) Gait–Speed Transition Performance · p. 6, Figure 10 · p. 7
E. Ablation of CPG Transition Mechanisms and Bounded Policy Parameterization
- Without transition exposure, all three CPG transition rules retained 98.0–99.5% success, indicating that transition feasibility was not learned solely from transition episodes.Common-time state selection had the best overall balance of gait acquisition, velocity regulation, and postural stability; intrinsic-dynamics transitions increased acquisition time, velocity IAE, and base tilt.Source: E. Ablation of CPG Transition… · p. 7
- Adding transition exposure with common-time selection raised success from 99.5% to 100%, reduced acquisition time from 0.772 to 0.714 s, and lowered forward-velocity IAE by 12.6%.Removing the Stage 1 curriculum mainly reduced transition reliability and slowed gait acquisition.Source: E. Ablation of CPG Transition… · pp. 7–8
- Under the full curriculum and common-time rule, tanh-squashed Gaussian restored 100% success and closely matched Beta, while clipped Gaussian PPO had lower success and larger joint discontinuities.Beta had slightly lower velocity IAE, joint discontinuity, and base-tilt RMS; tanh-squashed Gaussian had slightly faster acquisition.Source: E. Ablation of CPG Transition… · p. 8, Table IV · p. 8
V. CONCLUSIONS
CPG–ENN separates explicit rhythmic coordination from learned motion realization and tracks velocity across gaits, including transfer to Unitree Go2 without fine-tuning. In the tested gait–speed benchmark, it had higher transition success and lower post-switch velocity error than the evaluated baselines; reliable switching did not require transition training.
V. CONCLUSIONS
- The framework separates explicit rhythmic coordination from learned motion realization and was transferred to Unitree Go2 without fine-tuning.Future work will incorporate terrain feedback and autonomous gait selection for uneven terrain.Source: §V · p. 8