Repository Summary
Description | Copper is a user friendly and deterministic runtime for building production-ready robots. |
Checkout URI | https://github.com/copper-project/copper-rs.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-08-01 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | rust robotics ros |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Packages
Name | Version |
---|---|
gpio_caterpillar | 0.0.0 |
README
Copper Runtime & SDK
🤖     Copper is to robots what a game engine is to games.
🦀 User Friendly: Copper offers a high-level configuration system and a natural Rust-first API.
🚀 Fast: Copper uses Rust's zero-cost abstractions and a data-oriented approach to achieve sub-microsecond latency on commodity hardware, avoiding heap allocation during execution.
⏱️ Deterministic: When you replay a log, Copper will execute the same code with the same data in the same order, ensuring that your robot behaves consistently every time. No more test datasets that are flip flopping between runs!
🛡️ Reliable: Copper leverages Rust's ownership, type system, and concurrency model to minimize bugs and ensure thread safety.
📦 Built to ship: Copper aims to avoid late-stage infra integration issues by generating a very predictable runtime.
Copper has been tested on:
|
Linux | x86_64 armv7 aarch64 riscv64 |
|
macOS | arm64 |
![]() |
Windows | x86_64 |
|
Android | arm64 |
Technical Overview
Copper is a deterministic and data-oriented Robot SDK with these key components:
-
Task Graph:
Configures the system’s topology, specifies inter-task communication paths, and sets types for nodes and messages. The Task Graph is generated in RON,
-
Runtime Generator: Creates an execution plan based on the Task Graph’s metadata. It preallocates a “Copper List” to maximize sequential memory access during execution.
-
Zero-Copy Data Logging: Records all messages between tasks without copying data, ensuring efficient logging and perfect determinism.
-
Fast Structured Logging: Interns and indexes logging strings at compile time, avoiding runtime string construction and ensuring high-speed textual logging.
Blazing Fast
Our latency numbers are expressed in nanoseconds (ns) on commodity hardware.
You don’t have a real robot yet? Try it in our minimalistic sim environment!
Here is a Copper-based robot in action in a Bevy simulation environment!
The realistic sim is created using Bevy (A Rust Game Engine)
and Avian3d (Physics Engine in Rust).
On your mac or linux machine (x86-64 or Arm) just run …
$ cargo install cu-rp-balancebot
$ balancebot-sim
… to try it locally.
The source code for this demo is available in the examples/cu_rp_balancebot directory.
Features
- Task interface and Lifecycle: Traits you can use to implement new algorithms, sensors, and actuators.
- Runtime generation: Generates a scheduling at compile time for your robot.
- Log reader: You can export the logs generated by Copper to any format supported by Rust Serde.
File truncated at 100 lines see the full file
CONTRIBUTING
Contributing to Copper-rs
First off, thank you for considering contributing to Copper-rs! We welcome contributions from everyone. This document provides guidelines for contributing to the project.
Getting Started
Prerequisites
- Rust: Ensure you have a recent stable Rust toolchain installed. You can install it using rustup.
curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs) | sh
- cargo-nextest: For running tests efficiently.
cargo install cargo-nextest
- Platform-Specific Dependencies: Depending on your operating system and the features you intend to work with, you might need additional dependencies. Refer to the Continuous Integration Setup section below for details extracted from our CI workflow. For Ubuntu 22.04, please checkout our Dockerfile.
Building the Project
To build the project, navigate to the root directory and run:
cargo build --workspace
For a release build, use:
cargo build --release --workspace
Running Tests
We use cargo-nextest for running tests. To run all unit tests:
cargo nextest run --workspace --all-targets
To run tests including specific features (matching the CI ‘debug’ mode non-CUDA features):
cargo nextest run --workspace --all-targets --features macro_debug,mock,perf-ui,image,kornia,python,gst,faer,nalgebra,glam,debug_pane,bincode
Contribution Workflow
-
Fork the Repository: Create your own fork of the copper-rs repository on GitHub.
-
Clone Your Fork: Clone your forked repository to your local machine.
git clone https://github.com/YOUR_USERNAME/copper-rs.git
cd copper-rs
-
Create a Branch: Create a new branch for your changes. Choose a descriptive branch name. ex:
yang/chore/beta_clippy
,gbin/feat/soa
,gbin/fix/balancebot_sim
.
git checkout -b user/feat/description
-
Make Changes: Implement your feature or fix the bug. Write clear and concise code.
-
Run Checks: Before committing, ensure your code adheres to the project’s standards:
-
Formatting:
cargo fmt --all -- --check
-
Clippy Lints:
cargo clippy --workspace --all-targets -- --deny warnings
-
Tests:
cargo nextest run --workspace --all-targets
(run with relevant features if applicable) -
Typos: Ensure you run a spell checker. We use
typos --config .config/_typos.toml
.
-
Formatting:
- Commit and push Changes: Commit your changes with clear and descriptive commit messages. (Consider using Conventional Commits)
git add .
git commit -m "feat: new feature"
git push user/feat/description
- Create a Pull Request: Open a pull request (PR) from your branch to the master branch of the main copper-rs repository. Provide a clear description of your changes in the PR.
Dependency Management
We keep our dependencies minimal and up-to-date.
We use
``` to identify and remove unused dependencies. Before submitting a PR, please run:
1. Install
```cargo-machete
cargo install cargo-machete
- Run
cargo-machete
to find unused dependencies:
cargo machete --with-metadata
- Handling False Positives
cargo-machete
is not perfect. If it incorrectly flags a necessary dependency (e.g., required by a feature flag or build script), add it to the ignored list in the relevant Cargo.toml file:
```toml [package.metadata.cargo-machete]
Explain why the dependency is needed despite not being directly used in code.
e.g. “Required for X feature” or “Used in build.rs”
File truncated at 100 lines see the full file