refactor(firmware): remove the retired simulation workflow

Remove the retired simulator workspace member, dependencies, workflow
and documentation. Keep the shared flight and hardware crates.

Validation: retirement prefix host check, command-dispatch tests and
book build.
This commit is contained in:
Onur Özkan committed 2026-11-07 18:12:11 +03:00
1 parent 53e57c5d73
commit 3226ef97fe
40 files changed
+22 -4176

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[book]
title = "Kaptan documentation"
description = "Architecture, board bring-up, simulation, and contributor guidance for Kaptan."
description = "Architecture, board bring-up, and contributor guidance for Kaptan."
authors = ["Kaptan contributors"]
language = "en"
src = "src"
-1
View File
@@ -12,5 +12,4 @@
- [Boards](boards/index.md)
- [Kakute F7 Mini V3](boards/kakute-f7-mini-v3.md)
- [GEPRC GEP-F722-HD V2](boards/geprc-f722-v2.md)
- [Host SITL](sitl.md)
- [Reference](reference.md)
+3 -4
View File
@@ -55,10 +55,9 @@ one complete replacement candidate. The core distinguishes only immutable
boot-active values from the latest committed values. A save cannot mutate
controller or estimator state in flight.
Target-owned stores use private persistence formats. SITL atomically replaces a
bounded CBOR snapshot. F722 alternates compact `KCSP` snapshots between two
erase sectors, retaining only the old and replacement records across the commit
boundary. Neither format is exposed as the public KCFG file.
Target-owned stores use private persistence formats. F722 alternates compact
`KCSP` snapshots between two erase sectors, retaining only the old and
replacement records across the commit boundary. That format is not exposed as the public KCFG file.
Motor allocation/mixer topology is immutable compiled vehicle capability data,
never a scalar field or persistence member. F722 recovers operational settings
before constructing consumers. Its local USB CDC-ACM and directly wired UART
+1 -12
View File
@@ -10,8 +10,6 @@ parameter catalog.
| Deployment | Configuration consumed today | Remote writes |
| --- | --- | --- |
| `kaptan-sitl serve --config FILE.cbor` | One validated Quad-X configuration at process construction. | No live file endpoint is attached yet. |
| `kaptan-sitl serve` | The validated factory Quad-X configuration. | No persistent store. |
| STM32F722 image | Board factory settings, or the newest valid flash-journal snapshot. | `/config/user.kcfg` over local USB CDC-ACM or the directly wired UART while motor pins remain inhibited. |
## Web configurator
@@ -171,16 +169,7 @@ be exposed safely.
## Private persistence
SITL and F722 use target-appropriate private persistence. Neither private
format is the public KCFG artifact.
### SITL CBOR
SITL stores one bounded CBOR snapshot keyed by stable `FieldId`. Saving writes
a same-directory temporary file, synchronizes it, and atomically renames it
over the configured file. The exact map rejects unknown, duplicate, and missing
fields, wrong schema or format, trailing input, invalid scalar encodings, and
complete-model validation failures.
F722 uses private persistence separate from the public KCFG artifact.
### F722 flash journal
+2 -16
View File
@@ -10,8 +10,7 @@ directory path to that directory's Makefile.
The standard `--` ends Make's own options. Every following argument uses the
selected application's native command line. For example,
`make firmware -- test --workspace --locked --offline` runs `cargo test
--workspace --locked --offline` from `firmware`, while
`make firmware/tools/sitl -- ready` runs `kaptan-sim ready`. Board paths are
--workspace --locked --offline` from `firmware`. Board paths are
the complete build-and-package command, so they need no invented operation
name.
@@ -37,7 +36,7 @@ make firmware -- clippy \
`make firmware docs` builds Rust API documentation with warnings denied.
`make docs` checks and builds the separate mdBook project. `make pre-commit`
runs both documentation checks along with repository formatting, host and
embedded Clippy, Rust and script tests, and SITL structure tests. `make check`
embedded Clippy, Rust and script tests. `make check`
adds a whitespace check. `make build` builds and packages release firmware and
builds the mdBook project.
@@ -53,16 +52,3 @@ The strict gate requires 100% line and branch coverage for `kaptan-math`,
core package's coverage artifacts, unions LCOV source-line records, and uses
full LLVM source spans to merge generic branch instantiations without lowering
the gate.
## Simulation acceptance
```sh
cd firmware/tools/sitl
python3 world-structure-test.py
python3 -m unittest test_kaptan_sim.py
./e2e-smoke.sh
```
The Docker smoke is intentionally separate from host unit tests because it
builds the pinned base images, Rust binary, Gazebo plugin, and full loopback
plant.
+1 -1
View File
@@ -79,7 +79,7 @@ different reportable error is already pending.
The message kind itself identifies an error; no level is duplicated in the
payload. Dynamic human-readable context belongs in `LOG`, while
structured protocol failures remain in their owning response message.
- Control, navigation, safety, and simulator error types are derive-ready but
- Control, navigation, and safety error types are derive-ready but
their live owners are not yet attached to a MAVLink worker.
F722 still uses `panic-halt`; it does not claim a live panic frame or
-1
View File
@@ -33,7 +33,6 @@ target-specific commands in [Development and verification](development.md).
| `firmware/boards/` | Board-owned user schemas, factory values, immutable hardware declarations, and image composition roots. |
| `firmware/platforms/stm32f7/` | Reviewed F722 RTIC platform, peripheral ownership, and shared linker layout. |
| `firmware/libs/` | Typed math, estimation, control, safety, protocol, and driver crates. |
| `firmware/tools/sitl/` | Host-only closed-loop Gazebo simulation. |
| `firmware/tools/configurator/` | Board-agnostic loopback web UI and serial bridge. |
| `docs/` | This Markdown documentation site. |
+4 -6
View File
@@ -2,8 +2,7 @@
Kaptan is an embedded Rust flight-controller project. This manual is the
single source of project documentation: board support, safety boundaries,
simulation, development workflow, and design references live here as
Markdown.
development workflow, and design references live here as Markdown.
> **Status:** the checked-in firmware is telemetry-only. It does not expose
> physical motor authority, and this site does not make a physical-flight
@@ -14,7 +13,6 @@ Markdown.
- New contributors should read [Getting started](getting-started.md).
- Firmware source and its Rust workspace begin in `firmware/`.
- Board work belongs under [Boards](boards/index.md).
- The currently supported closed-loop simulation is [Host SITL](sitl.md).
- [Configuration](configuration.md) explains target-described user settings
and immutable F722 hardware policy.
- [Logs](logs.md) and [Errors](errors.md) describe the custom MAVLink
@@ -29,7 +27,7 @@ only defines the firmware workspace boundary. Keep pages in Markdown, add each
page to `SUMMARY.md`, and place commands beside the assumptions and safety
boundary they depend on.
The current configuration contract is target-described. A SITL Quad-X profile
and each F722 board expose only values consumed by that compiled target;
physical F722 hardware selection remains immutable board policy. No writable
The current configuration contract is target-described. Each F722 board exposes
only values consumed by that compiled target. Physical F722 hardware selection
remains immutable board policy. No writable
snapshot can bypass an immutable safety decision.
+2 -7
View File
@@ -78,11 +78,6 @@ named choices to the configurator, so the UI carries no hardcoded field list.
Only the MAVLink adapter converts the five event levels to the typed Kaptan
wire enum.
The log ingress is transport-neutral and unfiltered. The tested
`SitlConfigRuntime` composition applies the configured MAVLink policy when
fanning an event into that sink and proves `kaptan_log::info!` reaches a
generated `LOG` payload.
`kaptan-sitl serve` does not yet attach a file/diagnostic MAVLink link. F722
images accept the unsigned Kaptan file service on local USB CDC-ACM and their
directly wired UART; that physical-link assumption does not extend to a shared
The log ingress is transport-neutral and unfiltered. F722 images accept the
unsigned Kaptan file service on local USB CDC-ACM and their directly wired UART; that physical-link assumption does not extend to a shared
or remote MAVLink network.
-1
View File
@@ -4,7 +4,6 @@ This page collects stable limits and points to the detailed contracts.
| Surface | Current contract |
| --- | --- |
| SITL file | One raw bounded CBOR configuration snapshot, replaced through a same-directory temporary file and atomic rename. |
| F722 persistence | One bounded native-width scalar snapshot inside each slot of a power-loss-safe two-slot flash journal. |
| Public config artifact | One canonical self-describing KCFG file containing generated metadata, factory values, and the complete committed candidate. |
| File transfer | Custom `FILE_CONTROL` (51025) and `FILE_DATA` (51026), one owner-bound stop-and-wait transfer, 246-byte data chunks, CRC-32C. |
-59
View File
@@ -1,59 +0,0 @@
# Host SITL
Host SITL is Kaptan's deterministic closed-loop simulation tier. Gazebo sends
simulated IMU and declared noisy local position/velocity observations over a
private loopback protocol. The Rust process runs the ESKF, safety supervisor,
trajectory, controller, and allocator, then returns four virtual motor
fractions to Gazebo.
It is a pre-bench software gate, not a physical-flight validation.
## Run the closed loop
```sh
docker compose -f firmware/tools/sitl/compose.yaml up -d --build
make firmware/tools/sitl -- ready
make firmware/tools/sitl -- move 5 3 1 --wait
make firmware/tools/sitl -- land 0 0 --wait
docker compose -f firmware/tools/sitl/compose.yaml down
```
For the reproducible command-path gate, use:
```sh
firmware/tools/sitl/e2e-smoke.sh
```
The smoke scenario verifies ascent, translation, descent, landing, flat-plane
proximity, and zero applied motor fractions after landing. Its reference world
contains only a visual landing pad; the pad has no collision geometry and
never contributes a controller or truth observation.
Open <https://app.gazebosim.org/visualization>, connect to
`ws://localhost:9002`, and leave authorization blank to view the world.
## Quad-X profile
SITL starts through the central `ConfigManager` lifecycle. Create and validate
a private host profile file with:
```sh
kaptan-sitl config write-default kaptan-sitl.cbor
kaptan-sitl config validate kaptan-sitl.cbor
kaptan-sitl serve --config kaptan-sitl.cbor
```
The file selects the restart-only profile used to build the estimator,
controller, allocator envelope, safety supervisor, and MAVLink log-sink policy at
process start. It is local persistence and never appears on MAVLink.
`kaptan-sitl serve` retains
the central manager for that boot but does not yet open a MAVLink file/log
endpoint; see [Configuration](configuration.md) for the KCFG, file-transfer,
and safety boundaries.
## Limits
This model does not validate terrain, vision, flow/range sensing, wind,
vibration, battery/ESC behavior, sensor latency/jitter, actuator faults, or
physical touchdown sensing. Add those only as a reviewed sensor/contact model,
not as a display-only shortcut.