Skip to content

Cortex

A layered Rust + C++20 perception stack where algorithms never see middleware and middleware never sees hardware.

Cortex is the perception core of the Branes Embodied AI framework: a real-time visual-inertial odometry (VIO) and SLAM stack designed to run on a KPU — a spatial-dataflow accelerator — with a host CPU acting as a thin resource broker.

The defining constraint is strict layering: a Rust Resource Manager owns the hardware, header-only C++20 math sits on top, the operator SDK builds algorithms from that math, and middleware (Zenoh/ROS) lives only in the daemons. Algorithms never see middleware; middleware never sees hardware.

Type-generic math

Header-only C++20 numerics — Lie groups, non-linear least squares, camera models — templated over the scalar type, so the same code runs in double, float, or Universal posits for mixed-precision study.

MSCKF visual-inertial odometry

A complete Multi-State Constraint Kalman Filter: IMU preintegration and initialization, a sliding window of cloned poses, and null-space camera updates — clean-room from the papers, no GPL source contact.

Hardware behind a HAL

A Rust MemoryProvider trait abstracts the KPU. The same binary carries a SITL (host-emulated) and a KPU backend, selected at construction by build target — the C++ above never branches on hardware.

Validated, not just built

ATE/RPE accuracy metrics, a per-frame latency budget, an EuRoC replay harness, and ≥85% Rust coverage gates — efficiency is a functional requirement, enforced in CI.

LayerPathLanguageMay depend on
Resource Managercore/RustOS, kernel drivers, cxx
Mathmath/header-only C++20Universal, MTL5
Operator SDKsdk/C++20math/, core/ via cxx, cv/
CV front endcv/C++20(image / FAST / KLT / pyramid)
Daemonsdaemons/C++ executablessdk/, Zenoh, yaml-cpp

Status: Phases 0–3 complete (foundation, Rust core, math layer, VIO). This site is the consolidated record of what was built, the algorithms used, and the performance measured.