Requirements
- Python 3.11+
- MuJoCo (via
pip install mujoco) - PyTorch
- NumPy, msgpack
Installation
git clone https://github.com/MarcHesse/mhflocke.git
cd mhflocke
pip install -r requirements.txt
The public main branch is the Bittle-only release (v0.8.0). The earlier Go2 (Paper 1) and Freenove (Paper 2) platforms are preserved as git tags — run git checkout v0.4.1-paper1 or git checkout v0.4.3-paper2 to reproduce those results with their original assets.
First Training Run (Bittle, simulation)
# Train the Bittle on flat ground: OpenCat Trot gait + SNN refinement.
# --neural-cpg is REQUIRED for the Bittle — it loads the OpenCat Trot controller.
# Without it the SpinalCPG path is used and the robot falls immediately.
python scripts/train_baby.py --creature-name bittle --neural-cpg \
--scene flat --steps 25000 --hardware-sensors --fresh --snn-substeps 10
The creature walks from step 1 — the CPG provides the gait — and the SNN refines it through R-STDP as the competence gate hands control from the CPG toward the learned actor.
Analyzing Results
# FLOG dashboard (web-based)
python flog_server.py
# Open http://localhost:5050
# Render a training video with dashboard overlay
python scripts/render_bittle.py creatures/bittle/<run>/training_log.bin --speed 3
# Add data-driven audio (sonification)
python scripts/sonify_flog.py --flog creatures/bittle/<run>/training_log.bin --speed 2 --mux output.mp4
Running on Real Hardware
The Bittle runs over a WiFi bridge from a host PC, using the same src/brain/ code as the simulator. See Hardware for the full WiFi quickstart (channel check → live gait with the SNN → live dashboard). The Freenove Robot Dog deployment on a Raspberry Pi 4 is documented there as the Paper 2 platform.
Key CLI Parameters
| Parameter | Description |
|---|---|
--creature-name |
Robot body: bittle (Go2 / Freenove live on the paper tags) |
--neural-cpg |
Load the OpenCat Trot controller — required for the Bittle |
--scene |
Training scene, e.g. flat |
--steps |
Training steps (~25k typical for the Bittle) |
--hardware-sensors |
Use the hardware sensor layout |
--snn-substeps |
SNN integration substeps per control step |
--fresh |
Ignore any saved brain, start from scratch |