The official website for Rumoca, an open-source Modelica compiler written in Rust. The site is a pure frontend static application -- no backend server required.
- Home -- overview of Rumoca's capabilities and compiler pipeline
- Tutorials -- 27 interactive tutorials covering ODE modeling, 3D visualization, control systems, optimization, and code generation workflows. Each tutorial runs the Rumoca compiler in your browser via WebAssembly.
- Simulation -- real-time flight simulation page where you can fly aircraft in 3D environments using keyboard or gamepad input. Supports two modes:
- WASM Controller -- physics and controller run entirely in the browser (no external dependencies)
- Autopilot (SIL) -- browser runs the plant physics, connected to a real autopilot binary (e.g. Cerebri2) through a WebSocket-to-UDP proxy
- Playground -- browser-based Modelica editor with compilation, simulation, and code generation
- Three environments: Desert, Forest, Arctic
- Two aircraft: Quadrotor (high-fidelity 3D model) and Fixed Wing (Sport Cub with animated control surfaces)
- Gamepad support (auto-detected, takes priority over keyboard)
- Keyboard controls: WASD for pitch/roll, arrows for throttle/yaw, Space to arm, R to reset
Requires Node.js >= 22.12.0.
npm install
npm run dev # dev server at localhost:4321
npm run build # static build to dist/The site uses two WASM modules in public/wasm/:
rumoca.js/rumoca_bg.wasm-- the Rumoca compiler (for tutorials and playground)rumoca_bind_wasm.js/rumoca_bind_wasm_bg.wasm-- includesWasmStepperfor real-time simulation
Run npm run sync-wasm to sync from a local Rumoca build.
The simulation page can connect to a locally-running autopilot via a WebSocket-to-UDP proxy. This lets you fly with a real flight controller (like CogniPilot's Cerebri2) while the plant physics run in the browser.
Browser (WASM plant) <--WebSocket--> Proxy <--UDP/FlatBuffers--> Autopilot
The proxy translates between JSON (WebSocket) and FlatBuffers (UDP) using a sil_config.toml file. The proxy is included in this repo at rumoca_ws_proxy/.
-
Start the autopilot (e.g. Cerebri2 native_sim)
-
Start the WebSocket-to-UDP proxy:
cd rumoca_ws_proxy ./run.sh /path/to/your/sil_config.toml -
Open the simulation page in your browser and select "Autopilot (SIL)" in the config panel
| Key / Button | Action |
|---|---|
| Up / Down arrows | Throttle up / down |
| Left / Right arrows | Yaw |
| W / S | Pitch forward / back |
| A / D | Roll left / right |
| Space | Arm / Disarm |
| R | Reset simulation |
| Gamepad Start | Arm / Disarm |
| Gamepad A | Reset |
| Gamepad B | Zero sticks |
- Astro -- static site generator
- React -- interactive components
- Three.js -- 3D visualization
- uPlot -- plotting
- Tailwind CSS -- styling
- WebAssembly -- Rumoca compiler and real-time simulation in the browser