Skip to content

Set Up the Copper Bridge

Goal: Integrate a copper-rs robot with Rover Nexus by including NexusBridge from rovernexus-cu-components in your Copper graph. The bridge translates Copper pins to and from the Cap'n Proto messages the agent consumes over local Zenoh.

Before you begin

  • The agent is installed via its bootstrap command (which also enrolls the robot).
  • A working copper-rs (cu29 1.1.x) application on Linux, on the same host as the agent.
  • A checkout of rovernexus-cu-components next to your application (or another path you will depend on).

Why a bridge is needed

The agent does not speak Copper pins directly. It consumes Cap'n Proto messages over a local hop. The Copper bridge is a CuBridge component compiled into your application. It sits between your task graph and the agent:

Copper tasks <--(pins)--> NexusBridge <--(local Zenoh, Cap'n Proto)--> rover-agent --> cloud

The bridge converts pose, twist, and status pins into Cap'n Proto uplink and relays commands the agent emits back onto Copper pins. Autonomy tasks must not depend on rover_nexus_core or open Zenoh themselves.

Steps

Follow the install and wiring instructions in rovernexus-cu-components. The overall flow is:

  1. Keep the agent's local hop on Zenoh (the default). Do not set [local_transport] kind = "uds". Restart the agent if you changed transport so it is listening on local Zenoh.

  2. Clone the components repository next to your Copper application and depend on cu-rover-nexus:

bash git clone https://gitlab.com/rover-nexus/rovernexus-cu-components.git

toml [dependencies] cu-rover-nexus = { path = "../rovernexus-cu-components/cu-rover-nexus" } cu29 = { version = "1.1", features = ["std"] }

  1. Bring the bridge type into the #[copper_runtime] binary crate so RON can resolve it:

rust use cu_rover_nexus::NexusBridge;

  1. Include the facade and wire pose, twist, status, pause, and teleop pins to your drivetrain or safety stack. Adjust the include path to match your tree:

ron includes: [ (path: "../rovernexus-cu-components/cu-rover-nexus/ron/nexus_facade.ron", params: { "key_prefix": "robot" }), ], cnx: [ (src: "slam", dst: "nexus/pose", msg: "cu_rover_nexus::Pose2"), (src: "odom", dst: "nexus/twist", msg: "cu_rover_nexus::Twist"), (src: "health", dst: "nexus/status", msg: "cu_rover_nexus::StatusBundle"), (src: "nexus/pause", dst: "your_interlock", msg: "cu_rover_nexus::Pause"), (src: "nexus/mode_cmd", dst: "your_interlock", msg: "cu_rover_nexus::ModeName"), (src: "nexus/twist_cmd", dst: "your_interlock", msg: "cu_rover_nexus::Twist"), ],

Unwired channels stay idle. Optional sibling crates in the same repository add a mode arbiter, a mission adapter, and a camera sink. Those message definitions are available via the client libraries.

  1. Verify telemetry flows end to end: the agent logs show incoming messages and the robot's live data appears in the web app. See Verify Agent Connectivity.

Notes

  • The agent's ingest path is the same Cap'n Proto contract whether or not the robot is copper-rs based; the bridge produces those messages on the Copper robot's behalf over local Zenoh.
  • Commands from the cloud (for example mode, navigate-to, velocity, pause) are emitted by the agent onto the local hop; the bridge relays them onto Copper pins.
  • The local Zenoh hop is on-robot. Run the Copper application on the robot that runs the agent.
  • Remote halt is Pause. Report a hardware e-stop on StatusBundle.estop.

Next steps