Skip to content

Bruncsoft/microbot-30

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro-bot 30

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.

What's in here

  • 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.

Joint budget (88 actuators)

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

The swarm run

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

How fast is it really?

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 ~66× real time on one M-series performance core.
  • The full 50-bot swarm runs ~12× 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.

Make it your own

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.xml

License

MIT — 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.

About

Micro-bot 30 — a 30 cm bipedal micro-robot with highly articulated fingers and toes. MuJoCo physics, MLX-accelerated swarm on Apple Silicon. Free & open.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages