loaden_rs is the Rust runtime for the Loaden robot. It wires camera input, person detection/tracking, ReID, depth processing, autonomous guidance, manual control, motor output, LEDs, logging, and optional recording into a single robot process.
The port is still hardware- and model-dependent. This README documents what the current Rust crate exposes; it does not claim complete feature or performance parity with any Python codebase.
The default build enables the simulate feature. It uses fake hardware modules and compiles the ONNX Runtime inference backend. This is the mode to use on macOS and for local development that does not need Raspberry Pi hardware.
Real hardware mode is built with --no-default-features on Linux. It compiles Raspberry Pi GPIO/PCA9685 support, RealSense camera access, and Hailo inference support. Non-Linux real-hardware builds fail at compile time.
cargo build --bins
cargo build --release --binsFor real hardware on Linux:
cargo build --bins --no-default-features
cargo build --release --bins --no-default-featuresRun commands from the crate root. autonomous and manual do not accept a config flag; both load robot/config.json relative to the current working directory.
cargo run --bin autonomous
cargo run --bin manualRelease binaries use the same fixed config path:
./target/release/autonomous
./target/release/manualhw_probe is a Linux real-hardware diagnostic:
cargo run --bin hw_probe --no-default-features
./target/release/hw_probeautonomous starts vision and base-driver operations, asks for confirmation with Should I start (Y/N):, selects a tracked person, and sends planner output to the base driver until Ctrl+C or shutdown.
manual starts controller and base-driver operations, maps configured controller inputs to manual drive intents, and stops on Ctrl+C or when the configured b_button input is active.
If the vision block is missing, vision runs in stub mode with empty tracks. If model loading or inference fails, the pipeline logs warnings and skips affected frames rather than proving model availability.
The active configuration file is:
robot/config.json
Important blocks include motors, busses, logging, controller, sensors, vision, autonomous_planner, motion_controller, and optional leds. See configuration for field-level notes.
Logging is configured by the logging block in robot/config.json. The supported modes are default and tabular. When logging.path is set, the runtime creates that directory relative to the crate root for the standard robot/config.json layout and writes rolling robot.log files there.
Set top-level recording to true to write MJPEG AVI files under recordings/ during vision operation. Recording only starts when a vision camera configuration is active and the writer can be opened.
cargo test --libNo fixed test count is documented because it changes as the crate evolves.
src/bin/ binary entry points
src/config.rs JSON configuration loading and validation
src/runtime/ autonomous and manual robot runtimes
src/parallel/ operation runners and shared contexts
src/hardware/ simulated and real hardware modules
src/vision/ inference, tracking, ReID, recording
src/planning/ autonomous and manual planning
src/motion/ motor and base-driver control
robot/ runtime configuration
recordings/ optional AVI output
docs/ operator and developer notes
Further reading: