A 30 cm-tall bipedal micro-robot with legs and highly articulated digits — multi-jointed fingers on both hands and multi-jointed toes on both feet. Simulated in MuJoCo, with the swarm controller and batched control maths running in MLX on Apple Silicon.
Free and open. This is the first in a series of MuJoCo + MLX robot models — each one lives in its own public repo. Custom/commissioned simulations: bruncsoft.com/robotics .
model/microbot30.xml— the MuJoCo model. 78 bodies, 88 actuated joints, 62 geoms. The digits articulate freely (spread + curl per phalanx) but don't generate contacts, which keeps a big swarm fast without losing the finger/toe motion that's the whole point.model/build_model.py— the parametric builder that generates the XML. Change the number of fingers, toes or phalanges in one place and regenerate; left/right stay symmetric by construction.microbot30/swarm.py— the MLX-accelerated swarm runner.run.py— the CLI.
| Region | Joints |
|---|---|
| Legs (hip ×ばつ3, knee, ankle ×ばつ2) ×ばつ 2 | 12 |
| Toes (4 per foot, spread + 2 curls) ×ばつ 2 | 24 |
| Arms (shoulder ×ばつ3, elbow, wrist ×ばつ2) ×ばつ 2 | 12 |
| Fingers (4 per hand, spread + 3 curls) + thumb ×ばつ 2 | 38 |
| Neck (pitch, yaw) | 2 |
We launch 50 micro-bots at once and let each one live through 10 hours of
simulated time. Physics runs in MuJoCo across a thread pool (MuJoCo releases
the GIL inside mj_step, so threads give real multi-core parallelism); MLX
generates each bot's controller parameters in one batched pass, so the swarm
explores a spread of gaits and finger/toe motions.
# install (Python 3.11+ on Apple Silicon recommended) python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt # the reference run: 50 bots, 10 simulated hours python run.py # quick smoke test: 50 bots, 60 simulated seconds python run.py --sim-seconds 60 # watch a single bot live python run.py --view
The runner measures and prints the achieved speedup rather than asserting it — it depends on your machine's core count.
- A single bot simulates at ×ばつ real time on one M-series performance core.
- The full 50-bot swarm runs ×ばつ real time on a 10-core Mac (≈50 minutes for 10 simulated hours) in the reference config.
- The headline target — 50 bots ×ばつ 10 simulated hours in ~10 wall-clock
minutes — is reached on higher-core Apple Silicon (Max/Ultra) or with a
GPU-batched backend. Throughput scales with cores: more cores → closer to the
target. Dial the run with
--sim-hours,--bots,--control-hz,--threads.
The simulation is real either way; only the wall-clock-to-target ratio depends on the hardware.
The controller in swarm.py is a central pattern generator whose per-joint
phase and amplitude are seeded per bot. Drop in your own MLX policy by replacing
SwarmController — same interface, (n_bots, n_act) targets per control tick.
To reshape the robot, edit the anatomy constants at the top of
model/build_model.py and run it:
python model/build_model.py # rewrites model/microbot30.xmlMIT — see LICENSE. The model and code are free to use, fork and build on. Attribution appreciated, not required.
Built by Viktor Brunclík / Bruncsoft. Need a specific robot simulated? bruncsoft.com/robotics .