Organizations: The authors are with the State Key Laboratory of Fluid Power & Mechatronic Systems, Key Laboratory of Soft Machines and Smart Devices of Zhejiang Province, Center for X-Mechanics, Department of Engineering Mechanics, Zhejiang University, 38 Zheda Road, Hangzhou 310027, China.
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.
Fig. 2: Overview of the CPG–ENN framework. The CPG coordinates gait rhythms, and a single feedback policy adjusts six motion parameters. The pretrained ENN, shared across all four legs and fixed during policy training, maps rhythmic signals and motion parameters to joint-angle targets tracked by a proportional–derivative (PD) controller.
Fig. 3: Phase relationships of the five gaits generated by the eight-neuron CPG. Numbers denote normalized leg-phase offsets within one gait cycle.
Fig. 4: Foot-trajectory parameters for offline ENN training. (a) Body height h , ground clearance gc , ground penetration gp , and step length ls in the sagittal plane. (b) Planar trajectory rotation by ψ about the +z -axis of the hip-abduction frame.
Fig. 5: Shared ENN architecture. Each leg’s 17-D input combines six global features (5-D gait encoding and body height) with eleven per-leg features. All four legs share one MLP, whose three joint-angle outputs per leg are concatenated into a 12-D reference.
Term
Expression
Weight wk
Forward velocity rvx
exp(−σ(vxcmd−vx)2)
4.0
Lateral velocity rvy
exp(−σ(vycmd−vy)2)
1.0
Yaw rate rωz
exp(−σ(ωzcmd−ωz)2)
1.2
Velocity achievement rva
31ν∈{x,y,ω}∑exp(−max(∣cν∣,ϵν)∣eν∣)
0.6
Energy rE
j∑∣τjq˙j∣
−10−4
Action rate rΔa
∥a~t−a~t−1∥22
−0.01
TABLE I: Reward terms used for policy training
PPO Parameters
Value
Batch size
98,304(4096×24)
Mini-batch size
24,576(4096×6)
Number of epochs
5 per update
Clip range
0.2
Entropy coefficient
0.005
Discount factor γ
0.99
TABLE II: Policy optimization and domain-randomization settings
Fig. 6: Velocity tracking under piecewise-random commands. Columns show walk, trot, pace, bound, and pronk; rows show body-frame forward velocity vxb , lateral velocity vyb , and yaw rate ωzb . Dashed curves show commands; colored curves and shading indicate the temporal mean and ±1 standard deviation within centered sliding windows, without crossing command changes.
Fig. 7: Policy outputs versus target velocities (left to right): step length ls,t and height ht versus forward velocity; trajectory orientation ψt versus lateral velocity; and left–right step-length difference Δls,t versus yaw rate. Colors denote gaits.
Fig. 8: Gait transitions: (a) walk → trot → pace → bound → pronk; (b) reverse sequence. Rows show forward velocity, policy height ht and measured base height, and roll/pitch. Solid curves show the mean, and shading indicates ±1 standard deviation across time-aligned rollouts with 10 randomly sampled sets of switch times. Vertical lines mark gait switches.
Fig. 9: Forward-speed tracking across five gaits: CPG–ENN (Ours), AllGaits, and WTW. (a–e) Walk, trot, pace, bound, and pronk. Dashed diagonals indicate ideal tracking. Filled/open markers denote in-distribution (ID)/out-of-distribution (OOD) commands relative to each controller’s gait-specific training range. Crossed markers denote failed trials, displayed at zero; stars denote trials with no forward motion. WTW excludes walk (N/A).
Fig. 10: Gait–speed transition benchmark. (a–c) CPG–ENN; (d–f) AllGaits; (g–i) WTW. Columns show forward-speed RMSE over 0–2 s after switching, speed-pair success rate, and gait-pair success rate. Rows and columns within each matrix denote source and target conditions, respectively. Each speed-pair cell summarizes supported gait transitions across switch times; each gait-pair cell summarizes speed pairs across switch times. RMSE uses only each method’s successful trials; success is defined in Sec. IV-A . Blue indicates lower RMSE or higher success; red indicates the opposite. Speed-matrix diagonals include gait changes at constant speed. Dashes mark excluded same-gait cases; hatching marks unsupported WTW transitions involving walk.
Variant
Success
Tacq
vx IAE
Δqdessw
Tilt RMS
(%) ↑
(s) ↓
(m) ↓
(rad) ↓
(rad) ↓
(a) Transition exposure and CPG transition rule
w/o Stage-1 curriculum
97.5
0.810
0.2562
0.5452
0.0391
w/o trans. exposure + initial-state reset
98.5
0.798
0.2971
0.4279
0.0467
w/o trans. exposure + intrinsic dynamics
98.0
1.191
0.5828
0.3357
0.0796
w/o trans. exposure + common-time
99.5
0.772
0.2924
0.5474
0.0401
TABLE IV: Ablation of transition exposure, CPG transition mechanisms, and bounded policy parameterization.
An animal with a weakened limb does not necessarily switch its gait, instead it unloads the affected limb, re-coordinates the remaining limbs, and scales its response with injury severity. This graded adaptation allows locomotion to persist despite partial loss of limb strength, rather than requiring a discrete transition between healthy and failed. Inspired by this behavior, we propose SG-CPG, a central pattern generator (CPG) for quadruped locomotion under continuous actuator degradation. SG-CPG preserves a frozen healthy CPG policy and introduces two severity-driven gates: a residual gate that re-coordinates all four legs and an amplitude gate that progressively shortens the weakened leg's stride as degradation increases. We emulate progressive degradation through two mechanisms: lowering the joint torque ceiling (ceiling mechanism) and scaling its low-level controller gains (gain mechanism), representing distinct forms of actuator weakening. Our simulations on a Unitree Go2 show that SG-CPG maintains a trot gait with 100% survival across an omnidirectional command schedule under 95% joint strength loss while tracking commands within 8%. Under a lowered torque ceiling, removing either severity path, the residual's severity observation or the amplitude gate, raises clipping at the weakened joint from 4.4% to 13.6% and 26.3% of steps at an 80% loss. On a real Go2, SG-CPG survives 28 of 29 forward and turning trials with up to 93% calf torque degradation. These results show that severity-gated adaptation can extend a healthy locomotion policy to progressive actuator degradation without treating the fault as a discrete failure.
Adarsh Kumar Kosta, Kaushik Roy
Department of Electrical and Computer Engineering, Purdue University, West Lafayette, IN 47906, USA
Robots are moving out of the structured factory floor and into unstructured environments such as disaster sites, planetary surfaces, and agricultural fields, for which the right robot often does not yet exist. We present GLAMDRING, a framework that synthesizes the optimal robot for a locomotion task and, jointly, learns the controller that drives it. For the given specifications of forward-velocity bounds, a per-actuator power budget, an actuator library, and a payload requirement, GLAMDRING returns a matched quadruped morphology (link geometry and per-joint actuators) and a Hopf-oscillator Central Pattern Generator (CPG) gait policy. We rank feasible designs against a target design objective, viz., maximum speed, minimum Cost of Transport (CoT), or max Payload Margin. Because body and locomotion are coupled, the optimal morphology dictates how a robot is driven, while optimal gait depends on the physical body. We train a small number of CPG policies by reinforcement learning across the space of candidate morphologies, co-learning the gait with the underlying robot hardware. Link lengths and actuators are then resolved post-hoc from the policy's logged operating envelope, reducing synthesis cost to a small, fixed number of reinforcement-learning runs instead of one per candidate. Our experiments show three key findings: co-designing body and gait is necessary to satisfy locomotion constraints; actuator-envelope feasibility, rather than locomotion success alone, determines realizable payload capacity; and canonical animal gaits emerge naturally in most designs from morphology and constraints alone. A real-world demonstration further highlights the efficacy of our work.
Reinforcement learning (RL) for quadruped locomotion commonly depends on fixed, hand-crafted, and Markovian reward functions that limit both interpretability of learned policies and lack explicit control over gait behaviors. We introduce a framework where distinct gaits are specified using parameterized constraints expressed in Signal Temporal Logic (STL). These include safety bounds, gait synchronization constraints, command tracking, and actuation bounds. From these specifications, we develop a reward shaping mechanism that provides learning agents a dense, continuous reward landscape that encodes desired behavior. We define parametric STL templates for three speed regimes (walking-trot, trot, bound), calibrate their parameters from reference rollouts, and compute rewards from using smooth approximations of STL robustness over the rollouts. The generated rewards can be used to provide shaped gradients compatible with Proximal Policy Optimization (PPO). We instantiate the approach on Google's Barkour quadruped robot in MuJoCo XLA (MJX). We use parallelization within the simulator to improve training speeds and use domain randomization to robustify learned policies. We show that compared to a baseline of hand-crafted rewards, the STL-shaped rewards yield tighter velocity tracking and more stable training. Videos can be found on our project website: https://stl-locomotion.github.io/.