Sim-to-Real Transfer
MH-FLOCKE runs on real quadruped hardware with the same SNN and cerebellum code as the MuJoCo simulator — one codebase, multiple bodies. The current public platform is the Petoi Bittle X, driven over a WiFi bridge from a host PC. The Freenove Robot Dog (Raspberry Pi 4, on-board, FNK0050 ~100€) is the platform documented in Paper 2; a brain trained in simulation transfers directly to it.
Bittle — WiFi Bridge (current public platform)
The Petoi Bittle X (8-DOF, BiBoard) runs the same brain over WiFi: the robot streams its IMU and receives joint commands over a WebSocket (ws://<robot-ip>:81) while the SNN runs on a host PC. The SNN learns fresh on hardware via R-STDP — no pretraining required.
- Robot: Petoi Bittle X (BiBoard V0_1, WiFi)
- Bridge:
scripts/bridge_bittle_wifi.py(runs on a host PC) - SNN: 535 neurons (19 MF + 278 GrC + 49 GoC + 16 PkC + 16 DCN + 141 MH + 16 OUT)
- Loop rate: ~4 Hz (WiFi round-trip bound)
# 1) Check the link (reads IMU, no motion)
python scripts/bridge_bittle_wifi.py --ip <robot-ip>
# 2) Walk with the SNN (fresh weights, learns online via R-STDP)
python scripts/bridge_bittle_wifi.py --ip <robot-ip> --gait-loop --snn --duration 30
# 3) Same run with the live dashboard
python scripts/bridge_bittle_wifi.py --ip <robot-ip> --gait-loop --snn --dashboard --duration 30
# then open the local file src/viz/bridge_live.html
# (do NOT browse to http://localhost:5001 — that endpoint is a raw WebSocket)
Useful flags: --yaw-pid (IMU yaw drift compensation), --cerebellum, --snn-brain <path> (load saved weights), --recover (kbalance posture after a fall, keeps weights). Each run writes telemetry.jsonl and brain.pt into its own creatures/bittle/bridge_<timestamp>/ folder. The bridge does not self-right from a fully supine position.
Freenove Setup (Paper 2)
- Kit: Freenove FNK0050 (~100€)
- Compute: Raspberry Pi 4 (2GB+ RAM)
- Servos: 12× SG90 via PCA9685 (I2C 0x40)
- IMU: MPU6050 (I2C 0x68) — pitch, roll, yaw
- Camera: Pi Camera v2 (320×240 @ 15fps for phototaxis)
- SNN: 560 neurons (48 MF + 269 GrC + 47 GoC + 24 PkC + 24 DCN + 136 MH + 12 OUT)
- Performance: 38 steps/sec, ~5 watts total
Freenove Bridge v4.4
The hardware bridge (freenove_bridge.py) is a standalone script that runs on the Pi. It imports src/brain/ directly — the same PyTorch SNN, the same cerebellar learning, the same topology computation. No simplified model, no NumPy port.
# Walk with SNN + Cerebellum
python3 freenove_bridge.py --gait walk --snn --verbose --duration 120
# Phototaxis: navigate toward a light source
python3 freenove_bridge.py --gait walk --snn --phototaxis --speed 1.5 --verbose --duration 60
# Transfer sim-trained brain
scp creatures/freenove/brain/brain.pt user@pi:~/brain.pt
python3 freenove_bridge.py --gait walk --snn --verbose --duration 120
Freenove PID Steering
The robot compensates mechanical drift automatically using a PID controller with IMU feedback. The camera provides target heading (light source position), the IMU provides actual heading, and the PID drives asymmetric stride — left legs longer stride makes the dog curve right, like tank steering.
Hardware PID gains: Kp=0.05, Ki=0.01, Kd=0.015. The I-term eliminates steady-state drift offset caused by servo tolerances and weight asymmetry.
Every Freenove unit has different drift characteristics. MH-FLOCKE handles this automatically — no manual calibration needed.
Hardware Drift Simulation
Measured drift from the real robot is injected into the MuJoCo simulator so training faces realistic challenges. Drift profiles in creatures/freenove/drift_profiles/ describe per-robot mechanical characteristics (yaw rate, roll bias, servo asymmetry).
# Train with measured hardware drift
python scripts/train_baby.py --creature-name freenove --phototaxis \
--drift-profile creatures/freenove/drift_profiles/measured_marc_01.json \
--hardware-sensors --no-vision --steps 50000 --no-llm --fresh
Freenove Hardware Test Results
- Dog approaches light source: obstacle distance drops from 0.52m to 0.17m in 60 seconds
- PID actively compensates ~2°/s mechanical drift
- No tip-overs with asymmetric stride steering (previous Z-offset approach caused falls)
- SpatialMap persists between sessions on the Pi
Freenove Live Dashboard
The Bridge includes a web dashboard on port 8080 showing all 6 cerebellar populations with live spike data, servo angles, competence gate, and neuromodulation levels.
python3 freenove_bridge.py --gait walk --snn --dashboard --verbose --duration 300
# Open http://pi-hostname:8080
Full deployment guide: FREENOVE_PI_DEPLOY.md on GitHub