How miyuppie/okrobo works
OKROBO is an offline robotics studio for students: they create programs in blocks or Python, run them against simulated robots in a 3D world, and learn through lessons. The studio also supports custom robot/CAD creation, competitions, reusable packs, and physical-car hardware. The graph follows the documented workflow and sampled runtime boundaries. Some subsystem links are documented rather than visible in sampled call sites; those are marked dashed or omitted where ownership is uncertain.
Main entry points: App.tsx Studio app · BuilderPanel.tsx Robot builder · EngineBuiltRobot.ts Built-robot adapter · PythonPanel.tsx Python editor
Components 19
Studio workflow
- Studio app
apps/studio/src/App.tsx - Blocks editor
apps/studio/src/BlocksPanel.tsx - Python editor
apps/studio/src/PythonPanel.tsx - Program runner
apps/studio/src/program/ProgramRunner.ts - Competitions
apps/studio/src/compete/competitionDef.ts
Simulation runtime
- World definition
apps/studio/src/contracts/worldDef.ts - WASM adapters
apps/studio/src/engine/EngineWorld.ts - Built-robot adapter
apps/studio/src/engine/EngineBuiltRobot.ts - WASM interface
engine/src/wasm_api.cpp - C++ simulation
engine/src/world.cpp
Robot creation
- Robot builder
apps/studio/src/builder/BuilderPanel.tsx - CAD kernel
apps/studio/src/cad/executor.ts - Robot definition
apps/studio/src/contracts/robotDef.ts
Learning and packs
- Lessons
apps/studio/src/LessonsPanel.tsx - Pack management
apps/studio/src/packs/store.ts
Python and hardware
- Python bridge
apps/studio/src/python/PythonBridge.ts - Python runtime
runtime/python/okrobo/sidecar.py - Physical car
firmware/okrobo_car/protocol.hpp
Other components
- Student
Connections 18
- Student → Studio app: uses
README.md - Student → Blocks editor: creates programs
README.md - Student → Python editor: writes Python
README.md - Student → Lessons: follows lessons
README.md - Studio app → Competitions: shows results
apps/studio/src/App.tsx - Studio app → Robot builder: opens builder
apps/studio/src/App.tsx - Robot builder → CAD kernel: requests previews
- Robot builder → Robot definition: edits definition
- Built-robot adapter → Robot definition: serializes
apps/studio/src/engine/EngineBuiltRobot.ts - Built-robot adapter → World definition: serializes
apps/studio/src/engine/EngineBuiltRobot.ts - Studio app → Program runner: runs programs
apps/studio/src/App.tsx - Program runner → WASM adapters: commands and reads state
apps/studio/src/program/ProgramRunner.ts - Python editor → Python bridge: submits Python
- Python bridge → Python runtime: executes remotely
- WASM adapters → WASM interface: calls exports
apps/studio/src/engine/EngineWorld.ts - WASM interface → C++ simulation: dispatches simulation
engine/src/wasm_api.cpp - Pack management → Lessons: provides lesson content
- Python runtime → Physical car: drives over protocol