On-Device Spiking Neural Network Locomotion Learning on a €100 Quadruped: Sim-to-Real with Brain Persistence
I present a complete Sim-to-Real pipeline for quadruped locomotion using biologically grounded spiking neural networks (SNNs) on a €100 Freenove Robot Dog Kit (FNK0050) with a Raspberry Pi 4. The system employs 232 Izhikevich neurons with reward-modulated spike-timing-dependent plasticity (R-STDP), a central pattern generator (CPG) for innate gait rhythm, and a cerebellar forward model for balance correction. Training occurs in MuJoCo simulation using a custom MJCF model of the Freenove hardware, achieving 8.22 m forward distance with zero falls in 50,000 steps (original training run; Table 3 compares CPG vs Full Stack configurations). The trained brain transfers to real hardware via a Bridge architecture mapping SNN motor outputs to servo commands with real-time IMU feedback (MPU6050). On-device learning enables the robot to reach actor competence 1.0 within 2,000 steps (40 seconds at 50 Hz). Brain persistence across sessions is demonstrated: a loaded brain achieves competence 1.0 from step 1, while a fresh brain requires 2,000 steps. A key finding: cerebellar correction magnitude is zero in simulation (where CPG produces clean movement) but non-zero on real hardware (where IMU noise and servo imprecision create real errors). This confirms the cerebellum's role as an error-driven adaptive system, not a pattern generator. The same architecture runs on the Unitree Go2 in simulation (45.15 ± 0.67 m, 10 seeds). All code is open source under Apache 2.0. Changelog: v2.0: Reference [1] corrected (Espinal et al., not Rostro-González; Comput. Intell. Neurosci. 2016, not Front. Neurosci. 2015). Table 7 C1 values corrected (22.35 ± 11.50 m, was incorrectly showing B1 values). Added simulation comparison (CPG-only 8.45 m vs Full Stack 9.85 m). Added cerebellar finding: correction magnitude zero in simulation, non-zero on hardware. Added upright metric formula. R-STDP formulation with Izhikevich parameters added. Neuron count reduction (4,650→232) explained. Session breakdown clarified. Language revision (I throughout). Unicode rendering fixed.
Authors
- Marc Hesse (ORCID: https://orcid.org/0000-0002-9500-3284)
Institutions
- EngenderHealth (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-06-09
- DOI
- https://doi.org/10.5281/zenodo.19481145
- Primary Topic
- Robotic Locomotion and Control
- Type
- preprint