Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Structure Overview

Let’s look at what’s inside a Copper project and understand the role of each file. Here’s the layout generated by the template:

my_project/
├── build.rs              # Build script (sets up logging index)
├── Cargo.toml            # Dependencies and project metadata
├── copperconfig.ron      # Task graph definition
├── justfile              # Helper commands for logs, replay, and DAG rendering
└── src/
    ├── main.rs           # Runtime entry point
    ├── tasks.rs          # Your task implementations
    ├── logreader.rs      # Log export utility
    └── resim.rs          # Replay / remote-debug entry point

Which files do I actually work on?

Great news: in the next chapters, we will mainly focus on two files:

FileWhat you do thereROS 2 equivalent
tasks.rsImplement tasks + define message typesNode source files + .msg files
copperconfig.ronDefine the task graph, wire connections, set parametersLaunch file + YAML params

The rest is scaffolding that you set up once and rarely change:

FileRoleHow often you touch it
main.rsBoilerplate: create logger, build runtime, call run()Rarely
build.rsSets an env var for Copper’s logging macrosNever
logreader.rsCLI tool to decode and export Copper’s binary logsRarely
resim.rsReplay target for deterministic re-simulation and remote debugRarely
justfileShortcuts for common commands like just log and just dagOccasionally
Cargo.tomlDependenciesWhen adding new hardware driver crates

The mental model

Think of it this way:

  • copperconfig.ron is the architecture of your robot – what components exist and how they connect. It’s declarative.
  • tasks.rs is the behavior of your robot – what each component actually does. It’s imperative Rust code.
  • main.rs is the engine startup – it boots the runtime that executes your architecture and behavior. You don’t need to understand it deeply to get started.

In the next chapters, we’ll dive into each of these files, starting with the task graph configuration.