Robotkit is driven by the idea that robot creation should feel fast and expressive without losing engineering rigor.
Prototype robots in Python, validate structure, preview, and export robust designs for physical robots or simulations.
Run the reference rover example:
PYTHONPATH=python/robotkit/src python examples/first_rover.pyThat writes artifacts into examples/build/:
first_rover.operations.jsonfirst_rover.preview.jsonfirst_rover.urdffirst_rover.validation.jsonfirst_rover.export.jsonfirst_rover.compile.json
Compile an existing operation log through the Rust CLI:
cargo run -q -p robotkit-cli -- compile examples/build/first_rover.operations.json --out /tmp/robotkit-first-roverTry the wider component slice:
PYTHONPATH=python/robotkit/src python examples/systems_rover.pyTry the diagnostics story:
PYTHONPATH=python/robotkit/src python examples/broken_rover.pyfrom pathlib import Path
from robotkit import Robot
from robotkit.components import Base, DepthCamera, Wheel
from robotkit.units import cm
robot = Robot("first_rover")
base = robot.add(Base(dimensions=(cm(40), cm(25), cm(8))))
robot.mount(Wheel(radius=cm(6), width=cm(2.5)), on=base.mounts.left_front)
robot.mount(Wheel(radius=cm(6), width=cm(2.5)), on=base.mounts.right_front)
robot.mount(Wheel(radius=cm(6), width=cm(2.5)), on=base.mounts.left_rear)
robot.mount(Wheel(radius=cm(6), width=cm(2.5)), on=base.mounts.right_rear)
robot.mount(DepthCamera(fov_deg=87), on=base.mounts.front_top)
robot.compile(output_dir=Path("build"))Robotkit is shaped like a compiler:
- Python classes emit explicit model operations.
- Rust parses the operation log into a raw model.
- Passes resolve units, validate names/mounts/physical parameters, and produce source-linked diagnostics.
- Preview and export crates lower the checked model into derived artifacts.
- Robotbook reads
PreviewSceneJSON and renders the scene/UI.
crates/robotkit-core: canonical robot model, spatial math, units, operation parsing, IDs, diagnostics, provenance, and staged model wrappers.crates/robotkit-passes: compiler-style pass manager, operation compiler, unit resolution, validation, and pipeline reports.crates/robotkit-preview:PreviewScenegeneration for Robotbook and other visual consumers.crates/robotkit-export: target lowering, URDF export, and export reports.crates/robotkit-wasm: browser-facing boundary for the portable Rust core.crates/robotkit-cli: command-line compile interface and artifact contract.python/robotkit: Python package for authoring robot models.apps/robotbook: browser workspace for loading and inspecting preview scenes.