Skip to content

Latest commit

 

History

170 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robotkit

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.

Quick Start

Run the reference rover example:

PYTHONPATH=python/robotkit/src python examples/first_rover.py

That writes artifacts into examples/build/:

  • first_rover.operations.json
  • first_rover.preview.json
  • first_rover.urdf
  • first_rover.validation.json
  • first_rover.export.json
  • first_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-rover

Try the wider component slice:

PYTHONPATH=python/robotkit/src python examples/systems_rover.py

Try the diagnostics story:

PYTHONPATH=python/robotkit/src python examples/broken_rover.py

Python Authoring Example

from 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"))

Architecture

Robotkit is shaped like a compiler:

  1. Python classes emit explicit model operations.
  2. Rust parses the operation log into a raw model.
  3. Passes resolve units, validate names/mounts/physical parameters, and produce source-linked diagnostics.
  4. Preview and export crates lower the checked model into derived artifacts.
  5. Robotbook reads PreviewScene JSON and renders the scene/UI.

Repository Layout

  • 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: PreviewScene generation 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.

About

Robot-as-code framework with a Rust compiler core

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages