tpt-teleop

Rust

a hyper-optimized, zero-bloat Rust middleware for robot/drone teleoperation. Lock-free SPSC IPC, zero-copy (rkyv) serialization, and no async runtime (thread-per-core + io_uring)

0 stars0 forks0 watchersApache License 2.0

Languages

Rust99.6%PowerShell0.3%Shell0.2%
README

tpt-teleop

Tele-Presence Teleoperation — a hyper-optimized, zero-bloat Rust middleware workspace for teleoperation of physical robots and drones.

Built for microsecond-level determinism: no async runtime, no serde, no channels-with-mutexes. Lock-free SPSC rings, zero-copy rkyv serialization, thread-per-core pinning, and raw OS interfaces all the way down.

Status

v1.0.0 released. All feature phases (0–14) are implemented and verified: cargo test/clippy/fmt are clean across the workspace, the MIT-chain dependency audit passes, and the full end-to-end pipeline is proven to make no per-command heap allocations and take no locks on the hot path. Phase 15 wired the tpt-t-sec crypto/RBAC stack into the live tpt-t-cloud/tpt-t-link runtime, and Phase 16/17 add the adoption tooling (scaffold tests, doctor, sim, live fleet dashboard, examples) described in todo.md.

CILintDeps
buildlintcargo-deny (see deny.toml)

No system dependencies required. Everything builds from a stock Rust toolchain (rustc/cargo, edition 2024). There are no C system libraries to install: hardware backends (V4L2, SocketCAN, DirectShow, NVENC, …) are reached through in-house libc/Windows FFI and fail loudly with Unsupported until hardware bring-up, so the workspace compiles and tests cleanly on a fresh Linux, macOS, or Windows machine.

Getting Started

# 1. Clone
git clone https://github.com/tpt-solutions/tpt-teleop.git
cd tpt-teleop

# 2. Build the whole workspace (no external system libs needed)
cargo build --workspace

# 3. Run the test suite
cargo test --workspace

# 4. Lint + license audit (CI parity)
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --check
cargo deny check

# 5. Scaffold a new robot crate and build it
cargo run -p tpt-t-cli -- scaffold my_bot
cd my_bot
cargo build

The tpt-t-cli developer tool also provides:

  • cargo run -p tpt-t-cli -- deny — emit a cargo-deny.toml for the MIT-chain policy.
  • cargo run -p tpt-t-cli -- profile --cores 8 — emit a CPU core-pinning profile.
  • cargo run -p tpt-t-cli -- doctor — verify the toolchain/environment.
  • cargo run -p tpt-t-cli -- sim --ticks 200 — live simulator readout (Phase-4 drone + safety loop).
  • cargo run -p tpt-t-cli -- replay <fdr.bin> — offline FDR replay.
  • cargo run -p tpt-t-cli -- console --host 127.0.0.1:8080 — MCP fleet-dispatch console.

See docs/quickstart.md for the #[derive(tpt_t::Robot)] macro quick start, docs/phase14-validation.md for the verification + benchmark numbers, and todo.md for the live roadmap.

Workspace Crates

CratePurpose
tpt-t-coreCentral state machine, autonomy handover, lock-free message bus
tpt-t-ringWait-free SPSC ring buffers, zero-copy pointer passing
tpt-t-linkUDP multiplexer, io_uring networking, WebRTC transport
tpt-t-inputRaw HID controller polling, OpenXR hand tracking
tpt-t-mediaZero-copy camera ingestion, slab allocator, HW encode
tpt-t-safetyGeofencing, kinematic limits, emergency overrides (RT thread)
tpt-t-halHardware abstraction: SocketCAN, MAVLink, memory-mapped I/O
tpt-t-cloudCustom HTTP/1.1 fleet server, WebRTC SFU, session recording
tpt-t-secZero-trust access control, E2EE via ring, RBAC
tpt-t-analyticsO_DIRECT flight data recorder, AI training export
tpt-t-cliProject scaffolding, cargo-deny config, core-pinning profiles, sim/doctor
tpt-t-integrationPhase 14: full-pipeline E2E, zero-alloc/zero-lock verification, benchmarks

The Zero-Copy Data Path

HID report ──Ingest──▶ Normalize ──Route──▶ Safety loop (in-place)
                                                        │
                                               Serialize ──▶ Transmit ──▶ wire
Total allocations (steady state): 0        Total mutex locks: 0

The forward data plane is verified end-to-end in tpt-t-integration (Ingest → Normalize → Route → Safety → Serialize → Transmit) and proven to make no per-command heap allocations and take no locks on the hot path; see tools/lock-audit.sh and the zero_alloc test.

Developer Experience

#[derive(tpt_t::Robot)] turns a plain struct of device fields into a lock-free, core-pinned robot: one SpscRing per #[camera]/#[motor] field, a launch() that pins each device to its CoreProfile role, and serialize_*/push_*/pop_* zero-copy wrappers. See docs/quickstart.md.

Licensing

Dual-licensed under either of:

Copyright © 2026 TPT Solutions.

Dependency policy ("the MIT chain"): dependencies are restricted to MIT, BSD-2/3-Clause, ISC, Zlib, and MPL-2.0. Dual MIT/Apache crates are resolved strictly under MIT; strictly Apache-2.0-only crates are banned. Enforced by deny.toml in CI.