copper-rs

repository·master·Indexed 23 days ago

https://github.com/copper-project/copper-rs

A Rust-based runtime and SDK for building, running, recording, and deterministically replaying static robot task graphs. Optimized for real-time performance with zero-allocation on the hot path, it supports platforms ranging from Linux and macOS to bare-metal microcontrollers.

Tokens
96.9K
Snippets
222
Records
566
Agent score
80%

What's inside copper-rs

  1. Overview of Copper benchmark workloads

    master

    The benchmarks/ directory contains external benchmark and comparison workloads designed for side-by-side and interoperability testing. These are managed separately from the default Copper workspace test matrix.

    Available benchmarks include:

    • cu_async_cl_io_bench: Benchmarks CopperList logging and async CL I/O.
    • cu_dorabench: A Copper-side benchmark matching dora-rs/dora-benchmark.
    • cu_zenoh_bridge_bench: Benchmarks transport latency for the Zenoh bridge.
    • dora_caterpillar: The DORA version of the caterpillar benchmark.
    • horus_caterpillar: The Horus version of the caterpillar benchmark.
    • ros_caterpillar: A ROS 2 comparison workspace.
    • ros_zenoh_caterpillar: A ROS 2 + Zenoh comparison workspace.
  2. Overview of cu-bmi088 source component

    master

    The cu-bmi088 crate is a Copper source component for the Bosch Sensortec BMI088 6-axis IMU (accelerometer + gyroscope). It is designed for embedded systems, being no_std by default and utilizing embedded-hal 0.2 traits for portability.

    Key sensor capabilities:

    • 16-bit triaxial accelerometer (±3g to ±24g range)
    • 16-bit triaxial gyroscope (up to ±2000°/s)
    • On-chip temperature sensor
    • SPI interface (up to 10 MHz)
  3. Overview of cu-bdshot bridge

    master

    The cu-bdshot component is a Copper bridge designed for bidirectional DSHOT (BDShot) Electronic Speed Controllers (ESCs). It provides up to four transmit channels for sending commands and four receive channels for collecting telemetry.

    It supports two primary hardware implementations:

    • RpBdshotBridge: Uses the PIO/DMA stack on the RP2350 reference board.
    • Stm32BdshotBridge: Uses a bit-bang driver for STM32H7 hardware.

    Custom hardware can be supported by implementing the BdshotBoard or BdshotBoardProvider traits.

  4. Overview of cu29-unifiedlog

    master
    The cu29-unifiedlog crate provides the core data structures and I/O abstractions for Copper's task-data and text-log stream formats. It is designed as a unified binary logging primitive and can be used independently of the main Copper project if you require the same log container format in your own applications.
  5. Overview of cu-flight-controller

    master

    The cu-flight-controller is a bare-metal quadcopter flight controller implemented using Copper components. It is designed to run on the MicoAir H743 board (STM32H743) alongside a separate host Copper runtime for onboard compute.

    Key characteristics include:

    • Deterministic Real-time Control: Runs control loops on embedded hardware with zero dynamic allocation during runtime.
    • Hybrid Deployment: Uses a multi-Copper root (flight_controller.ron) with independent MCU and compute subsystems.
    • Simulation Parity: The simulator runs the same task graphs as the hardware, replacing external hardware and transport at the graph boundaries without changing the application topology.
    • Feature Selection: Cargo features are used to select coherent graph fragments (e.g., sim and end2end for autonomy, firmware for MCU-only).
  6. Overview of cu-gnss-ublox

    master

    The cu-gnss-ublox crate is a Copper source task designed for u-blox GNSS receivers. It provides utilities for parsing the UBX protocol and integrates with the Copper framework to provide GNSS data.

    To function correctly, it must be bound to a serial resource using Copper resource bindings. The crate relies on cu-gnss-payloads to provide normalized output payloads, ensuring consistent data formats regardless of the underlying hardware.

  7. Use cu-ryuw122 as a UWB range source

    master

    The cu-ryuw122 source is an initiator-side Copper range source for the REYAX RYUW122 UWB modem. It is designed for modems running in the REYAX vendor ANCHOR role (typically mounted on a moving robot) to poll fixed anchors (running the TAG role) for distance measurements over UART.

    Key Characteristics:

    • Non-blocking: It processes one outstanding initiator request at a time. It sends AT+ANCHOR_SEND, waits for the matching +ANCHOR_RCV response, and emits an observation. If an anchor is silent, it advances after a timeout.
    • Scope: It does not perform 2D/3D positioning or multilateration. It only emits single-anchor range observations.
    • Use Cases: Providing robot-side distance feeds to fixed anchors or serving as a generic UWB range source for downstream estimation tasks.