Skip to main content

macbot

LeRobot on a MacBook.
One standard workflow to teleoperate, record, export and run LeRobot policies such as ACT, π0.5, SmolVLA and X-VLA on the robot, with fast inference on Apple silicon.

macOS Python LeRobot License tests

English · 中文

Collect on the robot, export a LeRobot dataset, train on a GPU, bring the checkpoint back and run it on the MacBook

Why

Real-robot setups usually assume an Ubuntu workstation with an NVIDIA GPU next to the arm. We found a MacBook is enough for everything that happens at the robot: teleoperated data collection, data checks, export to LeRobot, and closed-loop policy inference, π0.5 included. Training still goes to a GPU machine. macbot is the toolkit we use for that, cleaned up so others can reuse it.

Measured on a MacBook Pro (M5 Pro, 48 GB). Approximate time per action chunk:

Policy Chunk PyTorch MPS MLX
π0.5 50 270 ms 165 ms
π0.5 with RTC 50 350 ms 170 ms
SmolVLA 50 300 ms —
X-VLA 30 235 ms —
ACT 100 25 ms —

π0.5 runs 10 denoising steps, in bf16 with torch.compile on PyTorch and in fp16 with --backend mlx. The MLX actions match PyTorch within 0.1° on average. RTC is Real-Time Chunking guidance. SmolVLA is the official base checkpoint and X-VLA the SO-101 fine-tune. Method and full results are in docs/acceleration.md, other policies in docs/policies.md.

Data collection Measured
Teleoperation loop 60 Hz
Recording 30 fps
Camera frame age at sampling, p95 ≤ 40 ms

What is inside

  • Collection console in the browser: live cameras, one-key record / save / discard, per-episode language instruction, automatic quality checks (frame age, repeated frames, joint jumps, timing), instant replay of any episode with joint traces.
  • Export to a LeRobot v3 dataset, optionally with a binary (open / closed) gripper action.
  • Policy runner console for LeRobot checkpoints. ACT and π0.5 have four execution schemes (synchronous chunks, temporal ensembling, asynchronous chunks, Real-Time Chunking), velocity and joint limits, pause / home / quit with a slow two-stage return to zero, and every trial saved with video and timing.
  • Replay of saved trials (all cameras in sync, command vs. measured traces, chunk boundaries) and side-by-side MP4 export.
  • macbot doctor checks packages, MPS and the configured robot and cameras before you start.
  • --fake on collect and run substitutes a fake arm and cameras; run still runs the policy.
  • English and Chinese in every web page (toggle in the top bar), light and dark mode.

The macbot collection console

Run a policy Replay a trial
Policy runner Trial replay

Hardware

The reBot B601-RS is the reference arm tested on hardware. See robot support for the SO-100/101 and other compatible LeRobot arms, the local simulator, and what has been verified. See policy support for tested checkpoints and Apple GPU compatibility. The setup guide covers drivers and cameras. For π0.5, we recommend an Apple silicon Mac with at least 32 GB of memory.

Quick start

pip install macbot
macbot init
macbot collect

Use Python 3.12+ on Apple silicon and install the Xcode Command Line Tools for UVC cameras. Confirm the arms and camera roles in the setup page, then follow its calibration prompts. Open the collection URL printed in Terminal. Press S to record, Enter to save, ← to discard. See the quickstart for a fresh Mac, a hardware-free trial, and reBot and Orbbec setup.

Workflow

sudo -E $(which python) -m macbot.cli collect          # 1. teleoperate and record (sudo: Orbbec SDK)
macbot health                                          # 2. per-episode tracking and timing report
macbot export --gripper binary                         # 3. LeRobot dataset in ~/macbot-data/datasets/
DATASET=... ./train/train_pi05.sh my_run               # 4. train on a GPU machine (train_act.sh for ACT)
sudo -E $(which python) -m macbot.cli run --policy runs/my_run/checkpoints/last/pretrained_model
macbot replay                                          # 5. browse trials;  macbot video <rollout.npz> for an MP4

The full walkthrough, including the data format and the execution schemes, is in docs/guide.md. Put your settings in a YAML file and pass macbot --config my.yaml <command>; anything you leave out falls back to macbot/default.yaml. configs/example.yaml is a starting point.

What it took to run this on macOS

  • CAN under sudo. The Orbbec SDK needs root, and dyld ignores /usr/local/lib for root processes, so libPCBUSB.dylib is preloaded explicitly before the CAN backend looks for it.
  • The right camera. Opening a UVC camera by name or index can grab an iPhone through Continuity Camera. macbot opens cameras by AVFoundation uniqueID through a small Swift helper, and still finds the camera when it moves to another USB port.
  • π0.5 on MPS. bf16 weights under autocast; the masked third camera slot is skipped (identical output, ~70 ms saved); torch.compile on the denoising step and the language model cuts per-kernel dispatch overhead (~410 → ~280 ms); the random weight initialization that the checkpoint overwrites anyway is skipped, which saves about 80 s per load.
  • Optional π0.5 on MLX. See the inference benchmarks for recorded-observation latency, action fidelity, and the checkpoint requirements.
  • Files written as root are handed back to the user who ran sudo.

Contributing

See CONTRIBUTING for development and hardware reports, architecture for the code layout, and the roadmap for planned work.

Safety

macbot moves a real arm. Every console starts paused or idle, limits joint speed and range, clamps the gripper force, pauses when a camera stalls, and returns to zero slowly before disabling the motors. Keep the workspace clear and a hand near the power switch, and start new policies at --speed 0.3.

Acknowledgements

Built on LeRobot. π0.5 and the augmentation recipe come from openpi; Real-Time Chunking from Black et al., 2025. The reBot arms are by Seeed Studio. JetBrains Mono is under the SIL Open Font License.

License

Apache-2.0. See LICENSE.

Metadata

Release files for macbot 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for macbot 0.3.2
File Size Uploaded Provenance Actions
macbot-0.3.2.tar.gz 280.2 kB With provenance Details for macbot-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for macbot 0.3.2
File Interpreter ABI Platform Actions
macbot-0.3.2-py3-none-any.whl Python 3 none any Details for macbot-0.3.2-py3-none-any.whl

Total release size: 548.2 kB

Release files / macbot-0.3.2.tar.gz

Download URL macbot-0.3.2.tar.gz
Size 280.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4c44483d6dcc273beb6a4675753742fa271065637792305f22978b9014df920b
BLAKE2b-256 checksum
How to use checksums
592563d9b9e5b194eec571493ca88313a9c1666e0058745b69d357bd72fad3c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / macbot-0.3.2-py3-none-any.whl

Download URL macbot-0.3.2-py3-none-any.whl
Size 268.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc1fdf8106f2102fe1b1433f5186caf5906996871af4c978532a87de40f4431
BLAKE2b-256 checksum
How to use checksums
d505630aa95b67d9732e1e7a30b5556de017e234b4c685a0da6a778f2e665e1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for macbot 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for macbot-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page