# Community Source: https://docs.cerulion.com/cerulion/community Meet roboticists building with Cerulion, get help, and find your first contribution. ![Cerulion lion mark](https://mintcdn.com/cerulion-5327fd47/6IFTdIgnufeWJzYG/images/community-lion.png?fit=max\&auto=format\&n=6IFTdIgnufeWJzYG\&q=85\&s=e2cf9680320c0ce4e7885701850a2ec4) The working room Build with other roboticists. Bring a run, a question, or a first PR. Use Discord for live help and shop talk; keep bugs and decisions that need a lasting record on GitHub. [Join the Cerulion Discord ↗](https://discord.gg/dqKFecngPy) ## Where to go | Channel | Bring this | | - | - | | `#start-here` | The map of the server and a quick introduction. | | `#setup-help` | Install commands, first-run questions, and error output. | | `#ros2-on-ramp` | Questions about using Cerulion with a ROS 2 stack. | | `#contributing` | A first issue, a draft PR, or a proposal. The forum has getting-started and help threads. | | `#show-and-tell` | A run, recording, or tool you built. | Looking for a first task? Browse [good first issues](https://github.com/cerulion-inc/cerulion/labels/good%20first%20issue). Found a reproducible bug? [Open a GitHub issue](https://github.com/cerulion-inc/cerulion/issues) so the report stays findable. # Core concepts Source: https://docs.cerulion.com/cerulion/concepts The mental model behind Cerulion: workspaces, nodes, graphs, topics, and schemas, and how they fit together. This page builds the mental model you need to work with Cerulion. It explains the five things you will name and reason about every day (**workspace**, **node**, **graph**, **topic**, and **schema**) and how the runtime turns them into a running robotics application. Read this once before the [guides](/cerulion/guides/define-a-node), then keep the [reference](/cerulion/reference/cli) open while you build. For why Cerulion is shaped this way, see [Why Cerulion](/cerulion/why-cerulion). ## The five nouns > [card] Workspace > > The project container: a Cargo workspace with `graphs/`, `nodes/`, and > `schemas/` directories. > [card] Node > > A unit of computation: a Rust struct annotated with `#[cerulion_node]`, > compiled to a dynamic library. > [card] Graph > > A `.yaml` file that wires node *instances* together. Wiring and values only. > [card] Topic > > A named shared-memory channel, created automatically from your graph wiring. > [card] Schema > > The shape of a message: a ROS 2 message type or a workspace-defined schema. At a glance, here is how the nouns nest and connect: a workspace holds your node types, schemas, and graphs; a graph wires node instances into a dataflow that produces topics. ```mermaid theme={null} flowchart TB Workspace[Workspace] --> NodeTypes[Node types] Workspace --> Schemas[Schemas] Workspace --> Graph[Graph] NodeTypes -. instances of .-> Graph Graph --> A([camera]) Graph --> B([detector]) A -- camera/image --> B ``` *Figure: A workspace contains node types, schemas, and graphs. A graph wires node instances (rounded) into a dataflow whose connections become topics.* ## Workspace A **workspace** is the project container for everything you build. It is a Cargo workspace plus three Cerulion directories. You create one with `cerulion workspace create ` (or `cerulion workspace init` in place), and most commands work by discovering the workspace around your current directory. **my\_robot** **Cargo.toml** **.gitignore** **.cargo** **config.toml** **graphs** **perception.yaml** **nodes** **camera** **Cargo.toml** **src** **lib.rs** **detector** **Cargo.toml** **src** **lib.rs** **schemas** **Reading.yaml** The top-level `Cargo.toml` declares a `[workspace]` with `members = ["nodes/*"]`, so every node is its own crate built by the same `cargo` invocation. Each directory has one job: * `graphs/`: one `.yaml` per graph (the wiring). * `nodes/`: one crate per node *type* (the code). * `schemas/`: one `.yaml` per workspace-defined message shape. > [!NOTE] > > Cerulion discovers a workspace by walking upward for a `Cargo.toml` that > contains `[workspace]` alongside a `graphs/` directory. Most `node` and `graph` > commands need this; `workspace create`/`init` and the `topic` commands do not. ## Node A **node** is a unit of computation: it reads inputs, does work each time it fires, and writes outputs. You define one as a Rust struct annotated with `#[cerulion_node]`, paired with an adjacent `impl` block annotated with `#[cerulion_node_impl]`. ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::sensor_msgs::LaserScan; use native_ros2_messages::geometry_msgs::Vector3; #[cerulion_node(period_ms = 10)] #[derive(Default)] struct SafetyController { #[input(depth = 1)] scan: LaserScan, #[output] linear_velocity: Vector3, } #[cerulion_node_impl] impl SafetyController { fn tick(&mut self) -> Result<(), NodeError> { let obstacle_close = self.scan.ranges().iter().any(|&r| r < 0.5); self.linear_velocity.x = if obstacle_close { 0.0 } else { 0.3 }; Ok(()) } } ``` The struct fields *are* the ports: `#[input(...)]` fields are subscriptions, `#[output]` fields are publications. Inside `tick()`, reading and writing those fields reads and writes shared memory directly; there is no separate publish or subscribe call to make. Every node is imported from `cerulion_core::prelude` and compiled to a dynamic library (`cdylib`) so the runtime can load it at run time. For the full attribute set, see the [node macro reference](/cerulion/reference/node-macro). ### Node type vs. node instance This distinction is the heart of Cerulion's model. * A **node type** is the code: the crate under `nodes//`, defined once by the `#[cerulion_node]` macro. The type declares its ports and its behavior. * A **node instance** is a use of that type inside a graph: an entry with a unique `id` under `nodes:` in a graph `.yaml`. You can stage the same type into a graph more than once, each with its own `id` and its own wiring. Think of the type as a class and the instance as an object of that class. The type says *what a camera node does*; an instance says *this particular camera, wired to these inputs and outputs*. ### Trigger policy lives on the type, not the graph A node's **trigger policy** decides *when* it fires: every N milliseconds, when data arrives on a trigger input, when several trigger inputs line up in a time window, when every trigger input has an unconsumed message with no time bound at all, or on an external command. This policy is part of the node *type*. You set it with the `#[cerulion_node(...)]` macro attributes in `src/lib.rs` (and, at scaffold time, with the `--policy` flag on `cerulion node create`). > [!WARNING] > > Trigger policy is **never** written in graph YAML. Graph files describe wiring > and values: `id`, `type`, `inputs`, `outputs`, per-node `params:` and launch > `args:`. There is no `policy:` block in a graph file. To change when a node > fires, change its macro attributes (or use `cerulion node modify`), not the > graph. This is deliberate: behavior lives in one place (the code), and the graph stays a pure description of how instances connect. See [trigger policies](/cerulion/reference/trigger-policies) for the full grammar and the defaulting rules. ## Graph A **graph** is a `.yaml` file under `graphs/` that wires node instances together. It is the source of truth for topology: which instances exist, and how each instance's inputs connect to other instances' outputs. ```yaml theme={null} prefix: robot1 nodes: - id: camera type: camera outputs: - name: image schema: sensor_msgs/Image - id: detector type: detector inputs: - name: image source: camera/image outputs: - name: detection schema: geometry_msgs/PoseStamped ``` Each entry under `nodes:` is an instance: `id` is its unique name, `type` is the node-type folder it comes from, and `inputs`/`outputs` declare its ports. An input's `source` is written `/`. Here, `detector`'s `image` input reads `camera`'s `image` output. The optional `prefix` namespaces the topics this graph creates; if you omit it, Cerulion resolves it to the host name at load time. A graph is named by its **file**: `graphs/perception.yaml` is the graph `perception`, and that stem is what every surface uses — the run directory, the bag filename, and the `graph=` field on log lines. There is no `name:` key to keep in sync with it. Every other key is checked: a misspelling is a loud parse error naming the offending key, never a setting quietly dropped. You run a graph with `cerulion graph run `, which loads each instance's compiled library, wires the topics, and drives execution. See [wire and run a graph](/cerulion/guides/wire-and-run-a-graph) for the workflow. ## Topic A **topic** is a named channel that carries messages from a publisher to its subscribers over shared memory. You do not create topics by hand; Cerulion derives them from your graph wiring. When `detector`'s `image` input reads `camera/image`, the runtime sets up the underlying shared-memory channel for you. Topics are how you observe a running system from the outside. Because discovery happens through the shared-memory transport, the `topic` commands work without a workspace: * `cerulion topic list`: show active topics — local ones first, then the robots and topics it finds on the network. * `cerulion topic echo `: print messages as they arrive. * `cerulion topic hz `: measure the publish rate. A runtime topic name is absolute: `///`, for example `/robot1/camera/image`. Inside a graph file you write the short `camera/image` form, which resolves under the graph's prefix. An output can also pin an absolute `topic:` of its own. See [inspect topics](/cerulion/guides/inspect-topics) for the full set. ![Conceptual illustration of one shared payload connected to three local compute devices.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/shared-payload.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=38e9ebfddc866ac6e52925d78b8b6793) ## Schema A **schema** is the shape of a message: its fields and their types. A schema gives a topic a known layout so publishers and subscribers agree on what the bytes mean. Cerulion gives you two sources of schemas: * **ROS 2 message types** from the `native_ros2_messages` crate, for example `sensor_msgs/Image` or `geometry_msgs/Vector3`. Import them with `use native_ros2_messages::::;`. These cover the common robotics message families out of the box. * **Workspace schemas** you define yourself under `schemas/.yaml`, created with `cerulion schema create `, for message shapes specific to your project. Schemas have both **fixed** fields (primitives written directly) and **variable** fields (strings and arrays). The distinction matters when you write outputs in a node; see [messages and schemas](/cerulion/guides/messages-and-schemas). ## How it runs Putting the nouns together: you write **node types**, wire **instances** of them in a **graph**, and run the graph. The graph determines the topology; each node's **trigger policy** determines when it fires; the runtime moves messages between instances over **topics** carrying typed **schemas**. On Linux and macOS, a live run also splits itself across **worker processes**, one per process group, so a crashed node takes down only its own group. Each worker steps on its own clock; there is no shared per-step barrier, so two live runs can interleave differently. What makes a run repeatable is its recording, not the live schedule. Set `CERULION_EXECUTION_MODE=lockstep` to make every worker advance behind a shared per-step barrier instead. See [Run a graph across processes](/cerulion/guides/run-multi-process). Two properties of that runtime are worth understanding as benefits, even though you never configure them directly. ### Zero-copy ![Conceptual illustration of a camera payload branching to two local readers.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/zero-copy-readers.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=1d1e7a1d0c668681a38f08d296bc8e3a) When a node writes an output, it writes once into a shared-memory slot, and subscribers read it in place; the message is not copied on its way across. The practical benefit is **flat latency**: moving a 16 MB camera frame between two nodes costs about the same as moving a 64-byte command, so large sensor data moves at near-hardware speed without you tuning anything. The numbers behind this are in [Why Cerulion](/cerulion/why-cerulion). ### Replay ![Conceptual side-by-side view of the same robot pose in a recorded run and a replay.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/deterministic-replay.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=766adc107c7024e3ccdc01429c200c5d) The graph fixes which node depends on which and when each may fire. It does not fix the live schedule: workers run independently and the host OS schedules them. A live run (`--time-source real`, the default) wakes within microseconds of a publish; `--time-source virtual` steps a deterministic clock instead, for tests and benchmarks. A recording keeps what the graph file cannot, the inputs each node read and the scheduling decisions made. `cerulion bag play --resim all --verify` re-runs a supported native recording against your current node builds and compares the outputs it covers; exit 1 names the topic that changed. A pass means the covered outputs matched, so check what the bag covers with `cerulion bag info`. See [Execution order](/cerulion/execution-order) for the levels, trigger policies, process layout, and clock choices you can inspect and control. The practical benefit is a recording you can test against: capture a failure once, then re-run your changed code against the inputs that reached the robot. See [Record and replay a run](/cerulion/guides/record-and-replay) and [Why Cerulion](/cerulion/why-cerulion). ## Next steps > [card] [Why Cerulion](/cerulion/why-cerulion) > > How Cerulion compares to ROS 2 and the performance story behind zero-copy. > [card] [Execution order](/cerulion/execution-order) > > See how your graph determines levels, triggers, clocks, and process layout. > [card] [Define a node](/cerulion/guides/define-a-node) > > Create a node type, add ports, choose a trigger policy, and write `tick()`. > [card] [Wire and run a graph](/cerulion/guides/wire-and-run-a-graph) > > Stage instances, wire inputs, validate, and run. > [card] [Record and replay a run](/cerulion/guides/record-and-replay) > > Bag a run, inspect it, and re-execute your nodes against it. > [card] [CLI reference](/cerulion/reference/cli) > > Every command and flag, in one place. # Execution order Source: https://docs.cerulion.com/cerulion/execution-order See how your graph determines node order, trigger timing, process layout, and replay behavior. Cerulion reads your graph file's topology and each node's trigger policy before a run. The graph fixes which node depends on which and when each may fire. It does not fix the live schedule: workers run independently and the host OS schedules them. What the graph gives you is a user-visible execution plan: which nodes share a level, which topics trigger the next level, and which process group owns each level band. ## See the order your graph derives Levelization follows the graph's triggering edges. A camera publishes an image, the detector fires when that image arrives, and a downstream node runs after the detector's output reaches its trigger input. ```mermaid theme={null} flowchart LR Camera[Camera] -->|sensor_msgs/Image| Detector[Detector] Detector -->|detections| Planner[Planner] ``` *Figure: Triggering topic edges carry a camera frame through the graph in a derived order.* Run the read-only inspection command from your workspace: ```bash theme={null} cerulion graph levels perception ``` The command prints the graph identity, the levelization source, a node and level count, one line per level with each node's trigger policy, and triggering topic edges leaving each level: ```text theme={null} graph: perception prefix: robot1 levels source: derived (trigger-aware Kahn levelization) nodes: 3 levels: 3 level 0: camera [period(33ms)] -> /robot1/camera/image camera -> detector (level 1) level 1: detector [data(image)] -> /robot1/detector/detections detector -> planner (level 2) level 2: planner [data(detections)] ``` The graph file supplies the `prefix:` value; if it is omitted, Cerulion derives it from the hostname, so `robot1` and the topic names in this sample are illustrative. If the graph contains `process_groups:`, the report also prints the number of groups, each group's rank, its owned level band, its node members, and a partition verdict. ## Trigger policies choose when nodes fire Level order tells you where a node sits. Its trigger policy tells Cerulion when that node fires: * **Period** — fires every N milliseconds, configured with `#[cerulion_node(period_ms = N)]` or `--policy period_ms=N`. * **Data** — fires when data arrives on its trigger input, configured with `data_trigger=NAME` or a `#[input(trigger)]` port. * **Sync** — waits for a complete aligned set of trigger inputs within a `sync_window_ms=N` window. * **Unbounded sync** — fires once every trigger input holds an unconsumed message, with no time bound, configured with `#[cerulion_node(unbounded_sync)]`. Worst-case fire latency is the slowest publisher's inter-arrival interval, and unbounded if that publisher stops, so it suits batch and offline fusion rather than control loops. * **External** — represents a self-triggering ingress or driver node, such as a device file descriptor or blocking source. The node supplies an `external_source()` implementation. Trigger policy belongs to the node type, not the graph YAML. The graph supplies the wiring that connects the policy's inputs and outputs. See [trigger policies](/cerulion/reference/trigger-policies) for the complete grammar. ## Multi-process is the Unix default Under the real clock on Unix, an unpartitioned graph derives a process partition by default. Cerulion runs one worker process per derived group, holds the derived groups in memory, and leaves the graph file unchanged. When a cost snapshot is available, the partition is cost-aware; otherwise, the baseline is process-per-node. A graph with an existing `process_groups:` block uses those declared groups. Each worker steps on its own clock; there is no shared per-step barrier, so two live runs can interleave differently. What makes a run repeatable is its recording, not the live schedule. Set `CERULION_EXECUTION_MODE=lockstep` to make every worker advance behind a shared per-step barrier instead. Use `--single-process` to force the monolith instead: ```bash theme={null} cerulion graph run perception --single-process ``` Use the graph tools to inspect or prepare the layout: ```bash theme={null} cerulion graph plan perception cerulion graph levels perception cerulion graph profile perception cerulion graph partition perception --dry-run ``` * `graph plan` shows the processes a run starts and the nodes in each, without running the graph. * `graph levels` shows the derived levels and trigger edges. * `graph profile` measures a live graph and writes a cost snapshot. * `graph partition --dry-run` previews the process groups without rewriting the graph YAML. * `graph run --yes` saves the layout the run derives into the graph YAML, with a `.bak` backup. ## Choose the clock for the job `graph run` uses the real clock by default. It is the live, event-driven path: the runtime wakes when a publish arrives. Use the virtual clock for deterministic `graph run` executions and benchmarking. It uses a deterministic clock with a 1 ms poll loop rather than waiting on live time. Bag resimulation does not use this selection: `--resim all` runs on the recording's own clock. The external clock is accepted by the CLI but inert today: it starts at 0 and does not advance, so time-based triggers never fire. It parses as `--time-source external`; no external time feeder is wired yet. > [!WARNING] > > An `external` trigger policy and `--time-source external` are different > controls. The policy describes a node's ingress source; the time-source flag > selects the clock for the graph run. ## What makes a run repeatable A recording keeps what the graph file cannot: the inputs each node read and the scheduling decisions made. `cerulion bag play --resim all --verify` re-runs a supported native recording against your current node builds and compares the outputs it covers; exit 1 names the topic that changed. A pass means the covered outputs matched, so check what the bag covers with `cerulion bag info`. You can use the real clock for a live robot, the virtual clock for deterministic `graph run` executions and benchmarking, and the recording's own clock for resimulation, all without changing the graph. For the complete workflow, see [record and replay a run](/cerulion/guides/record-and-replay). ## Next steps > [card] [Wire and run a graph](/cerulion/guides/wire-and-run-a-graph) > > Stage node instances, wire inputs, validate, and run. > [card] [Run across processes](/cerulion/guides/run-multi-process) > > Declare process groups, inspect partitions, and choose the monolith when needed. > [card] [Record and replay](/cerulion/guides/record-and-replay) > > Record a run and verify a byte-comparable re-execution. # Run Cerulion on Android Source: https://docs.cerulion.com/cerulion/guides/android Build the Cerulion CLI and your nodes for an Android device from source, or embed a graph in an Android app. A phone or an Android-based robot controller can run a Cerulion graph, record it, and serve its topics to your desk. There is no prebuilt Android download: you build the CLI and your nodes from a [source checkout](https://github.com/cerulion-inc/cerulion) on a Linux or macOS host and copy them to the device, or link Cerulion into an app. There are two routes: | Route | Use it when | | - | - | | The CLI on a device | You run `cerulion graph run`, `topic` and `bag` commands in an `adb shell`, the way you would on Linux. | | Embedded in an app | An Android app runs the graph inside its own process, through a Java facade. | ## Toolchain The supported targets are `arm64-v8a` and `x86_64`, with Android API 30 or newer, NDK 27.2 and cargo-ndk 4.1.2. Build on a host, never on the device: ```bash theme={null} cargo ndk -t arm64-v8a --platform 30 check -p cerulion_core ``` Use `-t x86_64` for an x86\_64 device. ## Run the CLI on a device **1. Build the CLI and the network daemon** From the source checkout, on the host: ```bash theme={null} cargo ndk -t arm64-v8a --platform 30 build -p cerulion_cli -p cerulion_netd ``` **2. Build your node workspace** Node libraries are built on the host too, with any Rust 1.95 or newer: it does not have to be the compiler that built the CLI, but both builds need Android support. From your workspace: ```bash theme={null} cargo ndk -t arm64-v8a --platform 30 build ``` cargo-ndk puts the libraries under `target//`, and the CLI looks there first. Keep that directory when you copy the workspace to the device; do not flatten its libraries into `target/`. A workspace made by `cerulion workspace create` already carries the iceoryx2 patch block Android needs. **3. Set up the shell on the device** In an `adb shell`, give the CLI writable home and temporary directories: ```bash theme={null} export HOME=/data/local/tmp/cer/home export TMPDIR=/data/local/tmp/cer/tmp mkdir -p "$HOME" "$TMPDIR" ``` Run `cerulion login` once in that shell. Then run your graph as on any other machine. > [!WARNING] > > On Android the network gateway refuses every LAN peer unless `CERULION_LAN_ACCESS=open` is set in the shell that starts it. To read the device's topics from a desk over USB, forward the port with `adb forward tcp:7683 tcp:7683`, have the device listen on `tcp/0.0.0.0:7683`, and connect the desk CLI to `tcp/127.0.0.1:7683`. ## Embed a graph in an app `cerulion_android` gives an app a Java facade, backed by JNI, over an embedded runtime that runs the graph, the gateway and the recorder in the app's process. The app loads one native library: its own runtime crate, which links `cerulion_android` and the app's graph nodes. Nodes are linked into that library, not loaded from separate files. The sample app in the repository, `crates/cerulion_android/android`, is a complete example: it links the `timer` and `printer` nodes of `examples/basic_timer`, and ships its graph in the APK. Its build steps are in the [Android guide in the repository](https://github.com/cerulion-inc/cerulion/blob/main/docs/android.md). ## What works on Android | Feature | On Android | | - | - | | Pub/sub within a process and between processes | Yes. Shared-memory objects are regular files. | | `graph run`, `topic list`, `echo`, `info`, `hz`, `bag record`, `info`, `play` | Yes, with the CLI on the device. | | Network gateway and mDNS discovery | Yes. mDNS needs a multicast lock in an app and a TCP listen port. | | LAN access default | Paired: LAN peers are refused unless you open it. | | Node build | On the host only, with cargo-ndk. | | `cerulion viz` | No. | | `process_groups:` in an app | No: an app runs its graph in one process. | | Recovering a lock after a crash | No. Android has no robust mutexes, so a lock held by a process that exited cannot be recovered. | > [!NOTE] > > `cerulion topic list` run on the device cannot see an app's topics; read them from a host through the app's gateway. An emulator does not pass multicast to the host, so test mDNS discovery from a physical device. ## Next steps > [card] [Installation](/cerulion/installation) > > Set up the host you build from. > [card] [Network a graph](/cerulion/guides/network-and-remote-robots) > > Reach the device's topics from your desk. # Backpressure and deadlines Source: https://docs.cerulion.com/cerulion/guides/backpressure-and-deadlines Choose a queue policy for a fast producer, cap a node's rate, and react when data arrives late or a publish is missed. A producer that outruns its consumer is the normal case in robotics, not an error: a camera at 60 Hz feeding a detector that takes 40 ms per frame will always be ahead. What you choose is **what the consumer does with the frames it cannot keep up with** — and Cerulion treats that as a scheduling decision, so no policy ever copies your data into a side buffer. ## Pick an input policy ```rust theme={null} #[cerulion_node] #[derive(Default)] struct Detector { #[input(trigger, consume = latest)] image: Image, #[output] detection: PoseStamped, } ``` | Policy | What happens | Reach for it when | | - | - | - | | `drop_oldest` (default) | When the queue is full, the oldest unread frame is replaced by the new one. This bounds the queue; it does not skip ahead. A trigger input still fires once per surviving frame, oldest first, so a slow consumer reads frames up to `depth` old. | Sensor data where losing a frame under overload is acceptable. Pair it with `consume = latest` (below) when only the newest frame matters. | | `sample(N)` | A read is accepted only if its publish timestamp is at least N ms after the last accepted one; anything closer is decimated and counted. | Deliberately consuming a fast topic at a slower rate — a 100 Hz lidar into a 10 Hz logger. | | `block` | The **producer's** tick is deferred the moment the consumer's queue reaches its declared depth, before anything can overflow. No frame is dropped for overflow between an in-graph producer and consumers that read every frame. A consumer declared `consume = latest` still skips frames. | A stream where every message matters: commands, transactions, state deltas. | ### Read only the newest frame A trigger input fires the node once per queued frame by default (`consume = fifo`), so a detector slower than its camera works through a backlog. To process only the newest frame, declare `consume = latest` on the trigger input, as the example above does: the node fires at most once per scheduler step, and its read serves the newest queued frame. The older frames that read skipped are not served and not counted as drops. Keep the `fifo` default for inputs where every message matters. `consume` applies to trigger inputs only; see the [node macro reference](/cerulion/reference/node-macro) for the full rules. `depth = N` is the real queue depth, honored exactly — default 10, maximum 64. Every unit of depth reserves a full-sized shared-memory slot, so a deep queue on an image-class topic reserves a great deal of `/dev/shm`. If you want more than 64, the consumer is permanently slower than the producer and the answer is a policy, not a bigger queue. ### `block` has real constraints `block` does not drop for overflow, which is why it constrains the graph: * It is only installed when **every** consumer of the topic declares it. * The topic **must have an in-graph producer** — an external publisher cannot be deferred, and the build says so. * Under multi-process execution, the derived partition puts the producer and every `block` consumer in one process group, because crossing a process boundary costs a real hop. A hand-written `process_groups:` may split the edge, and is accepted when it is **creditable** — exactly one in-graph producer and no non-`block` consumers — in which case the supervisor mints a cross-process credit word and the deferred producer parks on it until the consumer drains. A split is refused before any worker starts in two shapes: a `multi_publisher_topics` topic with two or more in-graph writers, and a topic whose `block` consumers sit alongside non-`block` siblings. Co-locating the flow in one group avoids both — the limit is on crossing the boundary, not on the graph. See [Run a graph across processes](/cerulion/guides/run-multi-process). * A slow consumer holds its producer back. That is the trade you are making: latency for completeness. ### Cap the producer instead When the right answer is "this node should not run this often", cap the node rather than the edge: ```rust theme={null} #[cerulion_node(throttle_ms = 100)] ``` `throttle_ms` defers the node's own tick while less than N ms have passed since its last fire. It is mutually exclusive with `period_ms` — a period already pins the rate — and composes with `block`: the tick defers if either gate fires. ## Set deadlines Deadlines are QoS, not triggers. They do not change when a node fires; they tell you when reality diverged from the contract, with a counter and a structured warning. | Attribute | Watches | Fires when | | - | - | - | | `#[input(expect_within_ms = N)]` | An input's arrival rate | N ms elapse with no fresh data on that input. | | `#[output(promise_within_ms = N)]` | Your own publish rate | N ms elapse with no publish on that output. | | `#[cerulion_node(tick_within_ms = N)]` | Your tick's execution time | A tick takes longer than N ms. Counter only — there is no event for it. | ```rust theme={null} #[cerulion_node(period_ms = 20, tick_within_ms = 15)] #[derive(Default)] struct Controller { #[input(expect_within_ms = 100)] odometry: Odometry, #[output(promise_within_ms = 25)] cmd_vel: Twist, odometry_stale: bool, } ``` Each is worth a moment of thought before you set it: * `expect_within_ms` is how you notice a producer that stalled **without disconnecting**. A non-trigger input holds its last value, so a frozen sensor otherwise looks like a healthy one publishing the same reading. * `promise_within_ms` is a promise about **your** output, which makes it the deadline a downstream team can hold you to. * `tick_within_ms` catches the tick that occasionally takes 40 ms in a 20 ms loop — the one that never shows up in an average. ## React in code Handle any of these in the node itself with `#[on_event]`. The event's parameter type selects the event, and the filter names the port: ```rust theme={null} #[cerulion_node_impl] impl Controller { fn tick(&mut self) -> Result<(), NodeError> { Ok(()) } #[on_event(input = "odometry")] fn on_odometry_late(&mut self, event: ExpectWithinEvent) { self.odometry_stale = true; tracing::warn!(elapsed_ms = event.elapsed_ms, "odometry overdue"); } #[on_event(input = "odometry")] fn on_odometry_pressure(&mut self, event: BackpressureEvent) { tracing::warn!(policy = ?event.policy, dropped = event.dropped, "odometry backpressure"); } } ``` | Event | Filter | Meaning | | - | - | - | | `BackpressureEvent` | `input` | Frames were dropped, decimated, or the producer was deferred. | | `ExpectWithinEvent` | `input` | An input's arrival deadline was missed. | | `PromiseWithinEvent` | `output` | Your own publish deadline was missed. | | `LivelinessEvent` | `input` | A publisher on that input appeared or went away. | Handlers run at the tail of a successful tick, in declaration order, and are edge-triggered — one event per regime, not one per occurrence. They do not run at all if `tick()` returned `Err`. Every handler needs a filter matching its event's scope, and there is no node-wide handler and no tick-deadline event: `tick_within_ms` is a counter. `BackpressureEvent` fires for all three policies, so branch on `event.policy`. Its `dropped` field is the number of messages actually lost this regime — always `0` under `block`, which is flow control rather than loss. > [!WARNING] > > Handlers dispatch on the node's **own** tick. A purely data-triggered node stops ticking when its input goes silent, so it may never run its `LivelinessEvent` handler for a disconnect. Give a node that must notice silence a period trigger. ## Observe from outside Every policy and deadline also increments a counter, so a diagnostic node or an operator can read the same facts without changing node code: per-input drop, decimation, and defer counts, and per-input and per-output deadline misses. Counters are the observable truth; the log line is a convenience. ## Next steps > [card] [Node macro reference](/cerulion/reference/node-macro) > > Every attribute and its exact validation rules. > [card] [Trigger policies](/cerulion/reference/trigger-policies) > > When a node fires in the first place. # Bridge a ROS 2 system Source: https://docs.cerulion.com/cerulion/guides/bridge-ros2 Discover an existing ROS 2 robot's DDS topics with cerulion ros2 attach, generate a bridge graph, and consume the topics in Cerulion. You do not have to rewrite a ROS 2 robot to try Cerulion. `cerulion ros2 attach` points Cerulion at a robot that is already running ROS 2. It discovers the live DDS topics, generates a bridge graph for the ones whose types resolve, and runs it, so those topics become ordinary Cerulion topics you can echo, record, and consume from your own nodes. Run it **on the robot**, or on a machine on the robot's DDS network. `ros2 attach` is validated on ROS 2 Jazzy, and on Foxy and Humble through local type resolution only. ## Look before you write `--dry-run` prints the discovery report and stops, without writing or running the bridge. It runs from any directory; outside a workspace it uses a temporary directory, so `TMPDIR` must be writable. ```bash theme={null} cerulion ros2 attach --iface 192.168.123.18 --dry-run ``` | Flag | Default | Meaning | | - | - | - | | `--iface IP` | required | The robot-LAN interface to run DDS discovery on. Required, because restricting discovery to one interface is what keeps a multi-homed host from dropping fragmented discovery data. | | `--domain N` | `0` | Must match the robot's `ROS_DOMAIN_ID`. | | `--timeout SECS` | `5` | Discovery window. Must be greater than 0 and at most 3600. | The report tells you which topics resolved to a known type and which did not. A topic whose type Cerulion cannot resolve is left out of the generated graph — add the message definition to your workspace and re-run if you need it. ## Read the migration section Every attach report ends with a `MIGRATION` section — no flag, `--dry-run` included. It groups the discovered **processes** by whether they could run on Cerulion transport directly instead of being bridged, and prints the commands that would do it: ```text theme={null} MIGRATION — what could run natively on rmw_cerulion: RESTARTABLE TODAY (1 process(es)) — every message type these nodes use resolves locally; restart each process under rmw_cerulion (RMW_IMPLEMENTATION=rmw_cerulion) and its topics ride the Cerulion wire natively, no bridge hop: /camera_driver — sensor_msgs/Image RESTARTABLE AFTER THIS ATTACH WRITES ITS SCHEMAS (1 process(es)) — these nodes use custom types resolved during this attach; consent writes the .msg files, then the same restart applies: /perception/depth_filter — vendor_msgs/DepthPacket STAYS BRIDGED (1 topic(s), 1 process(es)) — the dds_bridge keeps carrying these: /utlidar/cloud (sensor_msgs/PointCloud2) — no ROS 2 node record seen (vendor/raw DDS, or the node table was not observed this window); the type resolves locally — if this is one of your nodes, restarting it under rmw_cerulion works /obstacle_tracker — blocked by unresolvable or excluded type(s): acme_msgs/TrackArray (see the report above) Restart your own bringup natively — one word in front of the launch you already own: cerulion ros2 launch .launch.py Or declare the restartable nodes as ros2: entries in a Cerulion graph and let `cerulion graph run` bring them up beside native nodes (fill in each package/executable — DDS discovery sees endpoints, not launch metadata): nodes: - id: "camera_driver" ros2: package: # the package that ships /camera_driver executable: - id: "perception_depth_filter" ros2: package: # the package that ships /perception/depth_filter executable: Bridged vs native: a bridged topic pays a per-message CDR decode in the dds_bridge; a native topic is published once on the Cerulion wire — no decode hop, zero-copy eligible. The cost of native is one process restart. To adopt the loaned zero-copy publish API inside your own nodes, see `cerulion ros2 migrate`. ``` The restart unit is the **process** — one DDS participant, which is the granularity the ROS 2 graph gives attach. A process is restartable today when every message type on its endpoints already resolves locally, restartable after the write when a type was resolved during this attach and consent still has to materialize the `.msg` files, and stays bridged when a type resolves nowhere. Endpoints attach cannot attribute to a node are counted as **topics** rather than processes, and their line says so: no `ros_discovery_info` record was seen for them, which is either a vendor or raw-DDS process or a node table the discovery window did not observe. Where such a topic's type does resolve, the line still tells you what a restart would buy. On a robot that publishes no node table at all, the section says plainly that no restartable process can be named, and prints no command block — there is no process to name in it. Paste the `ros2:` block into a graph file and fill in each `package` and `executable`: DDS discovery sees endpoints, not launch metadata, so attach cannot know which package ships a node. See [Or run the ROS 2 nodes on Cerulion transport](#or-run-the-ros-2-nodes-on-cerulion-transport) below. > [!NOTE] > > ROS plumbing endpoints — parameter services, `/rosout`, `/parameter_events`, `ros_discovery_info` — are left out of the judgment. Every ROS 2 node carries them under any RMW, so counting them would mark every stock node unrestartable. A process that exposed nothing else is listed as having no message endpoints seen. The section is rendered from the discovery data attach already holds. It opens no extra network, never blocks, and changes no outcome or exit code. ## Generate and run the bridge ```bash theme={null} cerulion ros2 attach --iface 192.168.123.18 --graph-name go2 ``` It writes `graphs/go2.yaml` plus `graphs/go2.bridge.yaml`, asks you to confirm, and then runs the bridge. Use `--yes` for scripts and non-interactive shells. | Flag | Meaning | | - | - | | `--graph-name NAME` | Names the generated files (default `attach`). | | `--topic-prefix PREFIX` | Prepends a prefix to each generated Cerulion topic name. By default the ROS topic name is mirrored. | | `--robot-name NAME` | The namespace label written as the graph's `prefix:`. | > [!NOTE] > > `--robot-name` is not the network identity. The name that shows up in `cerulion topic list` and over mDNS comes from the machine's hostname, or from `CERULION_ROBOT_IDENTITY` if you set it. ## See the data on your desk The generated graph bridges the robot's topics and nothing else — no visualization node is staged on the robot, which keeps the robot's job to shipping raw frames. To look at the data, work from your own machine: ```bash theme={null} cerulion topic list # the robot and its topics appear here ``` Then read a topic from your desk with `cerulion topic echo `, or measure its rate with `cerulion topic hz `; each demands the topic only while it runs. See [Reach remote robots](/cerulion/guides/network-and-remote-robots). ## Consume a bridged topic from your own node A bridged topic is a normal topic, so wire an input to it by absolute name: ```yaml theme={null} nodes: - id: obstacle_monitor type: obstacle_monitor inputs: - name: cloud source: /go2/utlidar/cloud ``` An absolute source with no in-graph producer is an **external topic**: Cerulion does not own it, and other publishers attach to it freely. ## Record a bridged system A bridge run records like any other run, and a recording of one plays back as a robot substitute when the robot is not available: ```bash theme={null} cerulion bag record -a -o go2_session.mcap --duration 60 ``` > [!NOTE] > > Use plain `bag play` for a bridge recording. A bridge node reads a live device rather than computing from its graph inputs, and `--resim all` re-executes **every** node in the bag — including the bridge, against DDS that is no longer there. See [Record and replay a run](/cerulion/guides/record-and-replay). ## Or run the ROS 2 nodes on Cerulion transport Bridging carries another robot's DDS traffic across. When the ROS 2 nodes are yours to launch, run them **on Cerulion transport** instead of bridging to them — swap the command, not the stack: ```bash theme={null} cerulion ros2 launch my_robot_bringup camera.launch.py use_sim_time:=false cerulion ros2 run usb_cam usb_cam_node_exe ``` Everything after `run` or `launch` reaches `ros2` untouched, except Cerulion's own leading flags (`--record-deliveries` and `--replay-deliveries`, see [Replay a ROS 2 process](/cerulion/guides/replay-a-ros2-process)), and Cerulion stages the child so ROS 2 loads `rmw_cerulion`: the nodes' topics land on the same shared-memory transport your native nodes use. Part of that staging is an `LD_PRELOAD` of `libcerulion_heaphook.so` when it ships beside `librmw_cerulion.so` (the `cerulion` binary's own directory, or wherever `CERULION_LIB_DIR` points); one `info` line names the path it injected, and `CERULION_ROS2_PRELOAD=off` turns it off. This is Unix only. See [`cerulion ros2`](/cerulion/reference/cli#ros2). `rmw_cerulion` is tested in CI on ROS 2 Foxy, Galactic, Humble, Jazzy and Lyrical. The Linux packages and archives carry a library built for Jazzy, and Lyrical's library is the separate `cerulion-rmw-lyrical` download; for another distro, build it from a source checkout with `tools/scripts/build_rmw.sh `. Jazzy is the distro it has run on a robot with. ROS 2 Jazzy publishes no macOS binaries, so `cerulion ros2 run` and `ros2 launch` need Linux. > [!NOTE] > > `ros2 topic list` and `rqt` do not see topics that run on Cerulion's transport. Use `cerulion topic list`, `topic echo` and `topic hz` to see them. > [!WARNING] > > These two launchers refuse `--adopt-take`, the flag that arms zero-copy plain takes, with exit `69` — and refuse `CERULION_RMW_ADOPT_TAKE` set in the environment with exit `2`. `ros2` is a Python CLI that spawns your node as a further subprocess with `close_fds=True`, so the heap hook never reaches the node and every take would silently fall back to a copy. To use adopted takes, launch the node executable directly with the hook preloaded and `CERULION_RMW_ADOPT_TAKE=1`; `CERULION_RMW_ADOPT_TAKE_BUDGET` caps how many samples one subscription may hold adopted at a time. Linux and glibc only. The topics keep their ROS names verbatim: a ROS 2 publisher on `/camera/image_raw` is the Cerulion topic `/camera/image_raw`, leading slash included, so you wire an `#[input]` to it and record it under the name ROS 2 already uses. Each of those publishers also registers its topic with the machine's network plane, so a ROS 2 node's output is announced and demandable from your desk exactly like a native node's — see [Reach remote robots](/cerulion/guides/network-and-remote-robots). A ROS 2 publisher has no graph YAML to size its payloads in, so each variable-length message type gets the same per-type shared-memory budget Cerulion gives one of its own outputs of that schema — a type Cerulion does not know takes 128 MiB. A message larger than its budget fails to publish, loudly; raise the ceiling for that type with [`CERULION_RMW_SLICE_CEILING`](/cerulion/reference/environment-variables#ros-2-on-cerulion-transport): ```bash theme={null} CERULION_RMW_SLICE_CEILING=my_msgs/StitchedImage:268435456 \ cerulion ros2 run camera_stitcher stitcher_node ``` ### Publish a large message without the copy That preloaded hook does more than ride along: it lets a publisher hand your node the shared-memory slot it is about to publish from, on Linux with glibc and libstdc++. A message type qualifies for this in-slot fill when it has at least one unbounded numeric sequence — `sensor_msgs/Image.data`, `sensor_msgs/PointCloud2.data`, `sensor_msgs/LaserScan.ranges` — so a camera node that borrows a loaned `sensor_msgs/Image` and fills `data` writes the frame once, into the slot a subscriber reads, instead of filling a heap buffer that is copied at publish. Nodes that publish normally are unaffected. The parts a publisher cannot place in the slot are still copied for you, so whether a field is filled in place or copied never changes whether the publish succeeds or what lands on the wire. A message too large for its slot ceiling still fails loudly, exactly as it does without the hook. Fields that always copy: bounded sequences, `bool[]`, fields declared with a default value, and a sequence your node assigned from memory it allocated elsewhere. When a publish falls back to copying, the RMW says so once for that publisher. Two things switch the behavior off, both loudly: `CERULION_ROS2_PRELOAD=off` (no hook in the child), and a [`CERULION_RMW_SLICE_CEILING`](/cerulion/reference/environment-variables#ros-2-on-cerulion-transport) too small to hold the message struct plus a slot header, which keeps that topic on the copy path for the life of that publisher. To bring both halves of a mixed robot up from one file, declare the ROS 2 processes as `ros2:` entries beside your native nodes and run `cerulion graph run`: ```yaml theme={null} nodes: - id: obstacle_monitor type: obstacle_monitor inputs: - name: cloud source: /go2/utlidar/cloud - id: lidar_driver ros2: package: unitree_lidar_ros2 executable: unitree_lidar_ros2_node ``` `graph run` spawns and supervises each entry; a `ros2:` entry declares no ports, so its topics meet native nodes by absolute topic name. See [`ros2:` entries](/cerulion/reference/graph-and-schema-files#ros2-entries). ## Next steps > [card] [Message types](/cerulion/reference/message-types) > > The 254 built-in ROS 2 messages that resolve out of the box. > [card] [Record and replay a run](/cerulion/guides/record-and-replay) > > Bag a bridged system and play it back without the robot. # Connect an MCP client Source: https://docs.cerulion.com/cerulion/guides/connect-an-mcp-client Connect Claude Code, Codex, Cursor, Claude Desktop, or VS Code to the hosted Cerulion MCP and Hindsight endpoints, and give your agent tools for analyzing robot recordings. Early access · Not open source > [!NOTE] > > The hosted Cerulion MCP and Hindsight endpoints are in early access and are not open source. You sign in with your Cerulion account. The `cerulion` CLI and runtime are [open source](https://github.com/cerulion-inc/cerulion). [Book 30 minutes with us](https://link.cerulion.com/book/docs) for help getting connected. **Give your coding agent tools for analyzing robot recordings, with every finding cited to a topic and timestamp.** Cerulion hosts two Model Context Protocol (MCP) endpoints. Claude Code, Codex, Cursor, Claude Desktop, VS Code, and other MCP clients connect to them over HTTPS and sign in with OAuth. Give the agent an MCAP recording served over `https://`, and it indexes the recording, reads a deterministic debrief, lists the anomalies, and finds the messages to cite around each one. The hosted endpoints have no local workspace tools. Build, run, and inspect nodes and topics with the [`cerulion` CLI](/cerulion/reference/cli). A coding agent that runs shell commands, such as Claude Code or Codex, runs the CLI in your terminal like any other command. ## Choose an endpoint | Endpoint | URL | Tools | | - | - | - | | Cerulion MCP | `https://mcp.cerulion.com/mcp/cerulion` | The eight recording tools, plus the Cerulion Cloud tools | | Hindsight | `https://mcp.cerulion.com/mcp/hindsight` | The eight recording tools alone | Both endpoints serve the same recording tools, and you can add both. Each URL is its own server in your client: a client that signs in at one endpoint is refused at the other, so add each one as a separate entry, as below. ## Add the endpoints to your client > [tab] Claude Code > > ```bash theme={null} > claude mcp add --transport http cerulion https://mcp.cerulion.com/mcp/cerulion > claude mcp add --transport http hindsight https://mcp.cerulion.com/mcp/hindsight > ``` > > Then run `/mcp` inside Claude Code and sign in to each server with your > Cerulion account. The servers are added for the current project; add > `--scope user` to use them in every project. > [tab] Codex > > Add these entries to `~/.codex/config.toml`: > > ```toml theme={null} > [mcp_servers.cerulion] > url = "https://mcp.cerulion.com/mcp/cerulion" > > [mcp_servers.hindsight] > url = "https://mcp.cerulion.com/mcp/hindsight" > ``` > > Then sign in to each server with your Cerulion account: > > ```bash theme={null} > codex mcp login cerulion > codex mcp login hindsight > ``` > > On a machine without a browser, add `--no-browser`, open the URL it prints, > and paste the full redirect URL back into the terminal. > [tab] Cursor > > Add these servers to `~/.cursor/mcp.json` for every project, or to > `.cursor/mcp.json` for one project: > > ```json theme={null} > { > "mcpServers": { > "cerulion": { > "url": "https://mcp.cerulion.com/mcp/cerulion" > }, > "hindsight": { > "url": "https://mcp.cerulion.com/mcp/hindsight" > } > } > } > ``` > > Cursor runs the OAuth sign-in for each server. Sign in with your Cerulion > account. > [tab] Claude Desktop > > Claude Desktop adds a hosted server as a custom connector: > > 1. Open **Customize → Connectors**, click **Add**, then **Add custom connector**. > 2. Enter the name `cerulion` and the URL `https://mcp.cerulion.com/mcp/cerulion`, then click **Continue**. > 3. Follow the prompts and sign in with your Cerulion account. > > Add `hindsight` with `https://mcp.cerulion.com/mcp/hindsight` the same way. > On a Team or Enterprise plan, an organization owner adds custom connectors. > [tab] VS Code > > Add these servers to `.mcp.json` at the root of your workspace: > > ```json theme={null} > { > "mcpServers": { > "cerulion": { > "type": "http", > "url": "https://mcp.cerulion.com/mcp/cerulion", > "tools": ["*"] > }, > "hindsight": { > "type": "http", > "url": "https://mcp.cerulion.com/mcp/hindsight", > "tools": ["*"] > } > } > } > ``` > > Complete the sign-in with your Cerulion account when VS Code prompts you. ## What the tools do Both endpoints serve the recording tools. Each takes the recording's `https://` URL as `source`. | Tool | What it does | | - | - | | `open_bag` | Opens a recording and returns a briefing: what was recorded, the debrief headline, and how to cite. | | `get_debrief` | Returns the deterministic summary: metrics, anomalies, and the time the run went sideways. | | `find_anomalies` | Lists what the detectors found, worst first, each with the log time to cite. | | `scrub` | Shows per-second signals and recorder events for chosen topics in a time window. | | `query_index` | Runs one read-only SQL query over the recording's index. | | `sample_messages` | Returns the message rows on a topic nearest a log time. | | `list_topics` | Lists every recorded topic with its rate, message count, gaps, and dropouts. | | `get_foxglove_link` | Turns a cited moment into a Foxglove link, when the recording has a public URL. | On `/mcp/cerulion`, the `cloud_*` tools call the Cerulion Cloud API with your sign-in. The instance and DCV tools read and control the Cerulion Cloud instance of your account, so they work only on an account that has one. [MCP tools](/cerulion/reference/mcp-tools) lists every tool this page covers. ## Ask about a recording Record a run with the `cerulion` CLI (see [Record and replay a run](/cerulion/guides/record-and-replay)), then put the `.mcap` file where an `https://` URL serves it, such as a presigned object-storage link. Give the agent that URL: > Open the recording at `https://example.com/runs/obstacle_avoidance.mcap`, > read the debrief, and tell me when `/obstacle_avoidance/laser_scanner/scan` > went quiet and what happened next. Cite each claim. Replace the URL with your recording's. The server's instructions have the agent call `open_bag` first, read the debrief and the anomalies, and cite each finding as a topic and its log time in integer nanoseconds, exactly as recorded. ## Where calls go | Tools | Reach | | - | - | | Recording tools | Cerulion's server downloads the recording from its `https://` host and keeps the index in its cache. When the host returns an ETag, later calls check the URL again before they read the index. A call whose index is not in the cache downloads the recording again. | | `cloud_*` | The Cerulion Cloud API, called with your own sign-in | ## Security model * Your client signs in with OAuth against your Cerulion account, and every request carries that sign-in. A request without a valid sign-in gets `401`. * Cerulion's server fetches the recording itself, so a presigned URL works without making the recording public. The server indexes the download, deletes the downloaded recording, and keeps the index in its cache, so a second open of the same URL is fast. * A request whose `Origin` header is not a Claude, Anthropic, ChatGPT, OpenAI, Cursor, or Cerulion domain gets `403` with `origin not allowed`. * The server limits the requests each client address sends per minute. Past the limit it answers `429` with `rate limit exceeded`. ## How tools behave * **Pass `source` on every call.** The server does not remember the recording between calls. An empty `source`, an `http://` URL, or a local file path is refused with a line that starts with `ERROR:`. * **The first open indexes in the background.** On a URL the server has not indexed, `open_bag` returns at once with `Indexing started for` and the URL. Call it again with the same URL about a minute later to get the briefing. A multi-GB recording takes one to two minutes. * **Keep the URL valid for the whole investigation.** When the recording's host returns an ETag, each later call checks the URL again, and a call whose index is not in the cache downloads the recording again. Either way, a presigned URL that expires partway through can make the later calls fail. A newly signed URL for the same recording is a different URL, and the server indexes it again. * **Errors name the fix.** A tool that could not do its job returns text that starts with `ERROR:` and says what to change. ## Troubleshooting * **`404` from `https://mcp.cerulion.com/mcp`.** Use a full endpoint URL: `https://mcp.cerulion.com/mcp/cerulion` or `https://mcp.cerulion.com/mcp/hindsight`. * **`403` with `this client is registered for` the other endpoint's path.** The client signed in at the other endpoint first. Add each endpoint as its own server entry, each with its own sign-in. * **`401`.** Your client has not signed in, or its sign-in expired. Sign in again: `/mcp` in Claude Code, `codex mcp login cerulion` in Codex. * **`429` with `rate limit exceeded`.** Wait a minute, then retry. * **`ERROR: hosted hindsight serves URLs only` or `ERROR: no bag ... in your library`.** The first answers an `http://` URL, the second a local path. Pass a public or presigned `https://` URL as `source`. ## Remove the endpoints The hosted endpoints need no install or upgrade. To remove them, delete the `cerulion` and `hindsight` entries from your client: run `claude mcp remove cerulion` and `claude mcp remove hindsight` in Claude Code, delete the `[mcp_servers.cerulion]` and `[mcp_servers.hindsight]` tables in Codex, delete the `mcpServers` entries in Cursor or VS Code, or remove the custom connectors in Claude Desktop. # Define a node Source: https://docs.cerulion.com/cerulion/guides/define-a-node Create a node type with ports and a trigger policy, then write its tick() in Rust. A node is a Rust crate with a `#[cerulion_node]` struct and a `tick()` method. This guide takes you from `cerulion node create` to a node that reads inputs, writes outputs, and is ready to stage into a graph. For the full attribute and policy grammar, see the [node macro reference](/cerulion/reference/node-macro) and [trigger policies reference](/cerulion/reference/trigger-policies). > [!NOTE] > > Run these commands from inside a workspace (a directory with a `[workspace]` > `Cargo.toml` and a `graphs/` folder). Create one with `cerulion workspace create `. ## Create the node type `cerulion node create ` scaffolds `nodes//` with a `Cargo.toml` (cdylib) and a `src/lib.rs` macro template. The type name becomes the folder name and, PascalCased, the struct name. It must be non-empty, alphanumeric or underscore, and must not start with a digit. Add ports while creating the node: | Flag | Value names | Meaning | | - | - | - | | `-o` / `--output` | `SCHEMA NAME` | Add one output port. | | `-i` / `--input` | `SCHEMA NAME` | Add one regular input port. | | `-T` / `--trigger-input` | `SCHEMA NAME` | Add one trigger input (fires the node on data arrival). | | `--policy` | `SPEC` | Set the trigger policy (see below). | > [!WARNING] > > Each of `-o`, `-i`, and `-T` takes **two** values (a schema and a name), and > you may pass **at most one** of each per `create` call. Add more ports later > with `node modify`. Schemas accept both `sensor_msgs/Image` and > `sensor_msgs::Image`; both canonicalize to the slash form. ### Pick a trigger policy The trigger policy decides *when* the node fires. Pass it with `--policy SPEC`: | `--policy` SPEC | Fires when… | | - | - | | `period_ms=N` | Every N milliseconds (N > 0). | | `sync_window_ms=N` | All trigger inputs have a message within an N-ms window. | | `external` | The node fires itself off a non-Cerulion signal (a device fd or a blocking SDK call). The scaffold compiles, but `graph run` refuses its placeholder source; replace it with a device `Fd` or a `Blocking` source first. | | `data_trigger=NAME` | The named trigger input receives data. | ![Conceptual close-up of a robot joint sensor and its signal indicator.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/trigger-timing.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=5723514af64ed11bf03db55b92c14c72) How the policy defaults when you omit `--policy` depends on the node's inputs: * **0 inputs (no `-i`, no `-T`):** a source-only node **must** declare a non-data policy. `cerulion node create` errors otherwise. * **1+ inputs via `-i` only:** no trigger policy is written and the node does not build until it has one. Pass `-T` instead of `-i` for the input that should fire the node, or set `--policy`. * **`-T` set:** the policy becomes `data_trigger` for that trigger input. > [!WARNING] > > A source-only node (zero inputs) has nothing to fire it, so you must give it an > explicit non-data policy with `--policy period_ms=N` or `--policy external`. > Combining a non-data `--policy` with `-T` is a conflict and errors. **1. Create a periodic source node** A camera with no inputs needs a period: ```bash theme={null} cerulion node create camera -o sensor_msgs/Image image --policy period_ms=33 ``` ```text theme={null} Created node type 'camera' ``` **2. Create a data-triggered consumer** A detector that fires whenever an image arrives: ```bash theme={null} cerulion node create detector -T sensor_msgs/Image image -o geometry_msgs/PoseStamped detection ``` ```text theme={null} Created node type 'detector' ``` ## Write the tick() Open `nodes//src/lib.rs`. The template pairs two macros: * `#[cerulion_node(...)]` on the struct declares the node and its trigger policy, and generates the glue that lets `cerulion graph run` load it. * `#[cerulion_node_impl]` on the adjacent `impl` block lets `tick()` use plain field access for ports — reads and writes go directly to shared memory, zero-copy. It takes no arguments, and the struct must appear before the impl block. Import everything from the prelude, and import the message types you use: ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::geometry_msgs::Vector3; use native_ros2_messages::sensor_msgs::LaserScan; #[cerulion_node(period_ms = 10)] // period-driven; reads the latest scan each tick #[derive(Default)] struct SafetyController { #[input(depth = 1)] // regular input (use `trigger` for data-triggered) scan: LaserScan, #[output] // Vector3 = fixed-only schema (pub x/y/z: f64) linear_velocity: Vector3, } #[cerulion_node_impl] impl SafetyController { fn tick(&mut self) -> Result<(), NodeError> { // Variable field read via typed accessor: let obstacle_close = self.scan.ranges().iter().any(|&r| r < 0.5); // Fixed field write; goes straight to shared memory: self.linear_velocity.x = if obstacle_close { 0.0 } else { 0.3 }; Ok(()) } } ``` ### Fixed vs variable fields How you write an output field depends on whether it is fixed-size or variable-length: * **Fixed primitive fields** (for example `x`, `y`, `z`, `height`, `width`) are written directly: `self.linear_velocity.x = 0.3;`. The write goes straight to shared memory. * **Variable-length fields** (`string`, `T[]`) are also written with plain assignment, but they are *read* through an accessor — `self.scan.ranges()` — because their length is only known at runtime. `#[output]` is the only form you need, for every schema: ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::sensor_msgs::Image; #[cerulion_node(period_ms = 33)] #[derive(Default)] struct Camera { #[output] image: Image, } #[cerulion_node_impl] impl Camera { fn tick(&mut self) -> Result<(), NodeError> { self.image.step = 6; // fixed fields, direct writes self.image.height = 1; self.image.width = 2; self.image.data = &[255_u8, 0, 0, 0, 255, 0]; // variable field: a 2x1 rgb8 image self.image.encoding = "rgb8"; // variable field, plain assignment self.image.header.frame_id = "camera"; // nested field, same Ok(()) } } ``` > [!WARNING] > > Write every variable-length field of an output you touch. `sensor_msgs/Image` has three: `encoding`, `header.frame_id` and `data`. A tick that writes some of them and leaves one unwritten publishes nothing for that output: the frame is discarded with a logged error, `OutputProxy dropped without writing all declared variable fields; skipping publish`. > [!TIP] > > Only the outputs you actually touch during a tick are published, so a node can > hold a channel silent by leaving it alone. A tick that returns `Err` publishes > nothing at all. > [!TIP] > > **Zero-copy write for large payloads:** plain `=` assignment copies your buffer once. For > camera drivers or codecs that can write directly into a destination buffer, use `fill_from` > instead — your producer receives the destination buffer itself, skipping the copy: > > ```rust theme={null} > self.image.data.fill_from(|buf: &mut [u8]| { > let n = driver.read_frame_into(buf)?; > Ok(n) > })?; > ``` > > `FillFrom` and `SliceSource` are re-exported from `cerulion_core::prelude`. See the > [node macro reference](/cerulion/reference/node-macro#fill_from-zero-copy-producer-writes) for details. ## Build the node `cerulion node build ` compiles the crate into a cdylib. Add `--release` for an optimized build. The first build in a workspace also compiles the Cerulion runtime and its dependencies, so it takes minutes; later builds take seconds. The command says so before cargo starts, and prints nothing more until the build finishes. > [!WARNING] > > `node build` runs `cargo` from your `PATH`, or from > `${CARGO_HOME:-$HOME/.cargo}/bin` when it is not on your `PATH`, and says how > to add it. A missing toolchain is reported as such and names what to install: > Rust 1.95 or newer from [rustup](https://rustup.rs), plus a C linker: > `build-essential` on Ubuntu and Debian, the Xcode Command Line Tools on macOS. ```bash theme={null} cerulion node build camera cerulion node build detector ``` ```text theme={null} Building 'camera'. The first build of a workspace also compiles the Cerulion runtime and can take a few minutes; nothing more is printed until the build finishes. Built 'camera' Building 'detector'. The first build of a workspace also compiles the Cerulion runtime and can take a few minutes; nothing more is printed until the build finishes. Built 'detector' ``` > [!TIP] > > A successful build ends with `Built ''`. On failure the CLI prints > `Error:` with the cargo output, and no cdylib is produced. ## Inspect and adjust Use these commands to review and edit node types after creation. > [accordion] List node types > > `cerulion node list` prints a table of types with input/output counts and a short policy label. > > ```bash theme={null} > cerulion node list > ``` > > In the [quickstart](/cerulion/quickstart) workspace: > > ```text theme={null} > TYPE INPUTS OUTPUTS POLICY > detector 1 1 trigger:image > sensor 0 1 period 33ms > ``` > [accordion] Show one node's details > > `cerulion node info ` prints the type, policy, and each port with its schema. Metadata is parsed from `src/lib.rs`; there is no sidecar file. > > ```bash theme={null} > cerulion node info detector > ``` > > ```text theme={null} > Node type: detector > Policy: trigger:image > Inputs: > image (sensor_msgs/Image) > Outputs: > detection (geometry_msgs/PoseStamped) > Params: none > ``` > > `Params:` lists the node's `#[param]` settings. A node with no inputs omits the `Inputs:` heading. > [accordion] Add ports later > > `cerulion node modify ` mutates `src/lib.rs` in place, preserving the tick body and comments. It takes the same `-i`, `-T`, `-o`, and `--policy` flags (at most one of each per call). > > ```bash theme={null} > cerulion node modify detector -i sensor_msgs/Imu imu > ``` > > ```text theme={null} > Added input 'imu' to 'detector' > ``` > > Adding a trigger input with `-T` also sets the `data_trigger` policy. To make a node externally triggered, use `--policy external`. > [accordion] Delete a node type > > `cerulion node delete ` removes the node crate and its workspace member entry. > > ```bash theme={null} > cerulion node delete detector > ``` > > ```text theme={null} > Deleted node type 'detector' > ``` ## Next steps > [card] [Wire and run a graph](/cerulion/guides/wire-and-run-a-graph) > > Stage these node types into a graph and run it. > [card] [Trigger policies](/cerulion/reference/trigger-policies) > > The full `--policy` grammar and defaulting matrix. > [card] [Backpressure and deadlines](/cerulion/guides/backpressure-and-deadlines) > > Queue policies, rate caps, and reacting to late data in code. # Inspect topics Source: https://docs.cerulion.com/cerulion/guides/inspect-topics Discover and watch live local and remote topics, measure rates, and open the TUI. ![Conceptual humanoid vision sensor observing a test object in a robotics lab.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/topic-inspection.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=4b2321362f54b10cf6660098f79da208) When a robot misbehaves, the first question is what it is actually publishing. These commands answer it from any terminal, for this machine or for a robot on your network. While a graph runs, every wired port becomes a topic you can observe. This guide covers listing and watching live topics — local or on a robot across the network — and the interactive dashboard. > [!NOTE] > > The `topic` commands use iceoryx2 service discovery, so they work from any > directory, no workspace required. Run them in a second terminal while a graph > is running. ## List and inspect live topics `cerulion topic list` prints this machine's shared-memory topics first, then the robots on your account and their topics, on one LAN or across networks. ```bash theme={null} cerulion topic list ``` ```text theme={null} TOPIC /perception/camera/image /perception/detector/detection ``` If nothing is publishing, it prints `No active local topics.` | Flag | Use it for | | - | - | | `-t` | Printing each topic's message type after its name, as `ros2 topic list -t` does. | | `--all` | Including the framework's own internal topics, which are hidden by default. | | `--local` | Scripts, CI, and offline work: skips the remote query. | | `--connect` / `--listen` | Reaching a robot that discovery cannot see. Repeatable. | | `--scan` | Sweeping the local `/24` as a last resort. Opt-in only. | `cerulion topic info ` prints one topic's schema and its last sequence number and timestamp: ```bash theme={null} cerulion topic info /perception/camera/image ``` > [!TIP] > > `topic info`, `echo`, and `hz` each accept a **remote** robot's topic too: a name that is not local is found on a robot on your account, demanded for the life of the command, and released when it exits. `--local` or `CERULION_NETWORK=off` keeps them local-only. ## Watch messages with echo `cerulion topic echo ` subscribes and prints each message until you press Ctrl+C. ```bash theme={null} cerulion topic echo /perception/camera/image ``` Echo prints one YAML document per message: a `# seq=.. ts=..ns schema=0x.. size=..` comment, a `# ` comment, the fields, then `---`. An array longer than `--truncate-length` (default 128) ends in `!truncated `, the number of elements left out. Every type prints its fields this way, `sensor_msgs/Image` included. A frame no known schema names prints `#` comment lines that say why, with a hex preview of its first 64 payload bytes. ## Measure publish rate `cerulion topic hz ` measures how often a topic publishes, until Ctrl+C. ```bash theme={null} cerulion topic hz /perception/camera/image ``` > [!TIP] > > For the periodic camera created with `--policy period_ms=33`, `topic hz` > should report roughly 30 Hz. ## Find topics by type, and measure bandwidth `cerulion topic type ` prints a topic's message type, and `cerulion topic find ` lists every topic that carries one: ```bash theme={null} cerulion topic type /perception/camera/image cerulion topic find sensor_msgs/Image ``` `cerulion topic bw ` measures how many bytes a topic carries per second, over its newest 100 messages by default (`--window N` changes that): ```bash theme={null} cerulion topic bw /perception/camera/image ``` ## Publish a test message `cerulion topic pub ` publishes one message given as JSON or YAML. `--times N` and `--rate HZ` publish several: ```bash theme={null} cerulion topic pub /demo/status std_msgs/String '{"data": "ready"}' ``` > [!WARNING] > > A message you publish reaches every subscriber of that topic, a robot's controller included. Publish on a topic nothing acts on, such as a status topic of your own, and never into a topic a running graph already publishes: topics are single-writer. ## Save a camera frame `cerulion topic snapshot -o ` saves the newest frame of a `sensor_msgs/Image` or `sensor_msgs/CompressedImage` topic as a JPEG: ```bash theme={null} cerulion topic snapshot /perception/camera/image -o camera.jpg ``` ## Open the interactive dashboard `cerulion tui` launches an interactive terminal dashboard. Logging is suppressed while the TUI is open. ```bash theme={null} cerulion tui ``` ## Keep a record instead of watching `echo` and `hz` answer questions about now. To keep the data, record the run to an MCAP bag and inspect it afterwards; see [Record and replay a run](/cerulion/guides/record-and-replay). ## Clean up stale services iceoryx2 keeps on-disk bookkeeping for each node. When a graph's topology changes between runs, stale entries from dead nodes can cause discovery errors. `cerulion clean` removes the bookkeeping dead Cerulion processes left behind; live nodes are left alone. It needs no account and reaches no network. It prints cleanup counts and per-cause remediation, and names every node it could not reclaim together with the reason. A graph that stops normally already runs a short cleanup pass of its own as it exits, so reach for this command mainly after a run that was killed, or when you want everything cleared at once. `cerulion clean --report-only` deletes nothing: it lists what a plain `cerulion clean` would remove and ends with `Report only: nothing was removed.` ```bash theme={null} cerulion clean ``` > [!WARNING] > > Run `cerulion clean` if you rewire a graph and then see stale-service errors on > the next `graph run`. It will not disturb a graph that is currently running. ## Next steps > [card] [Wire and run a graph](/cerulion/guides/wire-and-run-a-graph) > > Produce the topics you inspect here. > [card] [Messages and schemas](/cerulion/guides/messages-and-schemas) > > Understand the message shapes that echo prints. > [card] [Reach remote robots](/cerulion/guides/network-and-remote-robots) > > Discovery, same-account access, and pulling a robot's topics to your desk. # Messages and schemas Source: https://docs.cerulion.com/cerulion/guides/messages-and-schemas Use built-in ROS 2 message types in a node, and define a custom workspace schema. Every port is typed, so by default a mismatch between two nodes is caught before the graph runs, not on the robot. Every node port carries a typed message. This guide shows how to use the built-in ROS 2 message types, how fixed and variable fields differ when you write them, and how to define your own workspace schema. For the full type list and reference details, see the [message types reference](/cerulion/reference/message-types) and [graph and schema files reference](/cerulion/reference/graph-and-schema-files). ## Use a ROS 2 message type Cerulion ships `native_ros2_messages` — 254 message types across 22 ROS 2 packages, generated from the upstream `.msg` files. Import the type you need from its package module: ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::sensor_msgs::Image; ``` Reference a type as a port by giving it a field on the node struct: ```rust theme={null} #[cerulion_node(period_ms = 33)] #[derive(Default)] struct Camera { #[output] image: Image, } ``` In a graph, schemas are written with a slash (`sensor_msgs/Image`). The colon form `sensor_msgs::Image` is also accepted and normalized to the slash form. > [!TIP] > > Always import package-qualified. A few names exist in more than one package — `Pose2D` is in both `geometry_msgs` and `vision_msgs` — so a bare name is ambiguous. `cerulion schema list` prints every package and its types. ## Fixed vs variable fields How you write a message field depends on its size: * **Fixed primitive fields** (numbers, bytes, for example `height`, `width`, `is_bigendian`) live in a fixed section and are written directly. The macro derefs to that section and writes straight to shared memory. * **Variable-length fields** (`string`, `T[]`) have no fixed size, so the macro routes a write through a generated setter and a read through a generated accessor. For `sensor_msgs/Image`, `height`, `width` and `step` are fixed, while `encoding` (a `string`), `header.frame_id` (a `string`) and `data` (a `uint8[]`) are variable: ```rust theme={null} #[cerulion_node_impl] impl Camera { fn tick(&mut self) -> Result<(), NodeError> { self.image.height = 1; // fixed fields, direct shared-memory writes self.image.width = 2; self.image.step = 6; self.image.data = &[255_u8, 0, 0, 0, 255, 0]; // variable field: a 2x1 rgb8 image self.image.encoding = "rgb8"; // variable field, plain assignment self.image.header.frame_id = "camera"; // nested field, same Ok(()) } } ``` Write every variable-length field you declare: an output with one left unwritten is discarded with an error, and nothing is published for it that tick. On the reading side, a fixed field is read directly and a variable field through its accessor: ```rust theme={null} let pixels = self.image.height * self.image.width; let first_byte = self.image.data().first().copied().unwrap_or(0); ``` The ROS 2 primitive types map to Rust as follows (a representative subset): | ROS 2 type | Rust type | | - | - | | `bool` | `bool` | | `uint8` / `byte` | `u8` | | `int32` | `i32` | | `uint32` | `u32` | | `float64` | `f64` | | `string` | `&str` on write, an accessor on read | | `T[]` | `&[T]` on write, an accessor on read | ## Define a custom schema When no built-in type fits, define a workspace schema. **1. Create the schema file** `cerulion schema create ` writes `schemas/.yaml` — the name verbatim, no case change — holding a skeleton whose single entry key is the PascalCased name. ```bash theme={null} cerulion schema create Reading ``` ```text theme={null} Created schema 'Reading' ``` The generated `schemas/Reading.yaml`: ```yaml theme={null} schemas: Reading: description: "" fields: # Add fields: type name ``` **2. Add fields** Edit `schemas/Reading.yaml`. `fields:` is a mapping whose **key** is `" "`, so quote each key and leave its value empty. A `T[]` suffix marks a variable-length array; `T[N]` is a fixed-size one. ```yaml theme={null} schemas: Reading: description: "A single sensor reading" fields: "f64 value": "u64 timestamp": "string source": ``` **3. Inspect it** `cerulion schema info ` reports the name, description, field count, and a hash. ```bash theme={null} cerulion schema info Reading ``` ```text theme={null} schema: Reading source: workspace (schemas/Reading.yaml) description: A single sensor reading wire fixed size: 16 bytes hash: 0x9c2df58fc20cab78 fields: 3 value: float64 (fixed) timestamp: uint64 (fixed) source: string (variable) ``` **4. Create a node that publishes it** A bare schema name on a port resolves to your workspace schema first: ```bash theme={null} cerulion node create thermometer -o Reading reading --policy period_ms=100 ``` ```text theme={null} Created node type 'thermometer' ``` The scaffold imports the generated type as `native_ros2_messages::Reading`. Give `nodes/thermometer/src/lib.rs` a tick that writes all three fields: ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::Reading; #[cerulion_node(period_ms = 100)] #[derive(Default)] pub struct ThermometerNode { #[output] reading: Reading, tick_count: u32, } #[cerulion_node_impl] impl ThermometerNode { fn tick(&mut self) -> Result<(), NodeError> { self.tick_count += 1; self.reading.value = 20.0 + f64::from(self.tick_count % 50) * 0.1; self.reading.timestamp = self.now_ns(); self.reading.source = "thermometer"; Ok(()) } } ``` **5. Build, run and watch it** ```bash theme={null} cerulion node build thermometer cerulion graph create weather -n weather cerulion node stage thermometer -g weather cerulion graph run weather ``` In a second terminal: ```bash theme={null} cerulion topic echo /weather/thermometer/reading ``` Each document names the schema and prints its three fields: ```text theme={null} # seq=81 ts=1542961870798833ns schema=0x9c2df58fc20cab78 size=75 # Reading value: 23.2 timestamp: 1542961870798833 source: "thermometer" --- ``` The `schema=` value is the hash `schema info` printed. A build after you change a file under `schemas/` regenerates the message types, so it takes a little longer than a plain rebuild. > [!NOTE] > > `schema info` resolves four sources in order — your workspace's `schemas/*.yaml`, > your workspace's `.msg` store, the built-in ROS 2 types, and a connected robot's > own types — and the `source:` line names which one answered. `cerulion schema > list` prints all of them, marking a built-in that a store entry overrides. ## The `.msg` store A workspace can also carry ROS message definitions verbatim, as `.msg` files under `schemas//msg/.msg`. `cerulion ros2 attach` writes the types it discovered there, so a robot's own message definitions land in your workspace without being hand-translated to YAML. Store types are first-class everywhere: node ports, `graph validate`, recording, replay, and `schema info`. They sit between your workspace YAML and the built-ins, so a YAML schema of the same name wins and a built-in of the same name is outranked. A store type can type a node port. `schemas//msg/.msg` is generated as the Rust type `native_ros2_messages::::`, and `cerulion node create` and `node modify` write that import for you. The setting that generates workspace types is `CERULION_WORKSPACE_MSGS` under `[env]` in the workspace's `.cargo/config.toml`, which `cerulion workspace create` writes. In a workspace without it, `node create` refuses a store type and names the line to add. Rebuild the node after you add or change a `.msg` file. > [!WARNING] > > Declaring the same name twice is refused outright rather than resolved by > precedence: two `schemas/*.yaml` files declaring one entry name, a > `.yaml` beside another file's `` entry, or a YAML definition the > `.msg` store also spells. The error names every source. Declare each name once. Delete a schema you no longer need: ```bash theme={null} cerulion schema delete Reading ``` ```text theme={null} Deleted schema 'Reading' ``` ## Next steps > [card] [Define a node](/cerulion/guides/define-a-node) > > Put these message types to work on node ports. > [card] [Message types](/cerulion/reference/message-types) > > Every available package and type. # Network a graph and reach remote robots Source: https://docs.cerulion.com/cerulion/guides/network-and-remote-robots How cross-machine visibility works by default, how to restrict it with the network block, and how to find a robot and read its topics from your desk. Your robot is on the floor and you are at your desk. This guide gets the robot's topics onto your machine and shows how to limit what leaves the robot. A live Cerulion run is **network-viewable by default** to every computer signed in to your account, on one LAN or across networks, with no addresses or flags to set. A machine that is not signed in to your account cannot read its topics or publish into it, unless you open the LAN on purpose with `CERULION_LAN_ACCESS=open`. You restrict what crosses with a `network:` block, or turn networking off for a run. Local transport is unaffected by any of this: nodes on the same machine always talk through zero-copy shared memory. ## What a run resolves to Evaluated in this order: | Condition | Result | | - | - | | `--network off` or `CERULION_NETWORK=off` | Local-only. Nothing crosses the machine boundary, with a loud notice. | | `--time-source virtual` or `external` | Network inert: a live network session would break replay byte-identity. | | A `network:` block | Strict: exactly the declared allow-lists and locators. | | No block (including under `--record`) | Permissive: every produced topic is network-viewable. | Recording keeps the network on, so a robot stays viewable while it records. ```bash theme={null} # Local-only for this run: cerulion graph run perception --network off ``` ## Restrict what leaves the machine The `network:` block is a **tightening**, not an on-switch. Declaring one puts the run in strict mode. ```yaml theme={null} network: mode: peer listen: - tcp/0.0.0.0:7683 egress: - /robot1/lidar/cloud ingress: - /operator/cmd_vel ``` | Field | Meaning | | - | - | | `mode` | `peer` joins the mesh, `client` connects to a router without routing traffic, `disabled` leaves the block parsed but inert. Omitted means `disabled`, so set it explicitly. | | `listen` / `connect` | Locators, used **verbatim**. A declared block does no scouting, so one side must `listen` and the other must `connect`. | | `egress` | A true allow-list: only these topics ever leave. Each must be produced by a node in this graph, unless the entry is `{topic: /chatter, external: true}`: a topic a process outside the graph publishes on this machine, such as a ROS 2 program on `rmw_cerulion`. | | `ingress` | Topics imported from the network. Each must have no in-graph producer and must be consumed by one, and every frame is schema-checked before injection. | Validation refuses each mistake by name: a topic in both lists, an `egress` topic nobody produces (unless marked `external: true`), `external: true` on a topic this graph produces, an `ingress` topic this graph already produces, a relative topic name, or a non-empty list under `mode: disabled`. Empty lists under `peer` are valid: that is an export-restricted robot. > [!NOTE] > > `--record` together with a block that declares `ingress:` is refused, because recorded ingress re-injection is not yet replay-faithful. Record without the ingress bridge, or run without `--record`. The full key reference is in [Graph and schema files](/cerulion/reference/graph-and-schema-files). ## Find robots on the network `cerulion topic list` prints local topics instantly, then discovers the robots on your account and their topics, on one LAN or across networks. ```bash theme={null} cerulion topic list ``` The local `TOPIC` section prints first and instantly, so a slow network never delays it. A `ROBOTS` section then lists each robot found, its visible-topic count, and its locator, followed by `REMOTE TOPICS`, every topic a networked robot is advertising or asking for: ```text theme={null} REMOTE TOPICS /go2/utlidar/cloud ``` With nothing discovered, the listing ends with one `remote: none discovered in ms` line that names the next step. | Flag | Use it for | | - | - | | `--local` (also spelled `--no-network`) | Scripts, CI, and offline work: skips the remote query entirely. | | `--connect tcp/HOST:7683` | A robot that discovery cannot see. Repeatable; `--listen` mirrors it. | | `--scan` | Sweeping the local `/24` for an open LAN robot that mDNS does not reveal. Opt-in only: a horizontal sweep reads as port-scan recon to corporate network monitoring. | The remote half is best-effort and bounded to a few seconds. A discovery failure is a loud note and still exits 0, since the local list already printed. > [!TIP] > > A robot on your account needs no listen endpoint, address or `--connect` to be found. For an intentionally open LAN, where the machines are not on one account, set `CERULION_LAN_ACCESS=open` for every Cerulion command and daemon on every machine that should send or receive topics over that LAN, restart `cerulion-netd` on each, and give the serving machine a listen endpoint: `CERULION_NETD_LISTEN=tcp/0.0.0.0:7683` in its service environment. Its LAN plane then binds the port and advertises it over mDNS. That plane is **standing**: the daemon stays up, so the robot stays findable and advertises the topics registered on it at runtime, including the ones a ROS 2 process publishes, even when no graph is running, and the daemon stops only on `SIGINT`/`SIGTERM`. Zenoh multicast scouting is off by default; `CERULION_MULTICAST_SCOUTING=on` on both machines also finds a listening peer on a network where mDNS does not cross but multicast does. ## Pull a robot's topics to your desk Sign the robot and your desk in to the same Cerulion account, and the robot's topics read like local ones. **1. Sign in to the same account** Run this on your desk and on the robot, with the same account: ```bash theme={null} cerulion login ``` `login` creates the machine's key. The robot adds your desk to its access list the first time your desk's network daemon reads one of the robot's topics. **2. Read a topic** ```bash theme={null} cerulion topic hz /go2/utlidar/cloud cerulion topic echo /go2/utlidar/cloud ``` `topic echo`, `topic hz`, and `topic info` read a topic from a robot on your account with no extra command: each demands the topic when it starts and releases it when it exits. When the same topic exists on several robots, or on this machine and on a robot, they exit `2`, name the candidates, and ask for `--robot NAME`. ### Mirror topics with connect `cerulion connect` demands topics from a robot and re-injects them into your machine's shared memory, so every local tool sees them as ordinary topics until you stop it with `Ctrl+C`. > [!NOTE] > > `connect` needs the `cerulion-connectd` sibling binary. The install script > places it beside `cerulion` for you; a `cargo install` does not, because it > is not published to crates.io. See [Installation](/cerulion/installation) if > `connect` cannot find it. `connect` takes the robot's 64-character hex endpoint id, as `ROBOT` or with `--eid`, or a name you pin for it in `~/.cerulion/robots.toml`: ```toml theme={null} [robots] lab-go2 = "<64-hex-eid>" ``` The robot admits `connect` once your desk is on its access list, as above. **1. See the catalog** ```bash theme={null} cerulion connect lab-go2 ``` With no `--topic` and no `--all`, `connect` prints the robot's catalog and demands nothing. **2. Demand the topics you want** ```bash theme={null} cerulion connect lab-go2 --topic /go2/utlidar/cloud ``` Then, in another shell, the topic behaves like a local one: ```bash theme={null} cerulion topic hz /go2/utlidar/cloud cerulion topic echo /go2/utlidar/cloud ``` `--all` demands the whole catalog. Demand only what you need: every demanded topic is real traffic over the link. To read one of a robot's topics without running `connect`, run `cerulion topic echo` or `cerulion topic hz` on its name from your desk; each demands the topic only while it runs. ## Manage the machines on your account ```bash theme={null} cerulion login # device-code sign-in for this machine cerulion account devices list # every machine registered to your account cerulion account devices revoke ``` `login` prints a short code and a verification URL and waits while you authorize it in a browser, on the page at [app.cerulion.com](https://app.cerulion.com) where you enter the code. At a terminal, any command that needs an identity runs `login` for you; anywhere else it exits with code `7`. Robot access management itself lives on the web account page, not the CLI; `account devices` is for your own desks. ## Next steps > [card] [Bridge a ROS 2 system](/cerulion/guides/bridge-ros2) > > Attach to an existing DDS graph. # Use Cerulion from Python Source: https://docs.cerulion.com/cerulion/guides/python Build the Python client from source, read and publish Cerulion topics on one machine, and write a node in Python. When the rest of your robot code is Python, you still want its data. The `cerulion` Python package reads and publishes the same shared-memory topics a graph uses, raw or typed with the ROS 2 message classes, and a node can be written in Python too. > [!NOTE] > > The Python client is built from a Cerulion source checkout: the release archives carry no wheel. It needs Python 3.11 or later, and it reaches topics on the local machine only; it opens no network connection. ## Build and install the client From a checkout of [the Cerulion repository](https://github.com/cerulion-inc/cerulion), in a virtual environment with Python 3.11 or later: ```bash theme={null} pip install maturin maturin build --release -m crates/cerulion_py/Cargo.toml -o wheels pip install wheels/cerulion-*.whl ``` The wheel is tagged for CPython 3.11 and later, so `pip` refuses it on an older interpreter. ## Read a topic the CLI publishes Message classes live in `cerulion.msgs`, one module per ROS 2 package: `cerulion.msgs.geometry_msgs.Vector3` is the type a Rust node names as `native_ros2_messages::geometry_msgs::Vector3`. Pass the class to a subscriber, and each received frame views as an instance of it. Save this as `sub_vector3.py` and start it: ```python theme={null} import cerulion from cerulion.msgs.geometry_msgs import Vector3 session = cerulion.connect() vec_sub = session.subscriber("/docs_demo/vector3", schema=Vector3, depth=4) print("subscribed; waiting for frames", flush=True) frame = vec_sub.receive(30000) if frame is None: print("no Vector3 frame within 30 s") else: msg = frame.view() print(type(msg).__name__, isinstance(msg, Vector3), msg.x, msg.y, msg.z) print(msg.copy(), frame.sequence, hex(frame.schema_hash), hex(Vector3.__cerulion_schema_hash__)) frame.release() ``` ```bash theme={null} python -u sub_vector3.py ``` In a second terminal, publish one message: ```bash theme={null} cerulion topic pub --local /docs_demo/vector3 geometry_msgs/Vector3 '{"x": 1.0, "y": 2.5, "z": -3.0}' ``` The script prints: ```text theme={null} subscribed; waiting for frames Vector3 True 1.0 2.5 -3.0 {'x': 1.0, 'y': 2.5, 'z': -3.0} 1 0xd43ee5592039b9df 0xd43ee5592039b9df ``` `frame.view()` is a read-only, zero-copy view of the shared-memory slot, and `msg.copy()` makes an owned copy. Release each frame promptly, and drop its views first: a subscriber can hold only a few frames at once (`sub.max_borrowed_samples`, 2 by default). > [!TIP] > > A script binds `cerulion.msgs` to the workspace that contains the current directory, or to `$CERULION_WORKSPACE` when it is set, so your workspace's own message types are classes too. Outside a workspace it sees the built-in messages alone. ## Publish typed messages A schema you define yourself works the same way. This script publishes a `Point` twice, once from a dict and once by writing a zero-copy loan in place, and reads each back: ```python theme={null} import cerulion session = cerulion.connect() schemas = cerulion.SchemaSet() schemas.add_yaml(""" schemas: Point: fields: float64 x: {} float64 y: {} """) Point = schemas.message_type("Point") point_pub = session.publisher("/cerulion_py/docs/typed", schema=Point) point_sub = session.subscriber("/cerulion_py/docs/typed", schema=Point) point_pub.publish({"x": 1.5, "y": -2.0}) point_frame = point_sub.receive(1000) point = point_frame.view() print(point.copy(), isinstance(point, Point)) point_frame.release() with point_pub.loan() as point: point.x = 2.5 point.y = -4.0 point_frame = point_sub.receive(1000) point = point_frame.view() print(point.x, point.copy()) point_frame.release() ``` ```text theme={null} {'x': 1.5, 'y': -2.0} True 2.5 {'x': 2.5, 'y': -4.0} ``` `publish()` of a dict that has missing, extra or ill-typed fields raises `cerulion.EncodeError`. Every client error derives from `cerulion.CerulionError`. > [!WARNING] > > One transport serves the whole process: `cerulion.connect()` returns the same session every time. A Python process that loads this client must not also load another module that embeds the Cerulion runtime. ## Read a recording `cerulion.open_bag(path)` reads a finalized MCAP bag. `topics()` lists its channels, and `messages(topics=None)` yields `(topic, record)` pairs whose bytes are owned copies; view a record with `record.view(Vector3)`, or `record.view("pkg/Name", schemas=s)` for a schema of your own. ## Write a node in Python A Python node is a node type like any other: `cerulion node build` compiles a small library that embeds CPython, and the node's logic lives in `nodes//node.py`. ```bash theme={null} cerulion node create counter --lang python -i std_msgs/Int32 inp -o std_msgs/Int32 out --policy period_ms=10 cerulion node build counter ``` ```python theme={null} import cerulion from cerulion.msgs.std_msgs import Int32 @cerulion.node(period_ms=10) class Counter: inp = cerulion.input(Int32, depth=1) out = cerulion.output(Int32) def tick(self): msg = self.inp if msg is None: return self.out.data = msg.data ``` What to know before you write one: * **It needs a source checkout.** `node create --lang python` refuses outside one, because the embedding crate is not published to a registry. * **Exactly one scheduling policy.** Give `period_ms`, one input marked `trigger=True`, or `sync_window_ms` for several trigger inputs, so `node create --lang python` needs `-T` or `--policy`. A Python node takes `-i` and `-o` repeatedly. * **Edit `node.py`, not the scaffold.** `node modify` refuses Python nodes: change `node.py` and run `cerulion node build` again. * **The interpreter is found at build time**, in this order: `$CERULION_PYTHON`, `/.venv/bin/python`, then `python3` on `PATH`. Install the client into that interpreter. * **One interpreter per process.** Python execution is serialized through the GIL; threads your node creates and `fork()` are not supported. It suits control and integration nodes, not kHz loops: every tick crosses into the interpreter. * **No state capture, and no `Fatal` stop.** A Python node starts from `init` on every run, and its errors carry no kind, so it cannot stop itself with `NodeError::Fatal`. ## Next steps > [card] [Inspect topics](/cerulion/guides/inspect-topics) > > Find the topics to read, and their types, from the CLI. > [card] [Messages and schemas](/cerulion/guides/messages-and-schemas) > > The built-in message types and how to define your own. # Record and replay a run Source: https://docs.cerulion.com/cerulion/guides/record-and-replay Record a run to an MCAP bag, inspect it, play it back as a robot substitute, and re-execute your nodes against it. When a robot misbehaves once, you want to test your fix against what it actually saw. Record the run, then re-execute your changed nodes against the recording and see which outputs changed. Cerulion recordings are standard [MCAP](https://mcap.dev) files. One recording is one `.mcap` file, uncompressed, carrying every frame exactly as it was published — wire sequence and timestamp included. There are three ways to get one, and they answer different questions: | Command | Use it when | | - | - | | `cerulion graph run --record` | You are about to run the graph and want a **replay-grade** bag you can re-execute later. | | `cerulion bag record` | Something is already running (yours or not) and you want its topics on disk. | | `cerulion flashback` | Something already went wrong and nobody was recording. | ## Record a run Add `--record` to the run. The bare flag writes into `./recordings/`; a custom directory needs the `=` form. ```bash theme={null} cerulion graph run perception --record ``` ```text theme={null} recording written to recordings/perception_20261111T191950Z.mcap ``` When the run ends normally it prints the bag's path. Your file name will differ. `cerulion bag info ` shows message counts and what the recording covers. The recording keeps the network on — the robot stays viewable while you record — and finalizes on shutdown, including when the run is stopped with `Ctrl+C`. Recording requires the live clock, so it cannot be combined with `--time-source virtual` or `external`, and it is refused together with `--no-rings`. It is also refused together with `--no-validate`: that flag skips the `schema:` checks, and a bag whose channel labels were never checked cannot be honestly replay-verified — a re-execution can refuse a healthy bag, or replay one under the wrong label. Record with validation on, or drop `--record`. > [!NOTE] > > A recorded run captures the graph, the environment, and the run's own record of what fired when. That is what makes it re-executable later — see [Re-execute your nodes](#re-execute-your-nodes). The recorder also picks up live producers the graph never declared and records them alongside your topics. Those extra channels are not replay-grade — the bag says so when it is created, `cerulion bag info` names anything the recorder could not cover, and a re-execution skips them instead of verifying them. Set `CERULION_RECORD_DISCOVERY=off` to record only the graph's declared topics. By default the environment is captured as names for everything and values only for `CERULION_*`, `RUST_LOG`, and `IOX2_*`, so a bag never leaks a secret you happened to export. Every other value is replaced by its FNV-1a hash, which lets replay detect divergence without carrying the value. `--record-env all` captures every value verbatim for full replay fidelity, and warns loudly that the bag now embeds them. ## Record topics that are already live `cerulion bag record` records topics from this machine's shared memory, including topics already mirrored onto it from a robot. To record the robot itself, run it **on the robot** and copy the file afterwards. ```bash theme={null} cerulion bag record -a -o session.mcap --duration 30 ``` | Selection | Meaning | | - | - | | `TOPIC...` | Exactly these topics. A named topic that is not live here is refused by name. | | `-a` / `--all` | Every live local topic. | | `-e PATTERN` | Every live local topic matching a regex. | | `-x PATTERN` | Narrows any of the above. Repeatable. | Exactly one selection source is allowed — combining a positional list with `-a` or `-e` is an error, because the merge you would assume ("union? intersection?") is not knowable. Narrow with `-x` instead. To describe a **run** rather than a topic set, attach to a live one: ```bash theme={null} cerulion bag record --run=perception ``` The bag then carries that run's effective graph, environment, and recorder manifests, and picks up its scheduler trace from the attach point. A bare `--run` means the sole live run; naming one needs the `=` form, since every word after a bare `--run` is read as a topic. ## Capture the recent past A live run on Linux or macOS already holds a rolling window of roughly the last 30 seconds in memory. `cerulion flashback` writes that window out, plus the following 15 seconds, as an ordinary bag. Nothing has to be armed in advance. Some captures cannot be re-executed with `--resim`. ```bash theme={null} cerulion flashback --note "arm jerked left on the pick" ``` Captures land in `recordings/flashbacks/`. Add `--pin` to keep one out of routine retention, and `--no-wait` to return as soon as the request is accepted instead of waiting for the file. `CERULION_FLASHBACK=off` turns the capture plane off entirely. A capture also carries the recorder's own health, so `cerulion bag info` reports an absorbance verdict for it — scoped to the recorder that took the capture, over its whole run rather than the captured window: ```text theme={null} absorbance: 2 topic(s) carry a verdict — 2 absorb the drain stalls the RECORDER that took this capture, over its whole run (not this capture's window — see drive_span_us) measured (0 of them on an OPTIMISTIC floor rate), 0 fall SHORT of them, 0 met a stall the histogram cannot measure, 0 make no claim, 0 fell short earlier in the run and now absorb, and 0 fell short earlier and can no longer be ranked. ``` ## Inspect a bag ```bash theme={null} cerulion bag info recordings/perception_20261111T191950Z.mcap ``` The report opens with the bag's state and its topics: ```text theme={null} bag: recordings/perception_20261111T191950Z.mcap state: finalized frames: 1212 across 2 topic(s); span 19.965s TOPIC FRAMES MAX BYTES SCHEMA /perception/detector/detection 606 134 geometry_msgs/PoseStamped /perception/sensor/image 606 123 sensor_msgs/Image ``` It goes on to say which topics the recorder tapped and how (`record coverage`), what node state the bag carries for a mid-run resume (`node state`), and the absorbance verdict below. `state: finalized` is the one to read first: playback needs the summary footer that a clean recorder shutdown writes, so a bag from a killed recorder is refused by `bag play` while `bag info` still reports what it can read. ### Read the absorbance verdict A bag that carries a recorder health document — a `graph run --record` recording, or a flashback capture — ends its report with an `absorbance` block: ```text theme={null} absorbance: 2 topic(s) carry a verdict — 2 absorb the drain stalls this recording measured (0 of them on an OPTIMISTIC floor rate), 0 fall SHORT of them, 0 met a stall the histogram cannot measure, 0 make no claim, 0 fell short earlier in the run and now absorb, and 0 fell short earlier and can no longer be ranked. A verdict is the tap's queue depth divided by that topic's rate, against that run's own drain-gap tail; the rate is a WINDOW AVERAGE, so a bursty topic is worse than its figure, and the gaps are DRIVE-LOOP gaps, so a topic whose own drain was skipped (staging_full_passes) saw a longer stall than the one shown. ``` The verdict answers one question per topic: when the recorder pauses for as long as this run's worst drain gap, does that topic's shared-memory queue hold its frames until the recorder drains again? A topic that absorbs them keeps its frames; a topic that falls short can drop frames at its own queue while the recorder is away, and `frames_lost=0` does not contradict that — the loss happens before the recorder ever sees the frame. Every topic is counted in the summary, and only the ones you can act on are printed: a topic that fell short, one that makes no claim, one whose stall the drain-gap histogram cannot rank, one that passed on a floor rate rather than a measured one, and one that fell short earlier in the run. A topic that absorbed every measured stall on an exact rate, with nothing else to flag, is counted and not printed. A printed row names the topic, the depth its recording tap was given, and the rate the verdict used: ```text theme={null} /perception/sensor/image depth 64 (ceiling) @ rate unknown -> absorbance unknown vs no claim (nothing to compare) [no_claim] ``` > [!NOTE] > > The per-topic detail behind the block — each topic's own rate, tail, depth and `loss_counting_basis` — is in the bag's health attachment: `__cerulion/record_health.json` on a recording, and `__cerulion/capture_recorder_health.json` on a flashback capture, which carries the recorder's document rather than one of its own. ## Play a bag back Playback republishes the recorded frames onto shared memory, so everything downstream (`topic echo`, `topic hz`, a consumer node) sees what a live robot would. ```bash theme={null} cerulion bag play session.mcap --loop ``` | Flag | Meaning | | - | - | | `-r` / `--rate N` | Rate multiplier: `2` for twice the recorded pace, `0.5` for half. | | `--loop` | Restart at the beginning until interrupted. | | `--topics TOPIC` | Play only these topics. A name the bag does not carry is a loud error listing what it does. | | `-s` / `--start-offset S` | Skip the first S seconds of bag time. | | `-u` / `--duration D` | Cover only the first D seconds of bag time. | Two behaviors are worth knowing before you interpret a playback: * **A topic that a live producer already owns is refused by name**, and the rest of the bag still plays. Topics are single-writer, so a player must not compete with a live producer. * **Each topic keeps its own recorded rate.** Stamps from different producers share no number line, so playback runs one timeline per topic, anchored on that topic's own first frame. ## Re-execute your nodes `--resim` is the other half of the verb: instead of republishing recorded frames, it re-executes the bagged graph's nodes against the recorded input, on the recording's own clock. ```bash theme={null} cerulion bag play recordings/perception_20261111T191950Z.mcap --resim all --verify ``` ```text theme={null} replay PASS: recordings/perception_20261111T191950Z.mcap (1222 tick(s) replayed, 2/2 topic(s) matched byte-for-byte and were credited) ``` Counts depend on your recording. When an output changed, the command exits 1 and the verdict names the topic: ```text theme={null} FRAME-CONTENT DIVERGENCE: recordings/perception_20261111T191950Z.mcap 1222 tick(s) replayed; 1/2 topic(s) matched and were credited; 1 violation(s): - /perception/detector/detection [byte-mismatch]: frame 0 differs at byte 40 on '/perception/detector/detection' (recorded 134 B, replayed 134 B) Topics passed: 1/2 ``` | | `bag play ` | `bag play --resim all` | | - | - | - | | What runs | The recorded frames are republished | Your current node builds are re-executed | | Output topics | Replayed verbatim | Recomputed | | Pacing | Wall-paced from the recorded timeline | Unpaced — it never reads the wall clock | | Needs the workspace | No | Yes, it loads your node libraries | `--resim all` re-executes every native node; a node subset is not supported yet and is refused by name rather than quietly widened. A [`ros2:` entry](/cerulion/reference/graph-and-schema-files#ros2-entries) in the bagged graph is never respawned — its topics are recorded inputs — and one warning names the entries it skipped, which `--report` also lists under `ros2_entries_skipped`. A bare `--resim` makes **no claim** about whether the result matches the recording — divergence is the product, so a completed re-execution exits 0. `--verify` is the verdict: it byte-compares every produced frame and exits non-zero on divergence. Add `--report PATH` for a machine-readable verdict, `--tolerance PATH` for fields that may legitimately differ, and `--strict-state` to refuse the run unless every node's state was restored. > [!TIP] > > A passing `--verify` is a strong statement: your current code, re-run against real recorded input, produced the same bytes the robot produced. That is the property to put in CI. Two things will make a re-execution refuse or produce nothing, and both are by design: * **Environment divergence is reported, not ignored.** A variable that was present at record time and absent at replay is a warning naming the variable; the run continues. * **A bag from `bag record` is not replay-grade.** A standalone capture carries frames and no scheduler trace at all. A `--run` attach does carry the run's graph, environment and a trace from its attach point, but its channel descriptors are still observability-grade, and `--resim` compatibility is not claimed for it — record with `graph run --record` when you know you will re-execute. A Flashback capture is meant to be re-executed and says so itself: one that lost its own resume boundary reports itself as not resimmable. Use `cerulion bag migrate` to bring an older replay-grade bag forward. ## Next steps > [card] [Investigate a recording](/cerulion/hindsight) > > Find the moment a recorded run went sideways with Hindsight (early access). > [card] [Run a graph across processes](/cerulion/guides/run-multi-process) > > The default deployment shape, and what it means for recordings. # Replay a ROS 2 process Source: https://docs.cerulion.com/cerulion/guides/replay-a-ros2-process Record what one ROS 2 process consumed over rmw_cerulion, replay that process alone against the recording, and read the verdict. A ROS 2 node misbehaved once, in a run you cannot reproduce. Record what each process took in, in the order it took it, then replay that one process by itself, as often as you like, under a debugger or with extra logging, and get a verdict on whether it did the same thing again. This works for ROS 2 processes running on Cerulion's transport (`rmw_cerulion`, see [Bridge a ROS 2 system](/cerulion/guides/bridge-ros2)). The replayed process runs its own unmodified code. It gets every message, service request and response and `/clock` tick it got live, in the same order, and nothing else. The comparison checks each callback's outputs against the recording. > [!NOTE] > > `cerulion ros2 run` and `ros2 launch` need Linux: ROS 2 Jazzy publishes no macOS binaries. Replay is runtime-tested on ROS 2 Humble, with rclpy nodes, rclcpp nodes on ROS time and the stock `demo_nodes_cpp` executables; Foxy, Jazzy and Lyrical builds compile the same code. ## Record Put `--record-deliveries ` right after `run` or `launch`; everything after it goes to `ros2` as usual: ```bash theme={null} cerulion ros2 run --record-deliveries ./logs my_pkg my_node --ros-args -p use_sim_time:=true cerulion ros2 launch --record-deliveries ./logs my_robot bringup.launch.py ``` Each process writes its own delivery log, `./logs/-.rdl.mcap`. An existing file is never overwritten: a second process with the same name and pid writes `-.1.rdl.mcap`. To record a process launched some other way, set the variable instead: ```bash theme={null} CERULION_RMW_DELIVERY_LOG=./logs RMW_IMPLEMENTATION=rmw_cerulion ros2 run my_pkg my_node ``` A delivery log is not a topic recording. `cerulion bag record` records the frames on topics; a delivery log records what one process took from them, in its order. Both can run at once. > [!WARNING] > > Recording costs time on the calling thread: each take copies its payload into the log and each output is hashed. The cost grows with message size, and the log grows by every payload taken. Record processes whose large topics run at a few Hz. ## Replay Replay one recorded process, alone, with the same command it was recorded with: ```bash theme={null} cerulion ros2 run --replay-deliveries ./logs/my_node-4242.rdl.mcap my_pkg my_node --ros-args -p use_sim_time:=true ``` Nothing else needs to run: no talker, no clock, no robot. `ros2 launch` takes no replay flag, because a replay is one process. Setting `CERULION_RMW_REPLAY=` does the same on any launch path. When the replay starts, `.verdict.json` says `running`; the real verdict replaces it once the log is used up. Stop the process with `Ctrl+C` after the file no longer says `running`. A replay that crashes or is killed leaves `running`. > [!WARNING] > > A replay really publishes. The replayed process sends its outputs on the transport as it did live, and through `cerulion-netd` they can reach other hosts. Never replay a controller or a driver where a live robot, or anything that acts on its topics, can receive them: replay on a machine of its own, or on one where no live node runs and `cerulion-netd` is stopped or started with `CERULION_NETD_NETWORK=off`. ## Read the verdict | `verdict` | Meaning | | - | - | | `identical` | Every compared output equals the recording, every recorded window was served and every recorded delivery was taken. | | `diverged` | `culprit` names the first segment whose inputs matched and whose outputs differ: the node, topic and window. | | `input_mismatch` | The replayed process asked for an input in an order the recording does not have. | | `log_exhausted_early` | The log did not close cleanly (the recorded process was killed) and the replay matched up to where it ends. | | `replay_stopped_early` | The process exited before it was served every recorded window. | | `watchdog` | A callback held the replay for 5 s without progress, waiting on another thread the replay cannot run. | | `refused` | The process is not replayable; `refused` says why. | | `running` | The replay has not written its verdict yet, or it crashed or was killed. | A divergence is also printed on stderr when the verdict is written, naming the process, node, topic and window. `/rosout` and the wall-clock stamp in a message header are never compared. ## When a replay is exact A replay reproduces the recorded run when all of these hold for the process: * Every thread that runs callbacks is a single-threaded executor thread. Several single-threaded executors on several threads are fine; a multi-threaded executor is refused by name. * No node logic reads the wall or steady clock. Use ROS time (`use_sim_time`, with `/clock` recorded); a wall timer can diverge, and when it changes an output the verdict names it. * Random numbers are seeded or absent. * No callback blocks on work another thread owns. * No input reaches the node outside the rmw: no sockets, devices, files it reads during the run, or shared memory of its own. * The same binaries, parameters and distro are used. A log recorded by another command line, `ROS_DISTRO` or build of `librmw_cerulion.so` is refused at start, naming the field. What a pass does not prove: an `identical` verdict shows that this recording replays, not that the node is deterministic, and a race that did not fire while recording stays hidden. Each process replays alone against its own log, so processes that feed each other are not replayed together. `EventsExecutor`, rclcpp intra-process communication and loaned takes are not covered; a replay turns loans off. ## Next steps > [card] [Bridge a ROS 2 system](/cerulion/guides/bridge-ros2) > > Run ROS 2 nodes on Cerulion's transport with `cerulion ros2 run`. > [card] [Record and replay a run](/cerulion/guides/record-and-replay) > > Record and re-execute a native Cerulion graph. # Run a graph across processes Source: https://docs.cerulion.com/cerulion/guides/run-multi-process How Cerulion splits a graph into worker processes by default, how to declare or derive process groups, and what happens when a worker dies. A crash in one node should not stop the rest of the graph. On Unix, a live `cerulion graph run` executes your graph as **several OS processes**, one per process group. You get fault isolation for free: a node that crashes takes down its own group, not the whole graph. Each worker steps on its own clock; there is no shared per-step barrier, so two live runs can interleave differently. What makes a run repeatable is its recording, not the live schedule. Set `CERULION_EXECUTION_MODE=lockstep` to make every worker advance behind a shared per-step barrier instead. Multi-process buys isolation, not latency: nodes fused into one process still take the fastest path between each other. ## What happens by default ```bash theme={null} cerulion graph run perception ``` | Situation | What runs | | - | - | | The graph declares `process_groups:` | Exactly those groups, no derivation. `--auto-partition` re-derives over the existing block and runs the new groups in memory; the file changes only with `--yes`. | | No `process_groups:`, Unix, live clock | Cerulion **derives** a partition and runs it multi-process. | | `--single-process` | One process — the opt-out, available anywhere. | | `--time-source virtual`, unpartitioned graph | One process. A graph that declares `process_groups:` still runs the supervisor. | | `--time-source external`, unpartitioned graph | One process. A graph that declares `process_groups:` refuses the run outright. | | Non-Unix host | One process, with a loud notice. | The derived partition is the cost-aware optimum when `graphs/.costs.yaml` exists (written by `cerulion graph profile`), and otherwise a process-per-node baseline — maximum fault isolation. ### Saving a derived partition When a graph declares no `process_groups:`, `graph run` derives a layout, runs it by default, and leaves the file unchanged. A cost profile or a `block` connection can put several nodes in one process. `cerulion graph plan ` shows the layout a run will use: ```bash theme={null} cerulion graph plan perception ``` For the [quickstart](/cerulion/quickstart) graph, which declares no `process_groups:` and has no cost profile, it prints: ```text theme={null} graph perception: 2 process(es), 2 executor unit(s) groups: derived by graph run (no process_groups: in the graph) units: no profile, so each process runs as one unit; a node that declares `isolate: true` runs in a unit of its own, and a node past an isolated node's level joins the earliest unit of the other nodes that starts at its level or feeds it at the level below, or else starts a later unit (a unit runs a contiguous band of levels) process grp_sensor: 1 unit(s) unit grp_sensor: sensor starts at sensor: no profile: every node of this process that does not declare `isolate: true` runs in this unit process grp_detector: 1 unit(s) unit grp_detector: detector starts at detector: no profile: every node of this process that does not declare `isolate: true` runs in this unit ``` A node that declares `isolate: true` in the graph file runs in an executor unit of its own inside its process, and `graph plan` shows it. Add `--yes` to save the layout into the graph file, with a `.bak` backup beside it: | How you ran it | The graph file | The run | | - | - | - | | `--yes` | Written, with a `.bak` backup beside it | Multi-process, derived groups | | Without `--yes`, at a terminal or not | Untouched | Multi-process, derived groups held in memory | `cerulion graph partition ` reviews the layout and saves it interactively. ## Choose the split deliberately Two commands turn the default into a decision you own. **1. Measure the graph** ```bash theme={null} cerulion graph profile perception --duration 20 ``` Runs the graph locally and writes `graphs/perception.costs.yaml` — per-node median tick cost, per-edge fire rates, and a frozen compute budget. A node that never sampled enough fires is reported as such rather than guessed at. Each node's fire target is derived from a warm-up observation of its own rate; `--fires N` overrides that with one uniform target for every node, which is what you want when a node's first fire lands after the warm-up — a period longer than three seconds, say. A profile run is a measurement, not a deployment, so it stays local-only by design. **2. Derive the partition** ```bash theme={null} cerulion graph partition perception --dry-run ``` Prints the derived groups and the YAML diff without writing. Drop `--dry-run` to write (`--yes` skips the confirmation), and pass `--budget-ns N` to override the artifact's frozen per-group budget. **3. See what the runtime sees** ```bash theme={null} cerulion graph levels perception ``` Prints the execution levels derived from the wiring, which nodes sit in each, and — when the graph declares `process_groups:` — which group covers which levels. It exits non-zero on an invalid partition, which makes it a useful CI check next to `graph validate`. ## Writing `process_groups:` by hand ```yaml theme={null} process_groups: acquisition: [camera, rectifier] perception: [detector] logging: [logger] ``` Each group is a name mapped to a list of node ids, and the groups must be a partition of the graph's nodes: every node in exactly one group. The derived partition always co-locates the whole flow of a `block` topic, because crossing a process boundary costs a real hop. A hand-written `process_groups:` block may split one, and the supervisor accepts the split when the edge is **creditable** — exactly one in-graph producer and no non-`block` consumers. It then mints that edge a cross-process credit word, a shared-memory page both ranks map, so the producer's defer crosses the boundary without losing a frame. > [!WARNING] > > Two shapes are still refused, before any worker spawns, each naming the bar it hit: > > * **Two or more in-graph producers** on a `multi_publisher_topics` topic. One credit word counts one producer's outstanding frames, so two writers would each spend the other's credit. Co-locate the flow, or reduce the topic to a single in-graph producer. > * **A mixed topic** — `block` consumers alongside non-`block` siblings. Those `block` consumers are already degraded to `drop_oldest`, so there is no lossless defer left to credit. Move the named siblings into the producer's group, or make them `block` too. > [!TIP] > > `cerulion graph levels` tells you before you run. Its partition verdict names every split `block` edge it found creditable: > > ```text theme={null} > partition: spawner-consumable (1 split `block` edge(s) creditable: /p/n1/out -> n2.inp (front -> back); judged on source metadata — `graph run` re-checks the built cdylibs and refuses on drift) > ``` > > Note the caveat the line carries: `graph levels` judges on source metadata, while `graph run` re-checks the built cdylibs, so a stale `.so` can still turn an accepted split into a refusal. Re-deriving the partition over a hand-written creditable split replaces it, and says so loudly after the write — the `.bak` beside the graph file is the way back. ## When a worker dies The supervisor's default is to keep the robot up: | `--peer-loss` | Behavior | | - | - | | `continue` (default) | The dead group is dropped and the survivors continue — degraded, and loudly. | | `fail` | The whole deployment stops. Use it in CI and replay runs, where a partial run is worse than no run. | Under `continue`, a cross-process `block` edge whose consumer's rank died is called out specifically: the warning names the topic, the consumer input, the dead rank, and the producers now deferred behind a credit nobody will return — loudly once per regime, with a periodic re-announcement while it lasts, and a retraction if one of those producers turns out to have died too. Under `CERULION_EXECUTION_MODE=lockstep`, `CERULION_BARRIER_SPIN_US` tunes how long a worker waits actively at a level boundary before it sleeps; a free run has no barrier, so it has no effect there. `CERULION_CREDIT_WAKE=0` turns off the credit wake plane that lets a credited producer park until the consumer drains; a run is correct either way, and you only lose wake latency. See [Environment variables](/cerulion/reference/environment-variables). ## Recording a multi-process run Every multi-process run keeps the record of what fired when, whether or not you asked it to record, so a Flashback capture of a run you never planned to record carries that record too. Some captures cannot be re-executed with `--resim`. `cerulion graph run --no-rings` declines that bookkeeping on a memory-tight robot; because nothing captured without it could be re-executed, such a run takes **no** captures at all, and `--no-rings` is refused together with `--record`. ## Next steps > [card] [Record and replay a run](/cerulion/guides/record-and-replay) > > Turn a run into an MCAP bag and re-execute it. > [card] [Backpressure and deadlines](/cerulion/guides/backpressure-and-deadlines) > > The `block` policy and the constraint it puts on partitioning. # Wire and run a graph Source: https://docs.cerulion.com/cerulion/guides/wire-and-run-a-graph Create a graph, stage node instances, wire their inputs, validate, and run it. A graph is a `.yaml` file that wires node instances together by their ports. This guide takes you from an empty graph to a running one, and covers the difference between validating and running. The `perception` graph you build below wires a `camera` instance to a `detector` instance: the `detector`'s `image` input reads the `camera`'s `image` output, which you set up with `-I`. ```mermaid theme={null} flowchart LR camera[camera] -- "camera/image" --> detector[detector] detector -- "detector/detection" --> out([detection]) ``` *Figure: The example topology. `-I image camera/image` wires the detector's `image` input to the camera's `image` output.* > [!NOTE] > > Run these commands from inside a workspace. You need built node types first; > see [Define a node](/cerulion/guides/define-a-node). ## Create a graph `cerulion graph create ` writes `graphs/.yaml` with a `prefix:` line and an empty `nodes:` list. Pass `-n`/`--prefix` to set the topic prefix; omit it and the machine's hostname is stamped into the file at create time, so topic names stay the same when the graph moves to another machine and a recording of it still replays. ```bash theme={null} cerulion graph create perception ``` ```text theme={null} Created graph 'perception' ``` > [!NOTE] > > Graph files are YAML with a `.yaml` extension and carry wiring and values > (per-node `params:` and launch `args:`) only. They do **not** contain a > `policy:` block. Trigger policies live on the node macro. ## Stage node instances `cerulion node stage ` appends a node instance to a graph and auto-derives its outputs from the node's source metadata. | Flag | Value names | Meaning | | - | - | - | | `-i` / `--id` | `ID` | Instance ID (defaults to the node type). | | `-g` / `--graph` | `GRAPH` | Target graph. Omit to auto-select (see below). | | `-I` | `NAME SOURCE` | Wire input `NAME` to `SOURCE`. Repeatable. | `-I` takes **two** values: the input port name, then its source. The source is written `node/port`, or as an absolute `/prefix/node/port` for a topic this graph does not produce. > [!NOTE] > > When you omit `-g`, the CLI auto-selects the workspace's sole graph. If there > are zero graphs or more than one, it errors and asks you to name one. > [!NOTE] > > Topic prefix is a graph-level setting: set it once on the graph with > `graph create -n`, and every staged instance inherits it. A staged instance > carries no prefix of its own, so `node stage` has no prefix flag — to change > the prefix, edit the graph's `prefix:` line. **1. Stage the source node** ```bash theme={null} cerulion node stage camera -g perception ``` ```text theme={null} Staged 'camera' into graph 'perception' ``` **2. Stage the consumer and wire its input** Wire the detector's `image` input to the camera's `image` output: ```bash theme={null} cerulion node stage detector -g perception -I image camera/image ``` ```text theme={null} Staged 'detector' into graph 'perception' ``` Each `node stage` validates the resulting graph and rejects duplicate instance IDs. ## Validate vs run Both commands run the same validation report (topology, node crates exist, ports parse, cdylibs exist, input bindings and schemas match), and both treat a failing check as fatal: * `cerulion graph validate ` prints the report and **exits non-zero** if any check fails, without starting anything. Use it as a gate in scripts or CI. * `cerulion graph run ` runs the report first and **refuses to start** if any check fails. Warnings stay advisory — the run continues. ```bash theme={null} cerulion graph validate perception ``` > [!TIP] > > `graph validate` prints a report and exits `0` when every check passes. A > non-zero exit means at least one check failed; read the report to see which. ## Run the graph `cerulion graph run ` loads the compiled cdylibs, builds the runtime, and runs the graph until you stop it with Ctrl+C or a node requests shutdown. In the default live mode (`--time-source real`) it wakes and processes messages as they arrive. ```bash theme={null} cerulion graph run perception ``` On Linux and macOS, that run splits the graph into worker processes by default for fault isolation, without asking, and leaves the graph file unchanged. `cerulion graph plan perception` shows the layout it will use, `--yes` saves that layout into the graph file (with a `.bak` backup), and `--single-process` opts out entirely. See [Run a graph across processes](/cerulion/guides/run-multi-process). > [!WARNING] > > `graph run` loads the compiled cdylibs that `cerulion node build` produced, so > build your nodes first; a node it cannot find is a missing-cdylib error, not a > build. It runs an iceoryx2 dead-node cleanup at start, and another > bounded cleanup pass when the graph exits normally — after the run is over, so > it delays nothing but your prompt. A run killed with `SIGKILL` skips that exit > pass; the next run that stops normally picks up what it left behind. ### Clock and validation flags | Flag | Default | Effect | | - | - | - | | `--time-source real` | (default) | Live mode — the graph wakes and processes messages as they arrive. | | `--time-source virtual` | — | Deterministic mode — the clock steps 1 ms per tick, for tests and benchmarking. An unpartitioned graph runs single-process; a graph that declares `process_groups:` still runs the multi-process supervisor. | | `--time-source external` | — | Accepted, but currently inert: an external time master is not wired yet, so time-based triggers never advance. A graph that declares `process_groups:` refuses to run under it — drop the flag, or force one process with `--single-process`. | | `--no-validate` | off | Skip the pre-flight report — not validation itself. Topology, trigger wiring and node libraries are re-checked as the graph is built, so only the `schema:` checks are genuinely skipped. Conflicts with `--record`. | | `--release` | off | Load the release-profile node libraries. | | `--record[=DIR]` | off | Record the run to an MCAP bag (live clock only). See [Record and replay](/cerulion/guides/record-and-replay). | | `--network off` | on | Run local-only — nothing crosses the machine boundary. See [Networking](/cerulion/guides/network-and-remote-robots). | The default is live mode. To run deterministically (for replay or benchmarking), pass `--time-source virtual`: ```bash theme={null} cerulion graph run perception --time-source virtual ``` Press Ctrl+C to stop a running graph. ## Smoke-test a single node `cerulion node run ` runs one node in a hidden temporary graph in live mode (validation skipped) and deletes that temp graph on exit. It is a quick way to check that a node loads and ticks without wiring a full graph. ```bash theme={null} cerulion node run camera ``` Press Ctrl+C to stop it. > [!WARNING] > > If you change a graph's topology between runs (add, remove, or rewire nodes) > and hit stale iceoryx2 service errors, run `cerulion clean` to clear > bookkeeping for dead nodes, then run again. ## Next steps > [card] [Inspect topics](/cerulion/guides/inspect-topics) > > Watch the running graph with `topic echo`, `hz`, and the TUI. > [card] [Define a node](/cerulion/guides/define-a-node) > > Add or adjust the node types you stage here. > [card] [Record and replay a run](/cerulion/guides/record-and-replay) > > Bag this run and re-execute your nodes against it. # Hindsight Source: https://docs.cerulion.com/cerulion/hindsight Point Hindsight at a robot recording and find the moment the run went sideways, with every claim cited to a real topic and timestamp. Not open source: contact Cerulion for access. Early access · Not open source > [!NOTE] > > Hindsight is not open source and has no public download. [Book 30 minutes with us](https://link.cerulion.com/book/docs) to get access. Recording and replay are in the [open-source CLI](https://github.com/cerulion-inc/cerulion): `cerulion bag record`, `bag play`, and `bag play --resim all --verify` work without Hindsight. ![Conceptual recording timeline where one signal diverges at a highlighted moment as a robot stumbles in the background.](https://mintcdn.com/cerulion-5327fd47/_4rLpGxBaFwuQJ1X/images/hindsight-hero.webp?fit=max\&auto=format\&n=_4rLpGxBaFwuQJ1X\&q=85\&s=fd823535c0800e171e5f2e3f08c83d15) Hindsight answers the question you ask after a bad run: **what went wrong, and when?** Point it at a robot recording (an MCAP bag). It indexes the recording, finds the anomalies, and names the moment the run went sideways. Each finding cites a real topic and timestamp from the recording, so you can check it. ## What Hindsight does > [card] Indexes a recording > > Builds a read-only index of an MCAP bag, and reuses it while the bag is unchanged. > [card] Gives a debrief > > A deterministic summary of gaps, dropouts, and latency spikes, and the time the run went sideways. It runs offline. > [card] Finds anomalies > > Lists what it detected, worst first, each at the exact time it happened. > [card] Cites every claim > > Each finding points at a topic and a timestamp in the recording, so you can check it against the messages. A citation names the topic and the message's log time in integer nanoseconds, exactly as recorded: ```text theme={null} [/percep/detector/detections @ t=9933017792] ``` ## With your AI agent Hindsight runs as a hosted MCP (Model Context Protocol) endpoint, so Claude Code, Codex, Cursor, Claude Desktop, or VS Code can investigate a recording for you. Your client runs the agent loop and signs in with your Cerulion account. Register it in Claude Code: ```bash theme={null} claude mcp add --transport http hindsight https://mcp.cerulion.com/mcp/hindsight ``` Then run `/mcp` inside Claude Code and sign in. [Connect an MCP client](/cerulion/guides/connect-an-mcp-client) has the setup for the other clients. Give the agent the recording as a public or presigned `https://` URL. Cerulion's server downloads it and builds the index in its own cache. The endpoint gives the agent eight tools, and none of them changes your recording: | Tool | What it does | | - | - | | `open_bag` | Opens a recording and builds its index on first open. | | `get_debrief` | Returns the deterministic summary and the went-sideways time. | | `find_anomalies` | Lists the detected anomalies, worst first, with their log times. | | `scrub` | Shows per-second signals for chosen topics in a time window. | | `query_index` | Runs a read-only SQL `SELECT` over the index. | | `sample_messages` | Returns the message rows on a topic nearest a timestamp, as timing anchors to cite. | | `list_topics` | Lists what was recorded. | | `get_foxglove_link` | Turns a cited moment into a Foxglove link, when the bag has a public URL. | The Cerulion MCP endpoint, `https://mcp.cerulion.com/mcp/cerulion`, serves the same eight tools plus the Cerulion Cloud tools. You can register both; add each as its own server. ## Gotchas * **MCAP only.** Hindsight reads `.mcap` recordings. Convert a ROS 1 `.bag` or a ROS 2 `.db3` first with the `mcap` CLI: `mcap convert recording.bag recording.mcap`. * **The first open of a large bag takes time.** Indexing a multi-GB bag takes one to two minutes. On the hosted endpoint, `open_bag` returns at once with `Indexing started for` and the URL; call it again with the same URL about a minute later to get the briefing. * **The hosted endpoint reads `https://` URLs only.** Pass the URL as `source` on every call; the server does not remember it. An `http://` URL or a local path is refused. * **Keep the URL valid for the whole investigation.** When the recording's host returns an ETag, each later call checks the URL again, so a presigned URL that expires partway through can make the later calls fail. A newly signed URL for the same recording is a different URL, and the server indexes it again. * **One sign-in per endpoint.** A client signed in at `/mcp/hindsight` gets `403` at `/mcp/cerulion`, and the reverse. Add each endpoint as its own server. * **Hindsight finds what the recording holds.** It reads only the topics you recorded. Record the topics you want to investigate: see [Record and replay a run](/cerulion/guides/record-and-replay). ## Get access Hindsight is available to teams by request. Bring a recording of a run that went wrong, and we'll show you where. > [card] [Request access to Hindsight](https://link.cerulion.com/book/docs) > > Book 30 minutes. We'll set you up. # Installation Source: https://docs.cerulion.com/cerulion/installation Install the Cerulion CLI with the install script, Homebrew, the Debian package, crates.io, or a source checkout, and verify it works. This page gets the `cerulion` CLI and its sibling programs onto your machine, signed in, and verified. The install script, Homebrew and the Debian package install prebuilt binaries; `cargo install` and a source checkout build them from source. Cerulion runs on **Linux and macOS**. Release binaries support Linux x86\_64 and ARM64 (glibc 2.31 or newer, Ubuntu 20.04 and later) and macOS on Intel and Apple Silicon. Examples on this page use Cerulion 2.0.0. Generated dependency versions match the installed CLI. ## Prerequisites > [card] Rust toolchain > > Rust **1.95 or newer**, with `cargo`, to build nodes. Any Rust 1.95 or > newer works; it does not have to match the compiler that built the CLI. > The install script sets it up for you. > [card] C toolchain > > Building nodes needs a C toolchain, installed before Rust. Debian and > Ubuntu: `sudo apt-get install -y build-essential`. macOS: > `xcode-select --install`. > [card] Cargo for node builds > > `cerulion node build` runs Cargo from your `PATH`, or from > `${CARGO_HOME:-$HOME/.cargo}/bin` when it is not on your `PATH`, and says > how to add it. `cerulion graph run` only loads the node libraries > `node build` produced. The install script keeps a Rust 1.95 or newer that is already there and otherwise installs current stable Rust through rustup, so on that route you can skip this step. Homebrew and Debian package users run `cerulion-install-rust` once instead. On a terminal, `cerulion workspace create` and `cerulion node build` offer to install Rust when 1.95 or newer is missing. For the crates.io and source routes, install Rust with rustup if you do not already have it: ```bash theme={null} curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` Confirm `cargo` is available: ```bash theme={null} cargo --version ``` ## Install the CLI > [tab] With the install script > > Downloads the release archive for your platform, sets up Rust, and > installs four programs side by side: `cerulion`, `cerulion-netd`, > `cerulion-connectd` and `cerulion-remoted`. On Linux it also places the > ROS 2 Jazzy rmw and heap hook beside them. > > ```bash theme={null} > curl -fsSL https://raw.githubusercontent.com/cerulion-inc/cerulion/main/tools/scripts/install.sh | sh && . "$HOME/.cerulion/env" > ``` > > In fish, end the line with `&& source ~/.cerulion/env.fish` instead. > > The script needs `curl` and `tar`. It resolves the latest stable release, > checks the archive's SHA-256, and refuses to install if it does not match. > It keeps a Rust 1.95 or newer that is already there, and otherwise > installs current stable Rust through rustup. Because all four programs > land together, `cerulion connect` and remote access to this machine work > without a source build. > > It installs into `$CERULION_INSTALL_DIR`, defaulting to `~/.cerulion/bin`, > links the programs into `~/.local/bin`, and adds one line to your shell > startup files, so new terminals find `cerulion`; the end of the command > above does the same for the terminal you are in. Pass `--no-modify-path` > to leave your startup files and `~/.local/bin` alone; the script then > prints the `PATH` line to add yourself. On a Mac with zsh the output ends > like this: > > ```text theme={null} > Installed Cerulion v2.0.0 for aarch64-apple-darwin into /Users/you/.cerulion/bin > Linked the Cerulion programs into /Users/you/.local/bin > PATH setup written to /Users/you/.cerulion/env > PATH setup written to /Users/you/.cerulion/env.fish > PATH line added to /Users/you/.profile > PATH line added to /Users/you/.zshenv > To use cerulion in this terminal, run . '/Users/you/.cerulion/env' (new terminals already have it), then sign in once with cerulion login > ``` > > Pass options through the pipe with `sh -s --`. `--dir` picks a different > destination, `--version` pins a specific release, and `--uninstall` > removes the install (pass the same `--dir` if you installed with one): > > ```bash theme={null} > curl -fsSL https://raw.githubusercontent.com/cerulion-inc/cerulion/main/tools/scripts/install.sh \ > | sh -s -- --version v2.0.0 --dir "$HOME/opt/cerulion" > ``` > > Prebuilt archives exist for x86\_64 and arm64 on both Linux and macOS. On > any other platform the script exits with `error: unsupported platform; > build from source`, so use the crates.io or source tab. Under WSL2 it > warns that WSL2 is unverified and unsupported, then installs the Linux > artifact anyway. > > > [!NOTE] > > > > The script selects the latest **stable** release, so it skips > > prereleases. Pass `--version vX.Y.Z-PRERELEASE` to install a prerelease > > explicitly. > > > [!WARNING] > > > > **macOS:** the release binaries are not notarized. Binaries this script > > installs are fine, because `curl` sets no quarantine flag. But an archive > > you download in a browser is quarantined, and Gatekeeper then blocks all > > four binaries on first run. Clear the flag on all four from the extracted > > directory, since the CLI and its network daemon start the others: > > > > ```bash theme={null} > > xattr -d com.apple.quarantine cerulion cerulion-netd cerulion-connectd cerulion-remoted > > ``` > [tab] Homebrew > > ```bash theme={null} > brew tap cerulion-inc/cerulion > brew install cerulion-inc/cerulion/cerulion > ``` > > Homebrew treats a third-party tap as untrusted until you install a fully > qualified name, which is why the second line spells the formula out. On > Homebrew 6.0.x the tap itself can refuse first; run > `brew trust --formula cerulion-inc/cerulion/cerulion` before the two lines > and try again. > > The formula installs `cerulion`, `cerulion-netd`, `cerulion-connectd` and > `cerulion-remoted` side by side. > > Homebrew and the Debian package do not provision Rust. To build your own > nodes, run `cerulion-install-rust` once, which installs current stable > Rust unless a Rust 1.95 or newer is already there, and put > `${CARGO_HOME:-$HOME/.cargo}/bin` on your PATH. > [tab] Debian / Ubuntu > > ```bash theme={null} > sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg > keyring=$(mktemp) && > curl -fsSL https://apt.cerulion.com/cerulion-archive-keyring.gpg -o "$keyring" && > [ "$(gpg --show-keys --with-colons "$keyring" | awk -F: '$1 == "fpr" { print $10 }' | sort -u)" = "$(printf '%s\n' 953C69FD279D9256FA4B71C5DA5FDE5D0DC6D91B | sort -u)" ] && > sudo install -m 0644 "$keyring" /usr/share/keyrings/cerulion-archive-keyring.gpg && > echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/cerulion-archive-keyring.gpg] https://apt.cerulion.com stable main" | sudo tee /etc/apt/sources.list.d/cerulion.list >/dev/null && > rm -f "$keyring" && > sudo apt-get update && sudo apt-get install cerulion > ``` > > The first line installs the three programs the second needs. The second > is one chain, where every step runs only when the one before it > succeeded, so a failed download, or a keyring holding any key other than > the key the archive signs with, stops it before it writes a keyring file > or a source list. The > [APT distribution page](https://github.com/cerulion-inc/cerulion/blob/main/docs/packaging/apt.md) > pins the same fingerprints in the same form, lists both during a key > rotation, and carries a longer form of this recipe that names which step > failed. > > The package installs `cerulion`, `cerulion-netd`, `cerulion-connectd`, > `cerulion-remoted`, the ROS 2 Jazzy rmw and the heap hook into > `/usr/bin`. It needs glibc 2.31 or newer, so it installs on Ubuntu 20.04 > and later and Debian 11 and later. > > Homebrew and the Debian package do not provision Rust. To build your own > nodes, run `cerulion-install-rust` once, which installs current stable > Rust unless a Rust 1.95 or newer is already there, and put > `${CARGO_HOME:-$HOME/.cargo}/bin` on your PATH. > [tab] From crates.io > > Install the CLI and the network daemon it starts: > > ```bash theme={null} > cargo install --locked cerulion_cli cerulion_netd > ``` > > This builds from source, so it needs the Rust toolchain above. It puts > `cerulion` and `cerulion-netd` in your Cargo bin directory > (`~/.cargo/bin`), which rustup adds to your `PATH`. > > > [!WARNING] > > > > Two sibling programs are **not** published to crates.io: > > `cerulion-connectd`, which `cerulion connect` needs, and > > `cerulion-remoted`, which `cerulion-netd` starts to serve a run to the > > computers on your account. Without `cerulion-remoted` a graph run still > > runs, but remote access to it is unavailable and the run prints a warning > > that says so. Take both from a release archive (the install script places > > them for you), or build them from a source checkout and copy them next to > > `cerulion-netd`: > > > > ```bash theme={null} > > cargo build --release --locked -p cerulion_connectd -p cerulion_remoted > > install -m 0755 target/release/cerulion-connectd target/release/cerulion-remoted "$HOME/.cargo/bin/" > > ``` > > > > `CERULION_CONNECTD_BIN` can point at `cerulion-connectd` instead of > > copying it; `cerulion-remoted` must sit beside `cerulion-netd`. > [tab] From a source checkout > > From the root of a [Cerulion source checkout](https://github.com/cerulion-inc/cerulion): > > ```bash theme={null} > cargo install --locked --path crates/cerulion_cli > cargo install --locked --path crates/cerulion_netd > ``` > > A checkout also gets you `cerulion-connectd` and `cerulion-remoted`, which > crates.io does not carry. Build them, then put them beside `cerulion` and > `cerulion-netd` so `connect` and remote access can find them: > > ```bash theme={null} > cargo build --release --locked -p cerulion_connectd -p cerulion_remoted > install -m 0755 target/release/cerulion-connectd target/release/cerulion-remoted "$HOME/.cargo/bin/" > ``` > > Pointing `CERULION_CONNECTD_BIN` at `target/release/cerulion-connectd` > works too; `cerulion-remoted` has no such setting and must sit beside > `cerulion-netd`. If you used the crates.io or source route, open a new shell so rustup's `PATH` takes effect. Then check that the binary resolves: ```bash theme={null} which cerulion ``` ## Sign in Cerulion commands run under an account. Sign in once per machine; later commands read the result locally, so they keep working offline. ```bash theme={null} cerulion login ``` A robot or a headless box prints a short code to approve from a browser on any machine. `cerulion --version`, `--help`, `completions`, `doctor`, `clean` and `telemetry` work before you sign in. At a terminal, any other command starts this sign-in for you the first time; with no terminal (a script, a CI job, a coding agent's shell) it exits with code 7 instead. For automation, point `CERULION_HOME` at a directory holding the state of a machine that signed in. > [!TIP] > > Using a coding agent? Ask it to run `cerulion login` in the background, show > you the URL and code it prints, and wait while you approve the sign-in in > your browser. > [!NOTE] > > Keep `cerulion-netd` beside the `cerulion` binary. The CLI spawns it for live > runs and for topic discovery, and it looks for it next to itself unless > `CERULION_NETD_BIN` points elsewhere. Every route on this page puts them in > the same directory, so this is already true unless you move one. ## How generated workspaces resolve their dependencies `cerulion workspace create` writes the root `Cargo.toml` for you, and it picks where `cerulion_core` and `native_ros2_messages` come from based on where the `cerulion` binary itself lives: | Your CLI came from | Generated dependencies | | - | - | | The install script, Homebrew or the Debian package (a release binary) | Published crates, exact-pinned to the CLI's own version: `cerulion_core = "=2.0.0"` | | `cargo install` (crates.io) | Published crates, exact-pinned to the CLI's own version: `cerulion_core = "=2.0.0"` | | A Cerulion source checkout | Absolute `path` dependencies into that checkout | The CLI prints which one it chose on the line under the created path, so the choice is never silent. The generated `Cargo.toml` also pins the iceoryx2 crates to a git revision under `[patch.crates-io]`, which the first build fetches. ## Verify the installation Confirm everything is wired up: print the version, list the available commands, check the machine, set up completions, and scaffold a throwaway workspace. **1. Check the version** ```bash theme={null} cerulion --version ``` **2. List the commands** Confirm the CLI runs and prints its help: ```bash theme={null} cerulion --help ``` You should see the top-level commands, including `workspace`, `node`, `graph`, `topic`, `bag` and `doctor`. **3. Check the machine** `cerulion doctor` checks this machine for problems that slow or stop Cerulion and prints the fix for each. It needs no root, and it runs before you sign in; until you do, its `account.login` check fails: ```bash theme={null} cerulion doctor ``` It ends with a count line such as `4 pass, 4 info, 1 warn, 0 fail, 9 skip` and exits non-zero only when a check failed. **4. Install shell completions** Optional, but it makes the CLI much easier to explore. Add the lines for your shell to its startup file, then open a new terminal: ```bash theme={null} # zsh: both lines are needed, because the macOS system zshrc never runs compinit echo 'autoload -Uz compinit && (( $+functions[compdef] )) || compinit' >> ~/.zshrc echo 'source <(COMPLETE=zsh cerulion)' >> ~/.zshrc # bash echo 'source <(COMPLETE=bash cerulion)' >> ~/.bashrc ``` These lines regenerate the completion code each time a shell starts, so they keep working after an upgrade. `cerulion completions --help` has the lines for fish, elvish and PowerShell. **5. Create a smoke-test workspace** Create a scratch workspace to confirm the CLI can scaffold a project. Like most commands, this needs the sign-in above: ```bash theme={null} cerulion workspace create install_check ``` Expected output, with the second line naming the dependency source it picked: ```text theme={null} Created workspace at /home/you/install_check dependencies: published crates from crates.io, pinned to =2.0.0 (the installed CLI version) ``` > [!TIP] > > `cerulion --version` printed a version, `cerulion --help` listed the commands, > `cerulion login` signed you in, and `cerulion workspace create install_check` > created a new workspace. Your installation is working. You can delete the > `install_check` directory once you are satisfied. ![A robotic hand lights a switch as sensors glow blue to celebrate a verified installation](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/installation-celebration.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=33713b8ec6e26651bac24efcb233c30a) ## Questions or setup help? The [Cerulion CLI is open source](https://github.com/cerulion-inc/cerulion). If you have a question, want help with your first run, or want early access to [Hindsight](/cerulion/hindsight) (closed source), book 30 minutes with us. > [card] [Get help in 30 minutes](https://link.cerulion.com/book/docs) > > Bring a setup question, your use case, or a run you want to investigate. ## Next steps > [card] [Quickstart](/cerulion/quickstart) > > Build and run your first two-node graph end to end. > [card] [Concepts](/cerulion/concepts) > > Understand workspaces, nodes, graphs, topics, and schemas. > [card] [Connect an MCP client](/cerulion/guides/connect-an-mcp-client) > > **Early access.** Give your coding agent tools that analyze your robot > recordings. # Quickstart Source: https://docs.cerulion.com/cerulion/quickstart Build and run a two-node Cerulion graph from scratch, watch its messages live with topic echo, then record it and test a change against the recording. ![Conceptual robotics workbench with a camera observing an orange object beside a humanoid robot.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/quickstart-camera-detection.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=00da0213f05e3dc6b430f289b1d6c055) ## What you'll build In this tutorial you build a complete two-node graph: * A **periodic publisher** (`sensor`) that emits a `sensor_msgs/Image` on a fixed interval. * A **data-triggered consumer** (`detector`) that fires each time a new image arrives and publishes a `geometry_msgs/PoseStamped` detection. You will wire them into a graph, run it, and watch the messages flow with `cerulion topic echo` in a second terminal. Then you record a run and re-run a changed node against the recording. ```mermaid theme={null} flowchart LR sensor[sensor] -- "sensor_msgs/Image" --> detector[detector] detector -- "geometry_msgs/PoseStamped" --> out([detection]) ``` *Figure: The two-node graph you build. The periodic `sensor` node publishes a `sensor_msgs/Image`; the data-triggered `detector` fires on each image and publishes a `geometry_msgs/PoseStamped`.* > [!NOTE] > > This guide assumes the `cerulion` CLI is installed, `cargo` is on your > `PATH`, and this machine has signed in once with `cerulion login`. If not, > follow [Installation](/cerulion/installation) first. > [!TIP] > > In a hurry? `cerulion workspace create starter_demo --starter obstacle_avoidance` > creates a complete two-node example workspace; its `README.md` says how to > build and run it. ## Build it step by step **1. Sign in** Cerulion commands run under an account. Sign in once per machine; later commands read the result locally, so they keep working offline. ```bash theme={null} cerulion login ``` A robot or a headless box prints a short code to approve from a browser on any machine. **2. Create and enter a workspace** A workspace is the project container that holds your nodes, graphs, and schemas. ```bash theme={null} cerulion workspace create my_robot && cd my_robot ``` Expected output. The second line names where the generated workspace takes `cerulion_core` and `native_ros2_messages` from: ```text theme={null} Created workspace at /home/you/my_robot dependencies: published crates from crates.io, pinned to =2.0.0 (the installed CLI version) ``` **3. Create the publisher node** Create a `sensor` node with one output port named `image` carrying a `sensor_msgs/Image`. Because it has no inputs, a source-only node must declare a non-data trigger policy; here, a 33 ms period. ```bash theme={null} cerulion node create sensor -o sensor_msgs/Image image --policy period_ms=33 ``` Expected output: ```text theme={null} Created node type 'sensor' ``` > [!NOTE] > > The period is set with `--policy period_ms=33`. Note the underscore and > the `=`. **4. Create the consumer node** Create a `detector` node whose `image` input is a **trigger** (`-T`), so the node fires whenever an image arrives. Give it an output named `detection` carrying a `geometry_msgs/PoseStamped`. ```bash theme={null} cerulion node create detector -T sensor_msgs/Image image -o geometry_msgs/PoseStamped detection ``` Expected output: ```text theme={null} Created node type 'detector' ``` > [!NOTE] > > `-T` and `-o` each take **two** values in the order `SCHEMA NAME`. The > trigger input also sets the node's policy to fire on that input's data. **5. Fill in the publisher's tick** Open `nodes/sensor/src/lib.rs` and replace its contents with the node below. Each tick stamps the image dimensions and bumps a frame counter. ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::sensor_msgs::Image; #[cerulion_node(period_ms = 33)] #[derive(Default)] struct SensorNode { #[output] image: Image, frame_count: u32, } #[cerulion_node_impl] impl SensorNode { fn tick(&mut self) -> Result<(), NodeError> { self.frame_count += 1; self.image.height = 2; self.image.width = 4; self.image.step = 4; self.image.encoding = "mono8"; self.image.header.frame_id = "camera_optical"; self.image.data = &[self.frame_count as u8; 8][..]; Ok(()) } } ``` > [!NOTE] > > `#[output]` is the only form you need, for every schema. `height`, `width`, > and `step` are fixed fields written straight to shared memory; `encoding`, > `frame_id`, and `data` are variable-length fields, and plain assignment > works for those too. **6. Fill in the consumer's tick** Open `nodes/detector/src/lib.rs` and replace its contents with the node below. Each tick reads the incoming frame and publishes one detection pose. ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::geometry_msgs::PoseStamped; use native_ros2_messages::sensor_msgs::Image; #[cerulion_node] #[derive(Default)] struct DetectorNode { #[input(trigger)] image: Image, #[output] detection: PoseStamped, } #[cerulion_node_impl] impl DetectorNode { fn tick(&mut self) -> Result<(), NodeError> { let brightness = self.image.data().first().copied().unwrap_or(0); self.detection.header.frame_id = "camera_optical"; self.detection.pose.position.x = f64::from(brightness) / 255.0; self.detection.pose.orientation.w = 1.0; Ok(()) } } ``` > [!NOTE] > > Fixed fields like `pose.position.x` are read and written directly. A > variable-length field is *read* through an accessor, `self.image.data()`, > because its length is only known at runtime. Setting > `orientation.w = 1.0` makes the pose a valid rotation; an unset > quaternion is all zeros. > [!NOTE] > > The `#[input(trigger)]` attribute on `image` is what makes `detector` fire > on each incoming image. The node-level macro has no policy attribute > because the trigger comes from the field. **7. Build both node crates** Compile each node into a loadable library. These commands shell out to `cargo`. ```bash theme={null} cerulion node build sensor cerulion node build detector ``` Expected output: ```text theme={null} Building 'sensor'. The first build of a workspace also compiles the Cerulion runtime and can take a few minutes; nothing more is printed until the build finishes. Built 'sensor' Building 'detector'. The first build of a workspace also compiles the Cerulion runtime and can take a few minutes; nothing more is printed until the build finishes. Built 'detector' ``` The first build compiles the Cerulion runtime and its dependencies along with the node, so expect it to take minutes. Later builds in the same workspace take seconds. **8. Create a graph** Create an empty graph named `perception` with an explicit topic prefix of `perception`. The `-n`/`--prefix` flag fixes the prefix so the topic names are predictable; without it, the prefix would default to your machine's hostname. ```bash theme={null} cerulion graph create perception -n perception ``` Expected output: ```text theme={null} Created graph 'perception' ``` > [!NOTE] > > Cerulion composes each topic name as `/{prefix}/{node_id}/{output_name}`. > With the prefix `perception`, the `sensor` instance's `image` output > publishes to `/perception/sensor/image`. **9. Stage the nodes and wire them** Add an instance of each node to the graph. For `detector`, wire its `image` input to the `sensor` instance's `image` output with `-I`. ```bash theme={null} cerulion node stage sensor -g perception cerulion node stage detector -g perception -I image sensor/image ``` Expected output: ```text theme={null} Staged 'sensor' into graph 'perception' Staged 'detector' into graph 'perception' ``` > [!NOTE] > > `-I` takes **two** values: the input port name, then its source. > `image sensor/image` means "wire the `image` input to the `image` output of > the node instance `sensor`." **10. Run the graph** Run the graph. The default is live mode: the graph wakes and processes messages as they arrive. The run continues until you stop it with `Ctrl+C`. ```bash theme={null} cerulion graph run perception ``` The graph declares no `process_groups:`, so on Linux and macOS `graph run` runs one process per node without asking and leaves the graph file unchanged. Add `--yes` to save that layout in the graph YAML (with a `.bak` backup), or run `cerulion graph partition perception` to review it and save it interactively. See [Run a graph across processes](/cerulion/guides/run-multi-process). The run prints: ```text theme={null} graph 'perception' running: 2 node(s) in 2 process(es); press Ctrl+C to stop ``` > [!NOTE] > > By default the run is readable from any computer signed in to your > account, on this LAN or another network, with no addresses or flags: > `cerulion topic list` on that computer finds it. A machine that is not > signed in to your account cannot read its topics or publish into it, > unless you open the LAN on purpose with `CERULION_LAN_ACCESS=open`. Add > `--network off` to keep a run on this machine. > The run starts the `cerulion-netd` network daemon, which exits on its own > after 30 seconds idle. See > [Networking and remote robots](/cerulion/guides/network-and-remote-robots). Leave this terminal running. **11. Watch the topics in a second terminal** Open a new terminal. Topic discovery needs no workspace. List the active topics, then echo the one carrying images: ```bash theme={null} cerulion topic list ``` ```bash theme={null} cerulion topic echo /perception/sensor/image ``` `topic echo` prints one YAML document per image: a `# seq=.. ts=..ns schema=0x.. size=..` comment, a `# sensor_msgs/Image` comment, the image's fields (`height`, `width`, `encoding` and the eight `data` bytes among them), then `---`. Stop echoing with `Ctrl+C`. > [!NOTE] > > Because you set the prefix to `perception`, the topic is > `/perception/sensor/image`. Always run `cerulion topic list` first to > confirm the exact names before echoing. > [!TIP] > > You should see image messages streaming in the echo terminal while the graph > runs. Your two-node graph is live: `sensor` publishes images on a 33 ms period > and `detector` fires on each one. Press `Ctrl+C` in the run terminal to stop > the graph. ## Record it, then test a change The point of a recording is to test changed code against what really happened. Record a run, check that your unchanged nodes reproduce it, then change one node and watch the check name what changed. **1. Record a run** Run the graph with `--record`, let it run for a few seconds, and stop it with `Ctrl+C`: ```bash theme={null} cerulion graph run perception --record ``` When the run ends it prints the bag's path; your file name will differ: ```text theme={null} recording written to recordings/perception_20261111T191950Z.mcap ``` **2. Re-run your unchanged nodes against it** ```bash theme={null} cerulion bag play recordings/perception_20261111T191950Z.mcap --resim all --verify ``` The last line is the verdict, and the command exits 0. Counts depend on your recording: ```text theme={null} replay PASS: recordings/perception_20261111T191950Z.mcap (1222 tick(s) replayed, 2/2 topic(s) matched byte-for-byte and were credited) ``` **3. Change the detector and check again** In `nodes/detector/src/lib.rs`, change `/ 255.0` to `/ 128.0`, rebuild, and run the same check: ```bash theme={null} cerulion node build detector cerulion bag play recordings/perception_20261111T191950Z.mcap --resim all --verify ``` This time the command exits 1 and names the topic whose output changed: ```text theme={null} FRAME-CONTENT DIVERGENCE: recordings/perception_20261111T191950Z.mcap 1222 tick(s) replayed; 1/2 topic(s) matched and were credited; 1 violation(s): - /perception/detector/detection [byte-mismatch]: frame 0 differs at byte 40 on '/perception/detector/detection' (recorded 134 B, replayed 134 B) Topics passed: 1/2 ``` Change it back to `/ 255.0` and rebuild when you are done. ![A white lab robot traces a blue and orange light loop around an orange cube to celebrate a first running graph](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/first-graph-celebration.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=706a3ef043ab1d8240c60081e5356122) ## Next steps > [card] [Concepts](/cerulion/concepts) > > The mental model behind workspaces, nodes, graphs, topics, and schemas. > [card] [Record and replay](/cerulion/guides/record-and-replay) > > What a recording holds, playback, Flashback, and the full re-execution workflow. > [card] [CLI reference](/cerulion/reference/cli) > > Every command and flag, with synopses and examples. Need a second pair of eyes on your first graph? Bring the command, output, and what you expected to [#setup-help in our Discord community](/cerulion/community). For a walkthrough or help getting started, [book a 30-minute call](https://link.cerulion.com/book/docs). # CLI reference Source: https://docs.cerulion.com/cerulion/reference/cli Reference for the cerulion commands, subcommands, flags, and arguments. The `cerulion` binary groups all functionality under top-level commands: ```text theme={null} workspace node graph topic schema service ros2 viz connect login logout account telemetry tui trace bag bagd completions flashback clean doctor ``` Synopsis notation uses ``, `[optional]`, `{a|b}` (choice), and `...` (repeatable). Synopsis lines are not directly runnable; each command includes a separate runnable example. ## Global ```text theme={null} cerulion [-v|--verbose] [args...] ``` | Flag | Long | Type | Default | Meaning | | - | - | - | - | - | | verbose | `-v` / `--verbose` | bool | false | Enable debug-level logging. Applies to every subcommand. | On error, `cerulion` prints `Error: ` to stderr and exits with a failure code. Most commands require a workspace, discovered by walking upward for a `Cargo.toml` containing `[workspace]` plus a `graphs/` directory. `workspace create`/`init`, `tui`, `trace`, `clean`, `doctor`, `completions`, `login`, `logout`, `account`, `telemetry`, `connect`, `viz`, `bag`, `flashback`, and `ros2 run`/`launch`/`migrate` do not require discovery; `schema info` and `schema list` use a workspace when they find one and fall back to the built-in types when they do not. The `topic` commands use transport discovery and need no workspace. ## workspace > [accordion] cerulion workspace create > > Create a new workspace directory. > > ```text theme={null} > cerulion workspace create [--starter obstacle_avoidance] > ``` > > | Arg / flag | Value name | Type | Default | Meaning | > | - | - | - | - | - | > | name (positional) | `` | String | | Required. Workspace directory to create at `.//`. | > | `--starter` | `obstacle_avoidance` | String | | Include a complete example workspace bundled with this CLI version, nodes and graph included. | > > Creates `.//` with `graphs/`, `nodes/`, `schemas/`, `Cargo.toml` (`[workspace]`, `members=["nodes/*"]`, `resolver="2"`, workspace dependencies for `cerulion_core` and `native_ros2_messages`), `.cargo/config.toml`, and a `.gitignore` carrying `.cerulion/` (the workspace lock directory). Errors if `./` already exists. > > The `cerulion_core` and `native_ros2_messages` dependencies point at published crates, exact-pinned to the CLI's own version, unless your `cerulion` binary was built from a Cerulion source checkout, in which case they are absolute `path` dependencies into that checkout. The decision keys on where the binary lives, never on the current directory. The command prints which it chose on the line under the created path. > > ```bash theme={null} > cerulion workspace create my_robot > ``` > [accordion] cerulion workspace init > > Initialize a workspace in place. > > ```text theme={null} > cerulion workspace init [location] > ``` > > | Arg / flag | Value name | Type | Default | Meaning | > | - | - | - | - | - | > | location (positional) | `[location]` | String | `.` | Directory to initialize in place. | > > Errors if a `Cargo.toml` with `[workspace]` already exists there. The workspace name is the directory's file name. > > ```bash theme={null} > cerulion workspace init . > ``` ## node Subcommands: `create`, `delete`, `modify`, `build`, `stage`, `run`, `list`, `info`. All require workspace discovery. > [accordion] cerulion node create > > Create a node type. > > ```text theme={null} > cerulion node create [--lang {rust|python}] [-o SCHEMA NAME] [-i SCHEMA NAME] [-T SCHEMA NAME] [--policy SPEC] [--raw-ffi] > ``` > > | Flag | Short/Long | Value names | Type | Default | Meaning | > | - | - | - | - | - | - | > | node type | (positional) | `` | String | | Required. Becomes folder `nodes//` and (PascalCased) the struct name. Non-empty, alphanumeric/underscore, must not start with a digit. | > | output port | `-o` / `--output` | `SCHEMA NAME` | 2 values | | Add one output port. At most one `-o` per `create`. | > | input port | `-i` / `--input` | `SCHEMA NAME` | 2 values | | Add one regular input. At most one `-i` per `create`. | > | trigger input | `-T` / `--trigger-input` | `SCHEMA NAME` | 2 values | | Add a trigger input → field emitted as `#[input(trigger)]`, policy set to `data_trigger=`. At most one `-T` per node. | > | policy | `--policy` | `SPEC` | String | (defaulting rules) | Trigger policy. See [Trigger policies](/cerulion/reference/trigger-policies). | > | language | `--lang` | `rust` or `python` | String | `rust` | `python` creates a node whose logic lives in `node.py`. A Python node needs `-T` or `--policy`, takes `-i` and `-o` repeatedly, and needs a Cerulion source checkout. See [Python](/cerulion/guides/python). | > | raw FFI | `--raw-ffi` | | bool | false | Generate the raw `extern "C"` FFI template instead of the `#[cerulion_node]` macro template. Rust only. | > > `SCHEMA` accepts `sensor_msgs/Image`, `sensor_msgs::Image`, or a bare `Image`. Bare names resolve against your workspace schemas first, then the built-in ROS 2 messages; an ambiguous bare name errors and lists the candidates. > > Generated files: `nodes//Cargo.toml` (cdylib) and `nodes//src/lib.rs`. > > A source-only node (no `-i`/`-T`) must declare a non-data policy — `--policy period_ms=N` or `--policy external`. > > ```bash theme={null} > cerulion node create detector -T sensor_msgs/Image image -o geometry_msgs/PoseStamped detection > ``` > [accordion] cerulion node delete > > Delete a node type. > > ```text theme={null} > cerulion node delete > ``` > > Removes `nodes//` (recursive) and the workspace member entry. > > ```bash theme={null} > cerulion node delete detector > ``` > [accordion] cerulion node modify > > Modify an existing node type in place. > > ```text theme={null} > cerulion node modify [-i SCHEMA NAME] [-T SCHEMA NAME] [-o SCHEMA NAME] [--policy SPEC] > ``` > > Splices new port fields into the macro struct and rewrites the node-level policy attribute in `src/lib.rs`. Your `tick()` body is untouched. `--raw-ffi` is not accepted here — the existing node form is preserved. > > ```bash theme={null} > cerulion node modify detector -i nav_msgs/Odometry odometry > ``` > [accordion] cerulion node build > > Compile a node type into a loadable library. > > ```text theme={null} > cerulion node build [--release] > ``` > > | Flag | Type | Default | Meaning | > | - | - | - | - | > | `--release` | bool | false | Build with the release profile. | > > Shells out to `cargo build` for that crate with the `cdylib` feature, producing `.so` (Linux) or `.dylib` (macOS). `CARGO_TARGET_DIR` is honored. > > If the crate declares optional system dependencies, the build probes them with `pkg-config` first and enables each feature whose libraries are present; a missing one is reported loudly and the build continues without that feature. > > ```bash theme={null} > cerulion node build detector > ``` > [accordion] cerulion node stage > > Add an instance of a node type to a graph. > > ```text theme={null} > cerulion node stage [-i ID] [-g GRAPH] [-I NAME SOURCE]... > ``` > > | Flag | Short/Long | Value names | Default | Meaning | > | - | - | - | - | - | > | node type | (positional) | `` | | Required. The type to instantiate. | > | instance id | `-i` / `--id` | `ID` | the node type name | The instance's `id` in the graph. | > | graph | `-g` / `--graph` | `GRAPH` | the only graph in the workspace | Target graph. Required when several graphs exist. | > | input wiring | `-I` | `NAME SOURCE` | | Wire one input. Repeatable. Takes **two** values. Short form only: there is no long spelling. | > > `SOURCE` is either relative (`sensor/image` → `//sensor/image`) or absolute (`/vendor/camera/image`, an external topic with no in-graph producer). > > ```bash theme={null} > cerulion node stage detector -g perception -I image sensor/image > ``` > [accordion] cerulion node run > > Run a single node type on its own. > > ```text theme={null} > cerulion node run [-p PREFIX] [-i ID] [--release] > ``` > > Builds a hidden single-node graph and runs it on the live clock without validation, so you can exercise one node against `topic echo`. Networking follows the same defaults as `graph run`. > > ```bash theme={null} > cerulion node run sensor -p bench > ``` > [accordion] cerulion node list > > List the workspace's node types. > > ```text theme={null} > cerulion node list > ``` > > Prints a `TYPE INPUTS OUTPUTS POLICY` table derived from each crate's `src/lib.rs`. > [accordion] cerulion node info > > Show one node type's ports and policy. > > ```text theme={null} > cerulion node info > ``` > > ```bash theme={null} > cerulion node info detector > ``` ## graph Subcommands: `create`, `run`, `validate`, `list`, `levels`, `plan`, `profile`, `partition`, `pause`, `resume`. > [accordion] cerulion graph create > > Create an empty graph file. > > ```text theme={null} > cerulion graph create [-n PREFIX] > ``` > > | Flag | Short/Long | Default | Meaning | > | - | - | - | - | > | name | (positional) | | Required. Writes `graphs/.yaml`; the file stem is the graph's name. | > | prefix | `-n` / `--prefix` | the machine's hostname without `.local`, stamped into the file | Topic prefix for every topic this graph creates. `graph create` always writes a `prefix:` line, so the name does not change when the file moves to another machine. | > > ```bash theme={null} > cerulion graph create perception -n perception > ``` > [accordion] cerulion graph run > > Load, validate, and execute a graph. > > ```text theme={null} > cerulion graph run [NAME:=VALUE]... > [--time-source {real|virtual|external}] [--no-validate] [--release] > [--single-process] [--auto-partition] [--yes] [--peer-loss {continue|fail}] > [--record[=DIR]] [--record-env {allowlist|all|none}] [--record-cpu {CORE|none}] > [--network off] [--trace-limit N] [--no-rings] > [--no-cpu-dma-lock] [--no-monitor-wait] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `NAME:=VALUE` | | Override a launch argument the graph declares under `args:`, for this run only. The value is read as a YAML scalar (`true` is a bool, `50` an integer, `go2` text). An override for an argument the graph does not declare is refused before any node loads, naming the nearest declared one. Repeatable. | > | `--time-source` | `real` | `real` runs the live, event-driven loop and wakes within microseconds of a publish. `virtual` runs the deterministic clock with a 1 ms poll loop, for reproducible runs and benchmarking. `external` is accepted but inert today — the clock never advances, so time-based triggers never fire. | > | `--no-validate` | off | Skip the pre-flight validation report — not validation itself. The graph topology, the macro trigger wiring and the node libraries are re-checked as the graph is built, so a graph failing one of those is refused with the flag or without it. What the flag does still skip is the `schema:` checks: a non-empty schema name the workspace cannot resolve, one that contradicts the producing node's declaration, or one that disagrees with the consumer's. Such a graph runs — the wire layout comes from the node's Rust type, not the label — so the cost lands later, as a mislabelled bag channel or a replay that refuses a healthy bag. An absent or empty `schema:` is a topology failure, which this flag cannot skip either. Conflicts with `--record`. | > | `--release` | off | Load release-profile node libraries. Otherwise the freshest build wins. | > | `--single-process` | off | Run the whole graph in one process — no partition derivation, no prompt. | > | `--auto-partition` | off | Re-derive the process partition even when the graph already declares `process_groups:`. Conflicts with `--single-process`. | > | `--yes` | off | Save the derived partition into the graph YAML, with a `.bak` backup. Without it the run holds the derived groups in memory and leaves the file unchanged. | > | `--peer-loss` | `continue` | Worker-death policy for multi-process runs. `continue` drops the dead group and keeps the survivors running, degraded and loudly; `fail` stops the whole deployment. | > | `--record[=DIR]` | off | Record the run to an MCAP bag. The bare flag writes to `./recordings/`; a custom directory requires the `=` form. Live clock only, Unix only. | > | `--record-env` | `allowlist` | How the bag captures environment variables: `allowlist` records all names but only `CERULION_*`, `RUST_LOG` and `IOX2_*` values (others are hashed for divergence detection), `all` records values verbatim, `none` records names only. Requires `--record`. | > | `--record-cpu` | auto | Pin the recorder process to a core id, or `none` to let it float. Requires `--record`. | > | `--network off` | permissive | Run local-only: no gateway process, nothing crosses the machine boundary. `off` is the only accepted value. | > | `--trace-limit N` | bounded | Cap, in entries, on the in-memory fire trace a run keeps for introspection. `0` is rejected. | > | `--no-rings` | off | Decline the memory a run spends on being re-executable later, for a memory-tight robot. Such a run takes no captures at all. Conflicts with `--record`. | > | `--no-cpu-dma-lock` | off | Disable the automatic CPU C-state cap (Linux). | > | `--no-monitor-wait` | off | Disable the live-loop CPU park. | > > A failing validation check refuses the run before anything starts; warnings are advisory and the run continues. > > The run continues until `Ctrl+C` or a node calls `request_shutdown()`. On Unix under the real clock, an unpartitioned graph is executed multi-process by default — see [Run a graph across processes](/cerulion/guides/run-multi-process). > > Exit status: `0` for a run that ends normally; `3` when one or more nodes returned `NodeError::Fatal` and were stopped during the run, after one `Error: node '' stopped on a fatal error: ` line per stopped node; `1` for any other failure, which wins over `3`. > > A run that stops normally spends a bounded pass of roughly two seconds on cleanup after the graph is over, reclaiming shared-memory state left behind by dead nodes; because the graph has already stopped, nothing you are waiting on is delayed. Whatever the budget does not reach stays for the next pass. A run killed with `SIGKILL` skips that pass, and the next run that stops normally picks up what it left. A run refused before it starts — an unknown graph name, for instance — does no cleanup at all. > > ```bash theme={null} > cerulion graph run perception --record > ``` > [accordion] cerulion graph validate > > Validate a graph without running it. > > ```text theme={null} > cerulion graph validate [--release] > ``` > > Runs the full check set — node libraries present, ports and schemas matching the node source, sources resolvable, trigger requirements satisfied, topic names well formed — and prints a per-check report ending in a count such as `9/9 checks passed.` **Exits non-zero on any failure**, which makes it the command to run in CI. > > Node libraries must be built first; an unbuilt node fails its `cdylib ''` check with `cdylib for node '' not found`, followed by the paths searched and the `cerulion node build` command to run. > > ```bash theme={null} > cerulion graph validate perception > ``` > [accordion] cerulion graph list > > List the workspace's graphs. > > ```text theme={null} > cerulion graph list > ``` > [accordion] cerulion graph levels > > Show the execution levels the runtime derives from the wiring. > > ```text theme={null} > cerulion graph levels > ``` > > Prints each level with its nodes and their trigger policies, the edges that carry triggers, and — when the graph declares `process_groups:` — which group covers which levels. Exits non-zero if the declared partition is invalid. > > The partition verdict names every split `block` edge it found creditable, so this is the verb that answers whether a hand-written split will run: > > ```text theme={null} > partition: spawner-consumable (1 split `block` edge(s) creditable: /p/n1/out -> n2.inp (front -> back); judged on source metadata — `graph run` re-checks the built cdylibs and refuses on drift) > ``` > > ```bash theme={null} > cerulion graph levels perception > ``` > [accordion] cerulion graph plan > > Show the processes a run of the graph starts and the executor units inside each. Read-only. > > ```text theme={null} > cerulion graph plan > ``` > > Prints each process with its units and nodes, and the reason each unit starts where it does. A graph without `process_groups:` shows the layout `graph run` derives for it. > > ```bash theme={null} > cerulion graph plan perception > ``` > [accordion] cerulion graph profile > > Measure per-node tick costs and edge rates. > > ```text theme={null} > cerulion graph profile [--duration SECS] [--fires N] [-o PATH] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `--duration` | `30` | Observation-window cap in seconds. | > | `--fires` | auto-derived | Uniform per-node fire target. Use it for nodes whose first fire lands after the warm-up (for example a period longer than 3 s). | > | `-o` / `--out` | `graphs/.costs.yaml` | Where to write the cost artifact. | > > Runs the graph locally, then writes a cost snapshot — per-node median tick cost, per-edge fire rates, and a frozen compute budget — that `graph partition` consumes. Nodes that never sampled enough fires are reported as isolated rather than guessed at. > > ```bash theme={null} > cerulion graph profile perception --duration 20 > ``` > [accordion] cerulion graph partition > > Derive and write the graph's process groups. > > ```text theme={null} > cerulion graph partition [--costs PATH] [--budget-ns N] [--dry-run] [--yes] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `--costs` | `graphs/.costs.yaml` | Cost artifact to plan from. An explicitly named file must exist and parse. | > | `--budget-ns` | the artifact's frozen budget | Per-group compute budget in nanoseconds. Zero is rejected. | > | `--dry-run` | off | Print the derived partition and the YAML diff, and exit without writing. Wins over `--yes`. | > | `--yes` | off | Write without the interactive confirmation. | > > Writing is a surgical rewrite of the `process_groups:` block with a `.bak` backup alongside it. > > ```bash theme={null} > cerulion graph partition perception --dry-run > ``` > [accordion] cerulion graph pause / resume > > Hold a live run still, then let it go on. > > ```text theme={null} > cerulion graph pause > cerulion graph resume > ``` > > `` is a graph name that matches exactly one live run, or the run id (`0x` and 32 hex digits, recorded in the run's `run.json`). A pause holds every process of the run at its next step boundary and stops the run's clock, so a period timer neither skips ticks nor bursts on resume, and a recording of the run shows no gap across the pause. Pausing a paused run, or resuming a running one, succeeds and changes nothing. > > > [!WARNING] > > > > A pause is not an emergency stop. It does not stop hardware, and a publisher outside the graph keeps publishing into its inputs' queues. A node that reads the hardware clock itself (`real_ns()`) still sees it advance. > > Exit `0` on success, `4` when no live run matches, and `1` when the run cannot be paused: it runs on `--time-source virtual` or `external`, its graph has `ros2:` entries, or the name matches more than one run. Unix only. > > ```bash theme={null} > cerulion graph pause perception > cerulion graph resume perception > ``` > > ```text theme={null} > run 0x8ae13af78f20706ab8bc9a8db9893630 (perception) is now paused > run 0x8ae13af78f20706ab8bc9a8db9893630 (perception) is now running > ``` ## topic Topic commands attach to the running transport and need no workspace. > [accordion] cerulion topic list > > List active topics, locally and on the network. > > ```text theme={null} > cerulion topic list [-t] [--all] [--local] [--connect LOCATOR]... [--listen LOCATOR]... [--scan] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `-t` / `--show-types` | off | Print each topic's message type after its name, as `/topic [package/Type]`. A local topic is typed from one message, so the listing can wait up to one second; a remote topic is typed from its robot's catalog. An unknown type shows `[unknown]`. | > | `--all` | off | Also list the framework's own internal topics in the local section, each marked `internal`. Without it they are hidden and a count line says how many. | > | `--local` | off | Skip the remote discovery query, for scripts, CI, or offline use. `--no-network` is the same flag. | > | `--connect LOCATOR` | | Additional locator to dial for discovery, for example `tcp/192.168.1.20:7683`. Repeatable. | > | `--listen LOCATOR` | | Additional locator to bind for discovery. Repeatable. | > | `--scan` | off | Also sweep the local `/24` on the gateway port for an open LAN robot that mDNS does not reveal. Opt-in only. | > > Local topics print first and immediately. Robots on your account and their topics, found on one LAN or across networks, follow in `ROBOTS` and `REMOTE TOPICS` sections. A failed remote query is a loud note and still exits 0. > > ```bash theme={null} > cerulion topic list > ``` > [accordion] cerulion topic info > > Show a topic's schema and last-seen frame. > > ```text theme={null} > cerulion topic info [--local] > ``` > > ```bash theme={null} > cerulion topic info /perception/sensor/image > ``` > > ```text theme={null} > Topic: /perception/sensor/image > Schema: sensor_msgs/Image > Last sequence: 668 > Last timestamp: 443360815748ns > ``` > [accordion] cerulion topic echo > > Print messages as they arrive. > > ```text theme={null} > cerulion topic echo [--truncate-length N] [--local] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `--local` | off | Read local shared-memory producers only: no remote discovery, schema query, or network daemon start. `topic info`, `hz`, `type` and `bw` take the same flag. | > | `--truncate-length` | `128` | Maximum elements printed per array; a cut array ends in `!truncated `, the number left out. Must be positive. | > > Prints one YAML document per message: a `# seq=.. ts=..ns schema=0x.. size=..` comment, a `# ` comment, the fields, then `---`. Every type prints its fields this way, `sensor_msgs/Image` included. A frame no known schema names prints `#` comment lines that say why, with a hex preview of its first 64 payload bytes. Runs until `Ctrl+C`. A name that is not a local topic is looked for on the robots on your account and demanded for the length of the command; `--local` or `CERULION_NETWORK=off` keeps it local-only. > > ```bash theme={null} > cerulion topic echo /perception/sensor/image > ``` > [accordion] cerulion topic hz > > Measure a topic's publish rate. > > ```text theme={null} > cerulion topic hz [--local] > ``` > > ```bash theme={null} > cerulion topic hz /perception/sensor/image > ``` > > ```text theme={null} > average rate: 30.30 Hz, min: 0.0330s max: 0.0330s std: 0.0000s window: 30 > ``` > [accordion] cerulion topic type > > Print a topic's message type. > > ```text theme={null} > cerulion topic type [--local] > ``` > > Prints `package/Type`, or the bare name of a workspace schema declared with no package. Exits 1 with an error naming the topic when it is not found, sends no message within the wait (1 s local, 3 s remote), or carries a schema no known type names. > > ```bash theme={null} > cerulion topic type /perception/sensor/image > ``` > [accordion] cerulion topic find > > List the topics that carry a message type. > > ```text theme={null} > cerulion topic find [--local] [--connect LOCATOR]... [--listen LOCATOR]... > ``` > > Prints every local topic, and every topic discovered on the network, whose type is ``, one per line, sorted. Takes the name `topic type` and `topic list -t` print; the ROS 2 form `package/msg/Type` also works. A type no topic carries prints nothing and exits 0. > > ```bash theme={null} > cerulion topic find sensor_msgs/Image > ``` > [accordion] cerulion topic bw > > Measure a topic's bandwidth. > > ```text theme={null} > cerulion topic bw [--window N] [--local] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `--window N` | `100` | How many of the newest messages the figure covers, from 2 to 100000. | > > Prints, once a second, the bytes per second of the topic's payloads over the window, with their mean, smallest and largest size. On the `obstacle_avoidance` starter's laser scan: > > ```bash theme={null} > cerulion topic bw /obstacle_avoidance/laser_scanner/scan > ``` > > ```text theme={null} > bandwidth: 39.65 KB/s, mean: 793 B, min: 793 B, max: 793 B, window: 100 > ``` > [accordion] cerulion topic pub > > Publish a message given as JSON or YAML. > > ```text theme={null} > cerulion topic pub [--times N] [--rate HZ] [--wait-subscribers SECS] [--local] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `` | | `package/Type` or `package/msg/Type`. | > | `` | | The message as a JSON or YAML mapping. | > | `--times N` | `1` | How many frames to publish. | > | `--rate HZ` | `1` | Publish rate when `--times` is above 1. | > | `--wait-subscribers SECS` | `2` | How long to wait for a first subscriber before publishing. | > | `--local` | off | Publish on local shared memory only: no remote type lookup and no LAN offer. | > > By default it publishes one message. Topics are single-writer, so a topic a graph already publishes is not one to publish into. > > > [!WARNING] > > > > A message you publish reaches every subscriber of the topic, a robot's controller included. Try it on a topic nothing acts on, such as a status topic of your own. > > ```bash theme={null} > cerulion topic pub /demo/status std_msgs/String '{"data": "ready"}' > ``` > [accordion] cerulion topic snapshot > > Save the newest frame of a camera topic as a JPEG. > > ```text theme={null} > cerulion topic snapshot [-o PATH] [--timeout SECS] [--quality Q] [--local] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `-o` / `--output` | a new file in a new private directory under the system temp directory | Where to write the JPEG. | > | `--timeout` | `5` | Seconds to wait for a frame. | > | `--quality` | `80` | JPEG quality, 1 to 100. | > > ```bash theme={null} > cerulion topic snapshot /camera/image_raw -o camera.jpg > ``` ## service ```text theme={null} cerulion service call [request] [--timeout SECS] ``` | Arg / flag | Default | Meaning | | - | - | - | | `` | | Service name, for example `/controller_manager/list_controllers`. | | `` | | Service type: `package/srv/Type` or `package/Type`. | | `[request]` | `{}` | The request as a JSON or YAML mapping. | | `--timeout` | `5` | Seconds to wait in total for a server and its response. | Calls a service once and prints its response as JSON. ```bash theme={null} cerulion service call /controller_manager/list_controllers controller_manager_msgs/srv/ListControllers ``` ## schema > [accordion] cerulion schema create > > Create a workspace schema file. > > ```text theme={null} > cerulion schema create > ``` > > Writes `schemas/.yaml` — the name verbatim, no case change — holding a `schemas:` skeleton whose single entry key is the PascalCased name. `cerulion schema create detections` writes `schemas/detections.yaml` containing a `Detections:` entry. See [Graph and schema files](/cerulion/reference/graph-and-schema-files). > > ```bash theme={null} > cerulion schema create detections > ``` > [accordion] cerulion schema delete > > Delete a workspace schema. > > ```text theme={null} > cerulion schema delete > ``` > > Built-in ROS 2 messages cannot be deleted. > [accordion] cerulion schema info > > Show a schema's fields, wire size, and hash. > > ```text theme={null} > cerulion schema info > ``` > > Prints the recursive field tree marking fixed and variable fields, the fixed wire size, the schema hash, and where the definition came from. It resolves four sources, in this order: your workspace's `schemas/*.yaml`, your workspace's `.msg` store (`schemas//msg/.msg`), the built-in ROS 2 types, and a connected robot's own types. The `source:` line names which one answered. > > ```bash theme={null} > cerulion schema info sensor_msgs/Image > ``` > [accordion] cerulion schema list > > List available schemas. > > ```text theme={null} > cerulion schema list > ``` > > Prints your workspace schemas, then your workspace's `.msg` store, then every built-in ROS 2 message grouped by package. A built-in that a `.msg` store entry overrides is listed as ` (shadowed by msg store '')`. ## bag Recording and replay. See [Record and replay a run](/cerulion/guides/record-and-replay). > [accordion] cerulion bag record > > Record live local topics into a bag. > > ```text theme={null} > cerulion bag record [TOPIC]... [-a] [-e PATTERN] [-x PATTERN] [-o PATH] > [--duration SECS] [--schema-wait-ms MS] [--run[=RUN]] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `TOPIC...` | | Topics to record. A named topic that is not live here is refused by name. | > | `-a` / `--all` | off | Record every live local topic. | > | `-e` / `--regex` | | Record live local topics matching this regex. | > | `-x` / `--exclude` | | Drop selected topics matching this regex. Repeatable. | > | `-o` / `--out` | `recording.mcap` | Where to write the bag. One recording is one file. | > | `--duration` | until `Ctrl+C` | Stop after this many seconds. | > | `--schema-wait-ms` | `2000` | How long to wait for each topic's first frame before creating the bag. | > | `--run[=RUN]` | off | Attach to a live `cerulion graph run`, so the bag describes that run — its graph, environment, and declared topics. Name a run when several are live. | > > This records topics from **this machine's** shared memory, including topics already mirrored onto it; to record the robot, run it on the robot and copy the file afterwards. The capture is observability-grade: each channel carries the real wire hash but no schema name, which is everything `bag play` needs and enough for `topic echo` to decode from the workspace schema store. > > `--resim` compatibility is not claimed for a `bag record` bag, `--run` included. A standalone capture carries frames and no scheduler trace at all; a `--run` attach does carry the run's effective graph, environment, manifests and a trace from its attach point, but its descriptors are still observability-grade. When you know you will re-execute, record the run with `graph run --record`. > > ```bash theme={null} > cerulion bag record -a -o session.mcap --duration 30 > ``` > [accordion] cerulion bag info > > Inspect a bag. > > ```text theme={null} > cerulion bag info > ``` > > ```bash theme={null} > cerulion bag info recordings/perception_20261111T191950Z.mcap > ``` > > The report opens with: > > ```text theme={null} > bag: recordings/perception_20261111T191950Z.mcap > state: finalized > frames: 1212 across 2 topic(s); span 19.965s > > TOPIC FRAMES MAX BYTES SCHEMA > /perception/detector/detection 606 134 geometry_msgs/PoseStamped > /perception/sensor/image 606 123 sensor_msgs/Image > ``` > > It continues with `record coverage` (which topics the recorder tapped, declared or discovered) and `node state` (the state records a mid-run resume reads). > > A bag that carries a recorder health attachment also gets an `absorbance` block: per topic, whether the queue its recording tap was given holds that topic's frames through the run's own worst drain gap. Every topic with a verdict is counted; only the actionable ones are named — short, no claim, a stall the drain-gap histogram cannot rank, a pass on a floor rate, or a topic that fell short earlier and recovered. On a flashback capture the block describes the recorder that took the capture, over its whole run, not the captured window. See [Record and replay a run](/cerulion/guides/record-and-replay#read-the-absorbance-verdict). > [accordion] cerulion bag play > > Play a bag back, optionally re-executing your nodes. > > ```text theme={null} > cerulion bag play [--resim {all|NODES}] [--verify] [-r N] [--loop] > [--topics TOPIC]... [-u DURATION] [-s START_OFFSET] > [--report PATH] [--tolerance PATH] [--strict-state] > ``` > > | Flag | Default | Meaning | > | - | - | - | > | `--resim` | off (plain playback) | Re-execute the recorded run against your current node builds. `all` resimulates every node; a node subset is not supported yet and is refused by name. | > | `--verify` | off | Compare every produced frame with the recording byte-for-byte and exit non-zero on divergence. | > | `-r` / `--rate` | `1` | Playback rate multiplier. | > | `--loop` | off | Replay continuously. | > | `--topics` | all | Restrict playback to these topics. Repeatable. | > | `-u` / `--duration` | whole bag | Stop after this much bag time. | > | `-s` / `--start-offset` | `0` | Skip this much bag time before starting. | > | `--report PATH` | | Write a machine-readable comparison report. Requires `--verify`. | > | `--tolerance PATH` | | Per-field tolerances for fields that may legitimately differ. Requires `--verify`. | > | `--strict-state` | off | Refuse the re-execution unless every executed node's state was restored. Inert on a bag that begins at the start of a run, where every node starts from its constructor. | > > > [!NOTE] > > > > `--report` and `--tolerance` need `--verify`, not merely `--resim`. A bare `--resim all` re-executes the graph without comparing anything, so there is no verdict for either flag to describe, and the command refuses rather than writing an empty report. > > Replay is network-inert by construction: the bag is the input. > > ```bash theme={null} > cerulion bag play recordings/perception_20261111T191950Z.mcap --resim all --verify > ``` > > ```text theme={null} > replay PASS: recordings/perception_20261111T191950Z.mcap (1222 tick(s) replayed, 2/2 topic(s) matched byte-for-byte and were credited) > ``` > > Counts depend on your recording. With `--verify` the exit code is `0` for a pass, `1` for a data violation, `2` for a bag that is not replay-grade or is corrupt, `3` for a node that failed to load or panicked, `4` for a tolerance-file error, `5` for an internal error, and `6` when the re-executed schedule diverged. > [accordion] cerulion bag migrate > > Rewrite an older bag so `--resim` accepts it. > > ```text theme={null} > cerulion bag migrate [-o PATH] [--dry-run] [--yes] > ``` > > Writes a **new** bag whose embedded graph has keys the graph format does not define taken out, listing every key it removes and asking first (`--yes` writes without asking, and is required when stdin is not a terminal; `--dry-run` writes nothing). It also rewrites frames that carry an older wire header with the current one, even when the graph already parses. The input bag is never modified, and every other frame and attachment is copied through unchanged. A bag whose graph already parses and whose frames already carry the current header is refused: there is nothing to migrate. > > ```bash theme={null} > cerulion bag migrate recordings/old_run.mcap --dry-run > ``` ## flashback ```text theme={null} cerulion flashback [--note TEXT] [--pin] [--no-wait] ``` | Flag | Default | Meaning | | - | - | - | | `--note TEXT` | | Attach a note to the capture. | | `--pin` | off | Mark the capture as kept, so routine cleanup leaves it alone. | | `--no-wait` | off | Return immediately instead of waiting for the trailing window to finish. | Captures roughly the last 30 seconds plus the next 15 seconds of every serving graph on this machine into `recordings/flashbacks/`. There is nothing to arm in advance — a live run already holds the rolling window. `CERULION_FLASHBACK=off` turns the capture plane off. ```bash theme={null} cerulion flashback --note "gripper stalled on the third pick" ``` ## viz Early access ```text theme={null} cerulion viz [TOPIC|TOPIC=SCHEMA]... [--robot NAME] [--connect LOCATOR]... [--listen LOCATOR]... [--detach] ``` | Flag | Default | Meaning | | - | - | - | | `TOPIC...` | every decodable local topic | Topics to visualize. `TOPIC=SCHEMA` pins the schema for a topic whose type cannot be inferred. | | `--robot NAME` | local | Visualize a remote robot's topics instead of local ones. | | `--connect` / `--listen` | | Extra locators for reaching that robot. Repeatable. Both require `--robot`. | | `--detach` | off | Attach the topics to the visualization daemon and return, leaving the daemon running. Without it, `viz` stays attached until `Ctrl+C`. | `cerulion viz` attaches topics to the `cerulion-vizd` visualization daemon, which is in early access and is not part of the standard download. The command opens no viewer itself; the viewer is also in early access. [Book 30 minutes with us](https://link.cerulion.com/book/docs) to get access. ```bash theme={null} cerulion viz /perception/sensor/image ``` ## connect ```text theme={null} cerulion connect [ROBOT] [--eid HEX] [--addr IP:PORT] [--topic TOPIC]... [--all] [--key-file PATH] [--schemas-dir DIR] [--relay-url URL] [--relay-disabled] [--network off] ``` | Flag | Default | Meaning | | - | - | - | | `ROBOT` | | A 64-character hex endpoint id, or a robot name pinned in `~/.cerulion/robots.toml` (a `[robots]` table with one `name = "<64-hex-eid>"` line per robot). | | `--eid HEX` | | Connect by endpoint id instead of a name. | | `--addr IP:PORT` | discovery | Dial a direct address. | | `--topic TOPIC` | | Demand one topic. Repeatable. | | `--all` | off | Demand every topic in the robot's catalog. | | `--key-file PATH` | this machine's key, `~/.cerulion/identity/device.key` (also named `~/.cerulion/desk.key`) | Desk key to authenticate with. `cerulion login` creates it. With no key file at all, an ephemeral key is used, which a robot refuses. | | `--schemas-dir DIR` | | Extra directory of schema definitions for decoding. | | `--relay-url URL` / `--relay-disabled` | relay allowed | Control relay use when a direct path is unavailable. | | `--network off` | on | Kill switch: refuse to connect. | Demanded topics are re-injected into your machine's shared memory, so `cerulion topic echo` and `topic hz` see them like local topics. With no `--topic` and no `--all`, it prints the robot's catalog and demands nothing. The robot admits only a machine on its access list. Sign the robot and this machine in to the same account with `cerulion login`: the robot adds this machine to its access list the first time this machine's network daemon reads one of the robot's topics, and `connect` is admitted after that. ```bash theme={null} cerulion connect lab-go2 --topic /go2/utlidar/cloud ``` ## ros2 ```text theme={null} cerulion ros2 run [ARGS...] cerulion ros2 launch [ARGS...] cerulion ros2 migrate [--workspace DIR] [--write] [--yes] cerulion ros2 attach --iface IP [--domain N] [--timeout SECS] [--dry-run] [--yes] [--graph-name NAME] [--topic-prefix PREFIX] [--robot-name NAME] ``` The ROS 2 interop family: `run` and `launch` put stock ROS 2 entry points on Cerulion transport, `migrate` rewrites a colcon workspace's C++ publish sites to the loaned-message API, and `attach` bridges a robot that is already running ROS 2. ### run and launch Runs a stock ROS 2 entry point on Cerulion transport — swap the command, not the stack. `ros2 run demo_nodes_cpp talker` becomes `cerulion ros2 run demo_nodes_cpp talker`; `ros2 launch my_robot_bringup camera.launch.py` becomes `cerulion ros2 launch my_robot_bringup camera.launch.py`. Unix only. Everything after `run` or `launch` is forwarded to the native `ros2 run` / `ros2 launch` untouched (hyphenated flags, the package form, launch arguments), except Cerulion's own leading flags, given right after `run` or `launch`: `--record-deliveries ` (both verbs) records what each ROS 2 process consumed, and `--replay-deliveries ` (`run` only) replays one recorded process; see [Replay a ROS 2 process](/cerulion/guides/replay-a-ros2-process). Apart from those, the argument surface *is* ROS 2's, so consult `ros2 run --help` / `ros2 launch --help`, and a bad package name or a missing launch file is `ros2`'s own error. `rmw_cerulion` is tested in CI on ROS 2 Foxy, Galactic, Humble, Jazzy and Lyrical. The Linux packages and archives carry a library built for Jazzy, and Lyrical's library is the separate `cerulion-rmw-lyrical` download; build it for another distro from source with `tools/scripts/build_rmw.sh `. Jazzy is the distro it has run on a robot with. `ros2 topic list` and `rqt` do not see topics that run on Cerulion's transport; use `cerulion topic list`. > [!WARNING] > > `--adopt-take` in the leading position is refused rather than forwarded: it exits `69`, and `CERULION_RMW_ADOPT_TAKE` set in the environment exits `2`. `ros2` is a Python CLI that spawns your node as a further subprocess with `close_fds=True`, so the heap hook these launchers hand over never reaches the node and every take would be served by a copy; the refusal is there so you do not get the flag's name without its effect. For zero-copy plain takes, launch the node executable directly with the hook preloaded and `CERULION_RMW_ADOPT_TAKE=1` (Linux/glibc only). Before forwarding, Cerulion stages the child environment: | Variable | What is staged | | - | - | | `RMW_IMPLEMENTATION` | `rmw_cerulion`. | | `LD_LIBRARY_PATH` | The Cerulion library directory prepended. It is the directory holding the `cerulion` binary, or `CERULION_LIB_DIR` when set. | | `AMENT_PREFIX_PATH` | A minimal ament prefix prepended, whose `lib/librmw_cerulion.so` links the Cerulion library so ROS 2 can load it. Staged under `~/.cerulion/ros2/` unless the library directory is already an install's `lib/`. | | `LD_PRELOAD` | Set only when `libcerulion_heaphook.so` sits beside the library, or when `CERULION_ROS2_PRELOAD` names a library. See [Environment variables](/cerulion/reference/environment-variables). | Cerulion then **`exec()`s** `ros2 [ARGS...]`: the process *becomes* `ros2`, so stdout, stderr, Ctrl+C, and the exit code pass through the kernel untouched, and a successful exec inherits `ros2`'s own exit code. The nodes keep their ROS names. A ROS 2 publisher on `/camera/image_raw` is the Cerulion topic `/camera/image_raw` — the fully-qualified name verbatim, leading slash included, for topics and for services alike. Nothing is prefixed, stripped, or aliased, so a native `#[input]` whose `source:` is `/camera/image_raw` reads that publisher directly, and a recording of the run carries the topic under the name ROS 2 uses. Each ROS 2 publisher also registers its topic with the machine's network plane, so once that plane is up the topic is announced and a remote desk can demand it like a native node's output — see [Reach remote robots](/cerulion/guides/network-and-remote-robots). Registration is best-effort and never blocks local ROS 2 pub/sub: a topic that could not be registered stays local-only and says so in a warning. Subscriptions register nothing, and a registration is not withdrawn when a publisher is destroyed — the topic stays announced, with no producer behind it, for the life of the process. Exit codes belong to Cerulion only when it never reached the exec: `69` `librmw_cerulion.so` missing (the message carries the build command and the override), or `--adopt-take` given · `127` `ros2` not on `PATH` · `2` a usage error, such as a bare `cerulion ros2`, or `CERULION_RMW_ADOPT_TAKE` set in the environment · `1` any other pre-exec failure. ```bash theme={null} cerulion ros2 launch my_robot_bringup camera.launch.py use_sim_time:=false ``` To bring stock ROS 2 nodes up *alongside* native Cerulion nodes from one graph file, declare them as `ros2:` entries and run `cerulion graph run` — see [Graph and schema files](/cerulion/reference/graph-and-schema-files). ### migrate Rewrites this colcon workspace's C++ publish call sites to the ROS 2 loaned-message API (`borrow_loaned_message()` → fill → `publish(std::move(loaned))`) wherever a clang AST prover shows the rewrite is behavior-preserving. It is an AST transform over the workspace's `compile_commands.json`, never a regex; anything it cannot prove lands in a manual-candidates report with the reason. `rclpy` nodes are report-only, because `rclpy` has no loaned-message API upstream. | Flag | Default | Meaning | | - | - | - | | `--workspace DIR` | `.` | The colcon workspace root — the directory holding `src/` and `build/`. | | `--write` | off (dry run) | Apply the migration behind a consent gate. | | `--yes` | off | Skip the interactive confirm. Only meaningful with `--write`. | Migrating does not couple your workspace to Cerulion: `rclcpp` falls back to allocate-and-copy when the rmw cannot loan. > [!WARNING] > > Initialization is not identical on every rmw, and the rewrite compensates. `make_unique()` value-initializes, so every field your code does not write holds its declared default (a `Quaternion`'s `w=1`, zeros elsewhere). A loaned message is only initialized if the rmw does it, and `rmw_fastrtps` — the ROS 2 default — does not. The rewrite therefore emits `.get() = ();` right after the borrow, so every field you do not write keeps the default `make_unique` gave it, on every rmw, for the cost of one value-init store. **Dry run is the default.** It prints the full unified diff and the candidates report, and refreshes the machine-readable manifest at `.cerulion/ros2-migrate-manifest.json` — the only thing it writes. `--write` refuses a dirty git tree, then writes one commit plus `cerulion-ros2-migration.patch` and runs `colcon build --packages-select` over the affected packages. Undo with `git revert `, or `git apply -R cerulion-ros2-migration.patch`. If a `pre-commit` hook stages paths of its own, it stages them inside `git commit` — after this verb's index check — so they land in the migration commit; the run warns and names them, and `git apply -R` is then the safe undo, because it reverses only the migration's own edits. Requires a compile database (`colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) and the migration engine binary `cerulion-ros2-migrate-clang`, found beside the `cerulion` binary, on `PATH`, or via `CERULION_ROS2_MIGRATE_TOOL`. Exit `69` with build instructions when it is absent. ```bash theme={null} cerulion ros2 migrate --workspace ~/robot_ws ``` ### attach | Flag | Default | Meaning | | - | - | - | | `--iface IP` | | Required. Interface address to discover DDS traffic on. | | `--domain N` | `0` | ROS 2 domain id. | | `--timeout SECS` | `5` | How long to listen for participants. | | `--dry-run` | off | Print the discovery report and stop, without writing or running the bridge. Runs from any directory; outside a workspace it uses a temporary directory, so `TMPDIR` must be writable. | | `--yes` | off | Skip the confirmation before writing files and running. | | `--graph-name NAME` | `attach` | Name for the generated graph. | | `--topic-prefix PREFIX` | | Prefix applied to the bridged topics. | | `--robot-name NAME` | hostname | Namespace prefix written as the generated graph's `prefix:`. The name announced on the network is `CERULION_ROBOT_IDENTITY`, or the hostname. | Discovers a ROS 2 system's topics, generates `graphs/.yaml` plus a bridge configuration for the ones whose types resolve, and runs the bridge. See [Bridge a ROS 2 system](/cerulion/guides/bridge-ros2). Every run's report ends with a `MIGRATION` section — there is no flag for it, and `--dry-run` prints it too. It groups the discovered processes (one DDS participant each) by what a restart under `rmw_cerulion` would buy: restartable today, when every message type on the process's endpoints resolves locally; restartable once consent writes the schemas this attach resolved; or stays bridged, with the unresolvable types named. Endpoints with no `ros_discovery_info` record are counted as topics, not processes, and are reported as absence of evidence — a vendor or raw-DDS process, or a node table the window did not observe. ROS plumbing endpoints (parameter services, `/rosout`, `/parameter_events`, `ros_discovery_info`) are excluded from the judgment. The section then prints the equivalent `cerulion ros2 launch` line, a paste-ready `ros2:` graph block with ``/`` placeholders, the bridged-versus-native cost facts, and a closing pointer at `cerulion ros2 migrate`. It is rendered from the discovery data already in hand: no extra network, no change to the outcome or exit code. ```bash theme={null} cerulion ros2 attach --iface 192.168.1.42 --dry-run ``` ## login and account ```text theme={null} cerulion login cerulion logout cerulion account devices list cerulion account devices revoke ``` `cerulion login` signs this machine in with a device-code flow: it prints a short code and a verification URL, then waits for you to authorize it in a browser on any machine. Commands run under an account: on a machine that has never signed in, the first command that needs one runs the same flow when it is at a terminal, and anywhere else exits with code `7`. `--version`, `--help`, `completions`, `doctor`, `clean`, `telemetry` and `logout` work before you sign in. `cerulion logout` signs this machine out: it removes the session from this machine and asks the account service to revoke it, then prints `signed_out: account=`, or `not_signed_in` when there was no session. It exits 1 when the local sign-in file could not be rewritten, or when the machine was signed out but the service did not confirm the revoke; the session then stays valid at the service until it expires. `account devices` lists and revokes the machines registered to your account. Robot access management lives on the web account page, not the CLI. ```bash theme={null} cerulion account devices list ``` ## completions ```text theme={null} cerulion completions ``` Shells: `bash`, `elvish`, `fish`, `powershell`, `zsh`. Completion covers subcommands, flags, and enum values, plus live names: topics, node types, graph names, schemas, robots pinned in `robots.toml` or seen on the LAN, and `.mcap` files. A completion never opens the network. For zsh, add two lines to `~/.zshrc`. The generated script ends in `compdef`, which only exists once `compinit` has run, and the macOS system `zshrc` never runs it: ```bash theme={null} echo 'autoload -Uz compinit && (( $+functions[compdef] )) || compinit' >> ~/.zshrc echo 'source <(COMPLETE=zsh cerulion)' >> ~/.zshrc ``` The second line regenerates the completion code each time a shell starts, so it keeps up with upgrades. Writing `cerulion completions zsh` into a file also works, but that file names the binary's path, so regenerate it after an upgrade. ## tui ```text theme={null} cerulion tui ``` An interactive dashboard with Nodes, Topics, and Echo tabs. Quit with `q`. ## trace ```text theme={null} cerulion trace inspect [-t TOPIC] [-n LIMIT] [-r] ``` Prints one line per record, ` seq= t=ns schema=0x`, from the JSONL publish trace (`trace_*.jsonl`) in a directory. `-t` restricts to one topic by exact name, `-n` limits the count, and `-r` reverses to most-recent-first. This is not the MCAP bag; for recordings use `cerulion bag`. ```bash theme={null} cerulion trace inspect ./traces -n 50 ``` ## clean ```text theme={null} cerulion clean [--report-only] ``` Removes the bookkeeping dead Cerulion processes left behind; live nodes are left alone. Reach for it when a graph's topic topology changed between runs and topics look missing. It needs no account and reaches no network. `cerulion clean --report-only` deletes nothing: it lists what a plain `cerulion clean` would remove and ends with `Report only: nothing was removed.` When the dead-node sweep cannot clear every dead node, `clean` reports the leftover shared-memory state but does **not** reclaim it: a dead node that is still registered needs its state to be reaped later, so removing it would strand that node for good. Clear the reported failures, then run `cerulion clean` again. You rarely need this command — `graph run` sweeps dead nodes at start, and cleans up again when the graph exits normally. ```bash theme={null} cerulion clean --report-only ``` ## doctor ```text theme={null} cerulion doctor [--json] [--local] [--check ID]... [--udp-target HOST:PORT]... [--timeout-ms MS] ``` | Flag | Default | Meaning | | - | - | - | | `--json` | off | Print the report as one JSON object on stdout instead of the table. | | `--local` | off | Skip the checks that use the network (`net.mdns`, `net.udp`). `CERULION_NETWORK=off` does the same. | | `--check ID` | every check | Run only this check. Repeatable. An unknown id is a usage error. | | `--udp-target HOST:PORT` | | A QUIC endpoint for the UDP check to probe, beside the `quic/` connect locators of the workspace's graphs. Repeatable. | | `--timeout-ms MS` | `4000` | How long to wait for the checks. A check that has not answered by then is reported as a warning. | Checks this machine for problems that slow or stop Cerulion: open-file limits, shared memory, stale nodes, disk space for recordings, sign-in state, clock sync, the ROS 2 library, the network daemon, and more. Each check reports `pass`, `info`, `warn`, `fail` or `skip`, and every `warn` and `fail` says why it matters and the exact command or edit that fixes it. No check needs root, and none writes a file or changes a system or network setting. It runs on a machine that has never signed in. Exit `0` when no check failed (warnings included), `1` when any check failed, `2` for a usage error. ```bash theme={null} cerulion doctor ``` An excerpt from a macOS host: ```text theme={null} PASS clock.sync synchronised; the kernel bounds the error at 297686 us (estimate 500000 us), last offset 0 ns SKIP cpu.governor not applicable: the governor files are a Linux cpufreq interface SKIP ros.rmw not applicable: ROS 2 Jazzy publishes no macOS binaries, so `cerulion ros2 run` needs a Linux machine 4 pass, 4 info, 1 warn, 0 fail, 9 skip ``` ## telemetry ```text theme={null} cerulion telemetry status cerulion telemetry on cerulion telemetry off ``` Release builds of the CLI can send coarse usage events: which command ran, its exit code and a duration bucket. Never sent: command arguments, file or directory names, paths, topic, node, graph or robot names, URLs, email addresses, or message contents. Telemetry is on unless you turn it off, and any one of these turns it off: ```bash theme={null} cerulion telemetry off # saved for this machine export DO_NOT_TRACK=1 export CERULION_TELEMETRY=0 # or false, off, no ``` `cerulion telemetry status` prints whether telemetry is on and which setting decided it, for example `telemetry: on (default)`. Once this machine has signed in, events carry your account id; before that, a random id. The first command that could send prints a one-line notice and sends nothing in that run. A build from source sends nothing unless it was built or run with a telemetry key. Robot and runtime code (the graph runtime, the transport, the recorder, the network daemons, and your nodes) never sends anything, and no CLI command sends while the run is local-only (`CERULION_NETWORK=off`, `--network off`, or `--local`). `telemetry` itself works without signing in. The full list of events is at [cerulion.com/telemetry](https://cerulion.com/telemetry). ## Related > [card] [Node macro](/cerulion/reference/node-macro) > > Every macro and field attribute available to a node author. > [card] [Graph and schema files](/cerulion/reference/graph-and-schema-files) > > Every key in graph and schema YAML. > [card] [Environment variables](/cerulion/reference/environment-variables) > > Logging, networking, recording, and runtime tuning variables. > [card] [Connect an MCP client](/cerulion/guides/connect-an-mcp-client) > > **Early access.** Connect an AI client to the hosted Cerulion MCP and Hindsight endpoints. # Environment variables Source: https://docs.cerulion.com/cerulion/reference/environment-variables The environment variables you are most likely to set: logging, networking, recording, execution, telemetry, and live-run tuning. All of these are optional. Defaults, and what happens on a bad value, are given per variable. ## Logging | Variable | Meaning | | - | - | | `RUST_LOG` | Standard log filter, for example `RUST_LOG=cerulion=info,iceoryx2=warn`. A new workspace's `.cargo/config.toml` sets a sane default. | | `IOX2_LOG_LEVEL` | The transport's own log filter. New workspaces default it to `error` so framework chatter does not drown out your logs. | Node logs are worth one note of their own. A node runs as a loaded library with its own log dispatcher, so `tracing::info!` from your `tick()` goes to **stderr** while the host's own logs go to stdout. The filter is `RUST_LOG` as captured when the graph started, an empty value means `info`, and `RUST_LOG=off` silences node-side logs entirely. > [!WARNING] > > Do not install a global `tracing` subscriber inside node code — the framework installs one before your node runs, and a second install panics and fails the node load. Control output with `RUST_LOG` instead. ## Networking | Variable | Meaning | | - | - | | `CERULION_NETWORK=off` | Run local-only: no gateway process, nothing crosses the machine boundary. Honored by every entry point, and equivalent to `--network off`. | | `CERULION_LAN_ACCESS` | Who may demand this machine's topics over the open LAN plane, read by `cerulion-netd` and the `graph run` gateway. Unset or `paired`, the default, refuses every topic demand over that plane; computers on your account read this machine's topics through the authenticated remote plane instead. `open` allows unauthenticated LAN access: set it for every Cerulion command and daemon on every machine of that LAN, and restart `cerulion-netd` on each. Any other value warns and stays `paired`. | | `CERULION_NETD_LISTEN` | The locators the machine's LAN plane binds, for example `tcp/0.0.0.0:7683`, for an intentionally open LAN (`CERULION_LAN_ACCESS=open`). A robot on your account needs none: authenticated serving starts on the first live export without it. Without it the LAN plane binds nothing and the machine advertises nothing over mDNS. Setting it also makes the plane **standing**: it comes up when the machine's network daemon starts, so topics registered at runtime, such as the topics a ROS 2 process publishes, are advertised on the network without a graph ever running, and the daemon stops only on `SIGINT`/`SIGTERM` instead of self-exiting once nothing has demanded a topic for the idle grace. | | `CERULION_NETD_NETWORK=off` | Force the machine's shared network plane strictly local-only, whatever `CERULION_NETD_LISTEN` says. Only the exact value `off` engages it. `topic list`, `topic echo`, `topic hz`, `topic info` and `schema info` honor it too and stay local. It never changes what a graph run on the same machine does. | | `CERULION_MULTICAST_SCOUTING` | `on` turns zenoh multicast scouting on. It is off by default: on an open LAN, peers are found through mDNS, the peer cache and the configured hostnames, and robots on your account are found through your account. Set it on every machine that should find or be found on a network where mDNS does not cross but multicast does. A running daemon picks up a change only when it restarts. | | `CERULION_GATEWAY_PORT` | Override the well-known gateway port (`7683`). Parsed strictly. | | `CERULION_ROBOT_IDENTITY` | The robot name announced on the network. Defaults to the hostname. | | `CERULION_PEERS` | Extra robots to try when discovering, as a comma-separated `host[:port]` list, for example `robot-a:7683,robot-b:7683`. For a one-off, `--connect tcp/:7683` on the command is simpler. | | `CERULION_HOME` | The Cerulion config directory, used instead of `~/.cerulion`: sign-in state, the machine key, pinned robots and peers. Empty counts as unset. Use it to keep a test rig or a second identity apart on one machine. | ## Recording and capture | Variable | Meaning | | - | - | | `CERULION_FLASHBACK=off` | Turn the Flashback capture plane off, so no run holds a rolling window. | | `CERULION_FLASHBACK_DIR` | Where captures land. Defaults to `recordings/flashbacks/`, relative to the directory the graph was run from. | | `CERULION_RECORD_DISCOVERY=off` | With `graph run --record`, record only the graph's declared topics instead of also discovering other live producers. | | `CERULION_RECORD_DISCOVERY_SETTLE_MS` | How long bag creation waits for late producers to appear. | ## Visualization | Variable | Meaning | | - | - | | `CERULION_VIZD_SOCK` | Path of the control socket the visualization daemon listens on. Set it on both the daemon and its clients to run a scene at a non-default location. | ## ROS 2 on Cerulion transport Read by [`cerulion ros2 run` / `cerulion ros2 launch`](/cerulion/reference/cli#ros2) and by `graph run` for a graph's `ros2:` entries — every path stages the same child environment. | Variable | Meaning | | - | - | | `CERULION_LIB_DIR` | The directory holding `librmw_cerulion.so`, instead of the directory of the `cerulion` binary. It is prepended to the ROS 2 child's `LD_LIBRARY_PATH`, and a minimal ament prefix linking the library is staged under `~/.cerulion/ros2/` (or the directory is used as-is when it already is an install's `lib/`) and prepended to `AMENT_PREFIX_PATH`. A missing library is exit `69` with the remediation, never a silent fall-through to the stock RMW. Set but empty is an error. | | `CERULION_RMW_EVENT_WAIT` | Read inside the ROS 2 process itself, by the Cerulion RMW layer. A waiting executor blocks on the transport's own wake channels, so a publish wakes it in microseconds; `off` restores the earlier behavior, where the wait probed for new messages every 100 microseconds instead. `on`, empty, or unset is the default, and any other value warns once and keeps the event-driven wait. | | `CERULION_RMW_SLICE_CEILING` | Read inside the ROS 2 process itself: per-type payload ceilings for the shared-memory slots its publishers create, as a comma-separated `:` list, for example `sensor_msgs/Image:33554432,my_pkg/Big:268435456`. Without it, a variable-length ROS 2 type takes the same per-type budget Cerulion gives one of its own outputs of that schema, and a type Cerulion does not know takes 128 MiB. An override wins outright, so it can widen or narrow. Names must be exactly `pkg/Type`: never `pkg::Type` (the `:` separates the name from the bytes) and never the rosidl `pkg/msg/Type`. Bytes must be an integer from `40` to `4294967295`. A malformed entry warns and is skipped while the entries around it still apply; duplicate entries for one type warn and the last one wins. The value is read once per process, at the first publisher creation. The ceiling is the real slot size, so a message larger than it fails to publish loudly instead of reserving a blanket slot. An entry naming a fixed-size type is ignored with a warning: those are always sized exactly at their wire size. | | `CERULION_ROS2_PRELOAD` | Preload control for the ROS 2 child. Unset — the default — auto-injects `libcerulion_heaphook.so` into `LD_PRELOAD` when it exists beside `librmw_cerulion.so`, logging one line naming what it injected. With the hook injected, a ROS 2 publisher whose message type carries an unbounded numeric sequence — `sensor_msgs/Image.data`, `sensor_msgs/PointCloud2.data`, `sensor_msgs/LaserScan.ranges` — can loan messages, so filling that field writes into the shared-memory slot the message publishes from instead of a heap buffer that is copied. Bounded sequences, `bool[]`, and fields declared with a default value are copied at publish as before. `off` or `none` disables preload injection entirely, and those fields go back to being copied. Any other value is a path to a `.so` that is **added**, not substituted: `LD_PRELOAD` becomes `::`. A path that does not exist is exit `69`; an empty value is an error. Injection is never silently dropped. | | `CERULION_RMW_ADOPT_TAKE` | Read inside the ROS 2 process itself. `1` arms adopt-take for every subscription whose type is forgeable: a plain take serves the shared-memory bytes in place, and the application's own `free()` of each sequence releases the sample. `0` or unset disarms; any other value warns once and disarms. A child staged by `cerulion ros2 run` or `ros2 launch` never has it set — those verbs refuse the flag with exit `69` and refuse this variable with exit `2` — so set it on a node you launch directly, with `libcerulion_heaphook.so` preloaded. Armed with the hook inactive, adopt-take stays off with one warning rather than quietly copying. Linux with glibc only. | | `CERULION_RMW_ADOPT_TAKE_BUDGET` | Read inside the ROS 2 process itself: a positive integer capping how many samples one subscription may hold adopted at once. Unset uses the built-in borrow budget; anything that is not a positive integer warns and uses the default. A take past the budget is a refusal, not a copy — `rmw_take` returns success with nothing taken and the frame stays queued — so a caller holding messages faster than it frees them sees empty takes rather than degraded ones. Freeing any one adopted message lets the next take through. | | `CERULION_ROS2_MIGRATE_TOOL` | Path to the `cerulion-ros2-migrate-clang` engine binary that [`cerulion ros2 migrate`](/cerulion/reference/cli#ros2) shells out to. Without it the verb looks beside the `cerulion` binary and then on `PATH`; finding it nowhere is exit `69` with build instructions, never a silently inert analysis. | | `CERULION_HEAPHOOK_DEBUG` | Read by the preloaded `libcerulion_heaphook.so` itself (Linux with glibc). Set it to any non-empty value other than `0` and the library writes one line to stderr as it loads, confirming that it loaded and that it took effect. Unset, empty, or `0` prints nothing. It is a diagnostic: a stock ROS 2 process installs no Cerulion log subscriber, so this line is how you confirm the preload actually reached the child. If another allocator — jemalloc, tcmalloc, or a sanitizer — is preloaded ahead of it, the library says so on stderr as it loads whether or not this variable is set, and stays out of the way. | ## Multi-process execution | Variable | Meaning | | - | - | | `CERULION_EXECUTION_MODE` | How the worker processes of a multi-process `graph run` coordinate their steps. Unset or `free_run` is the default: each worker steps on its own clock, with no shared barrier. `lockstep` makes every worker advance behind a shared per-step barrier. A recording stamps which mode it ran in, and `bag play --resim` follows it. Any other value warns and keeps the default. | ## Telemetry | Variable | Meaning | | - | - | | `DO_NOT_TRACK` | `1` or `true` turns usage telemetry off. Checked first. | | `CERULION_TELEMETRY` | `0`, `false`, `off` or `no` turns usage telemetry off; exactly `1` turns it on. Any other value is ignored. Checked after `DO_NOT_TRACK` and before the setting `cerulion telemetry on` or `off` saved. See [`cerulion telemetry`](/cerulion/reference/cli#telemetry). | ## Live-run tuning These affect how the live loop idles and how work is spread across cores. Reach for them when you are chasing latency, not before. | Variable | Meaning | | - | - | | `CERULION_MONITOR_WAIT` | `1` forces the live-loop CPU park on, `0` disables it. The default is on for live runs. `--no-monitor-wait` beats this in both directions. A ROS 2 process on `rmw_cerulion` reads the same variable for the park its executor wait uses, where the default is per platform: on for Linux `aarch64`, off for `x86_64`, on which blocking in the kernel measured faster. | | `CERULION_DOORBELL` | `1` forces the data doorbell on (a publish wakes a parked consumer immediately), `0` leaves a timer-only park. The default is on for live runs. Where the platform has no wake primitive (macOS before 14.4), a request to turn it on is refused with a warning and the doorbell stays off. | | `CERULION_DOORBELL_OS_SYNC` | macOS only: `0` turns off the kernel wake the doorbell uses on macOS 14.4 and later, so a waiting consumer wakes on its recheck timer instead of on the publish. `1` or unset is the default; any other value warns and keeps it on. | | `CERULION_CPU_DMA_LOCK` | `1` pins the CPU out of deep idle states, `0` disables the cap. By default Cerulion derives a cap from the graph's own tightest timing. Linux only, and it needs privileges — a failed acquire warns and the run continues. | | `CERULION_CPU_DMA_LOCK_US` | An explicit idle exit-latency cap in microseconds, used under the automatic mode. | | `CERULION_FIRE_THREADS` | Size of the pool that fires independent nodes within one level. Read once at graph build; the default is derived from the machine and the graph's widest level. It never changes what fires or in what order. | | `CERULION_BARRIER_SPIN_US` | Applies only under `CERULION_EXECUTION_MODE=lockstep`; a default run has no barrier. How long a worker waits actively at each level boundary before it sleeps. `0` skips the active wait. Values above 100 ms are clamped with a warning. | | `CERULION_BARRIER_OS_SYNC` | macOS only, and only under `CERULION_EXECUTION_MODE=lockstep`; a default run has no barrier. `0` opts out of the faster wake path at level boundaries, at the cost of latency. | | `CERULION_CREDIT_WAKE` | Multi-process only, on Unix: the producer-side credit park. A producer deferred at a cross-process `block` gate blocks on that edge's shared credit word until the consumer's drain wakes it; `0` turns that off and the producer falls back to the park's recheck cadence. Correct and bounded either way — all `0` costs is wake latency. Anything other than `0` or `1` warns and stays enabled. Inert on a run that splits no `block` edge. | | `CERULION_CREDIT_OS_SYNC` | macOS only: `0` drops the credit word's kernel-wake tier to a sleep-and-recheck fallback. It is deliberately separate from `CERULION_BARRIER_OS_SYNC` — opting out of the barrier's wake tier says nothing about the credit plane. | | `CERULION_PARK_OS_SYNC` | macOS 14.4 and later: `0` opts out of the faster wait the live-loop park uses between rechecks, so each recheck waits with a plain sleep instead. It changes only how tightly the park keeps to its recheck interval, never what fires. `1` or unset is the default, any other value warns and keeps the faster wait, and older macOS versions and every other platform are unaffected. | ## Build | Variable | Meaning | | - | - | | `CARGO_TARGET_DIR` | Honored identically by `cerulion node build` and `cerulion graph run`, so a shared target directory works. | ## Related > [card] [CLI reference](/cerulion/reference/cli) > > The flags that override several of these variables. > [card] [Network a graph](/cerulion/guides/network-and-remote-robots) > > What the network variables change in practice. # Graph and schema files Source: https://docs.cerulion.com/cerulion/reference/graph-and-schema-files Exact YAML field specifications for graph files and schema files, including the network and process_groups blocks. Workspaces store graphs in `graphs/.yaml` and schemas in `schemas/.yaml`. Both are YAML. ## Graph YAML The **file stem is the graph name** — `graphs/perception.yaml` is the graph `perception`. Every key the format does not define is a loud parse error, so a typo never becomes a silent default. > [!NOTE] > > There is no `policy:` block in graph YAML; trigger policy lives only on the macro side. A leftover `policy:` block fails to parse. ```yaml theme={null} args: # optional; launch arguments, each with a default gain: 2.5 prefix: robot1 # `graph create` stamps the hostname (".local" stripped) here multi_publisher_topics: # optional; absolute topics that may have several publishers - /tf network: # optional; restricts the default network exposure mode: peer egress: - /robot1/camera/image process_groups: # optional; usually written by `cerulion graph partition` acquisition: [camera] perception: [detector] nodes: - id: camera # required, unique instance id type: camera # required, node type = folder name under nodes/ outputs: # list every output the node declares - name: image # output port name (matches the #[output] field) schema: sensor_msgs/Image # required; "::" is normalized to "/" max_slice_len: 6291456 # optional history_size: 8 # optional, default 0, max 64 - id: detector type: detector isolate: true # optional; run in an executor unit of its own params: # optional; values for the node's #[param] fields gain: ${gain} inputs: # optional - name: image # input port name (matches the #[input] field) source: camera/image # relative "/", or an absolute "/topic" ``` ### Top-level fields | Field | Type | Required | Default | Meaning | | - | - | - | - | - | | `args` | mapping | No | none | Launch arguments, each a name with its default (`gain: 2.5`), or a mapping with `default:` and `description:`. `cerulion graph run gain:=0.5` overrides one for that run. See [Launch arguments](#launch-arguments). | | `prefix` | String | No | hostname without `.local`, stamped in at create time | Topic prefix for every topic this graph derives. `cerulion graph create` always writes this line, stamping the hostname when you pass no `-n`, so topic names do not change when the file moves to another machine. Only a hand-written file that omits the line takes the same default at load instead. | | `nodes` | list | Yes | none; an empty graph writes `nodes: []` | The node instances in the graph. | | `multi_publisher_topics` | list of absolute topics | No | empty | Opts specific topics out of the single-writer rule, for shared names like `/tf`. Entries must be absolute, well formed, and unique. | | `network` | mapping | No | permissive default | Restricts what crosses the machine boundary. See below. | | `process_groups` | mapping of group name to a list of node ids | No | derived | Assigns nodes to worker processes. A hand-written block may split a `block` backpressure edge across groups when the edge is creditable (exactly one in-graph producer and no non-`block` consumers), and the supervisor mints it a cross-process credit word. Two or more in-graph producers, or `block` consumers mixed with non-`block` siblings, are refused before any worker spawns. See [Run a graph across processes](/cerulion/guides/run-multi-process). | | `name` | String | No | ignored | Read and ignored — the file stem is the graph name. Warns when it disagrees with the file name. | ### Node entry fields | Field | Type | Required | Meaning | | - | - | - | - | | `id` | String | Yes | Unique instance id. Becomes part of every topic this instance publishes. | | `type` | String | One of the two | Node type — the folder name under `nodes/`. | | `ros2` | mapping | One of the two | Declares a stock ROS 2 process instead of a native node. See [`ros2:` entries](#ros2-entries) — an entry carries `type:` or `ros2:`, never both and never neither. | | `params` | mapping | No | Values for the node's `#[param]` fields, by field name. Each is checked against the field's type and bounds when the graph loads, and an unknown name is refused. See the [node macro reference](/cerulion/reference/node-macro). | | `isolate` | bool | No | `true` runs the node in an executor unit of its own within its process. `cerulion graph plan ` shows the units a run will use. | | `inputs` | list | No | Input bindings. Refused on a `ros2:` entry. | | `outputs` | list | Yes, for every declared output | Output ports. A `#[cerulion_node]` node must list every `#[output]` it declares, each with its `schema:`; `graph run` refuses the graph otherwise, naming the node and the output. Refused on a `ros2:` entry. | ### Input fields | Field | Type | Required | Meaning | | - | - | - | - | | `name` | String | Yes | Input port name; must match an `#[input]` field on the node type. | | `source` | String | Yes | Relative `/`, resolved under the graph prefix, or an absolute `/topic`. | An absolute `source` with no in-graph producer is an **external topic**: the graph does not own it, other publishers attach freely, and `block` backpressure is rejected on it. ### Output fields | Field | Type | Required | Default | Meaning | | - | - | - | - | - | | `name` | String | Yes | | Output port name; must match an `#[output]` field. | | `schema` | String | Yes | none | Schema name. `pkg::Type` is normalized to `pkg/Type`. An absent or empty `schema:` is refused when the graph is validated, and `--no-validate` does not skip that check. | | `topic` | String | No | derived name | Absolute override, for externally fixed names such as `/tf`. Must be absolute. Other nodes then reference it as `source: /tf`. | | `max_slice_len` | usize | No | the schema's own budget, else 128 MiB with a warning | Maximum payload size for a variable-length schema. | | `history_size` | usize | No | `0` | Per-publisher history replayed to late joiners. Maximum 64; a value above a consumer's `depth` warns at build. | ### Launch arguments One graph file can serve several setups. Declare launch arguments under `args:`, each with a default, and reference them as `${name}`: ```yaml theme={null} args: robot_name: go2 side: left use_sim: default: false description: drive the simulator instead of the robot prefix: ${robot_name} nodes: - id: cam type: camera params: frame_id: ${side}_cam simulated: ${use_sim} outputs: - name: image schema: sensor_msgs/Image topic: /${robot_name}/${side}/image ``` ```bash theme={null} cerulion graph run robot # the defaults cerulion graph run robot side:=right # one setup change, same file ``` A reference is accepted in exactly four places: the graph `prefix`, an output's `topic`, an input's `source`, and a node's `params:` values. A `${` anywhere else is a load error naming the key. Values are typed: a default takes the type it is written with (`false` is a bool, `2.5` a float, `go2` text), and an override is read the same way. `$$` is a literal `$`. A graph that declares no `args:` is read as written, and an override passed to it is refused. ### Topic names Cerulion derives every topic name as `///`, with a leading slash. With `prefix: perception`, the `sensor` instance's `image` output publishes to `/perception/sensor/image`, which is the name `topic echo` and `topic hz` expect. Malformed names are rejected at load: a bare `/`, a trailing `/`, empty `//` segments, and a prefix that starts or ends with `/`. ### Graph name limits The graph name — the file stem — becomes the name of the run's shared-memory node, so it must be **ASCII** (an accent or an emoji is refused even though it is valid UTF-8) and at most **119 bytes**; 112 bytes if you intend to re-simulate a recording of it, which carries a longer prefix. A name that breaks either rule is refused before the run starts, naming the offending name, the constraint it broke, and the fix: ```text theme={null} Error: Transport error: Cannot name the iceoryx2 node 'cerulion_café': an iceoryx2 node name admits only ASCII below U+0080, and no NUL byte — so an accent, an emoji or any other non-ASCII character is refused even though it is valid UTF-8. That name is DERIVED from the graph's identity (its `name:` key, or the file or bag it was loaded from) — rename the graph, or the bag, and re-run. ``` Rename `graphs/.yaml` and re-run. The refusal reaches the runs that use the name verbatim: a single-process `graph run`, `graph profile`, and `bag play --resim` — where a name the recording itself declares makes the bag not replay-grade. A multi-process run, the default on Unix, replaces every character outside `[A-Za-z0-9_]` with `_` when it names its worker processes, so a non-ASCII name runs there; the byte cap still applies. ### The `network` block Cross-machine visibility is **on by default** for live runs, so this block exists to *restrict* exposure, not to enable it. ```yaml theme={null} network: mode: peer # peer | client | disabled (what an omitted mode: means) connect: # locators to dial, used verbatim - tcp/192.168.1.20:7683 listen: # locators to bind locally - tcp/0.0.0.0:7683 egress: # the only topics allowed to leave this machine - /robot1/camera/image ingress: # topics imported from the network - /operator/cmd_vel ``` | Field | Meaning | | - | - | | `mode` | `peer` joins the mesh, `client` connects to a router without routing, `disabled` keeps the block inert, so the run behaves as if it had no block. An omitted `mode` means `disabled`. An unknown value is rejected and the valid ones listed. | | `connect` / `listen` | Locators used verbatim — a declared block adds no scouting, so a two-machine deployment needs one side to `listen` and the other to `connect`. | | `egress` | A true allow-list: only these topics ever leave the machine. Each must be produced by an in-graph node, unless the entry is written `{topic: /chatter, external: true}` for a topic a process outside the graph publishes on this machine, such as a ROS 2 program on `rmw_cerulion`. | | `ingress` | Topics imported from the network. Each must have **no** in-graph producer and must be consumed by an in-graph node; frames are schema-checked before they are injected. | Validation rejects, by name: the same topic in both `egress` and `ingress`, an `egress` topic nobody produces (unless marked `external: true`), `external: true` on a topic an in-graph node produces, an `ingress` topic an in-graph node produces, a non-absolute topic in either list, non-empty lists under `mode: disabled`, and duplicates. Empty lists under `peer`/`client` are valid: that is an export-restricted robot. See [Network a graph and reach remote robots](/cerulion/guides/network-and-remote-robots). ### `ros2:` entries One graph file can describe the whole robot: native Cerulion nodes (`type:`) beside stock ROS 2 nodes (`ros2:`), brought up together by `cerulion graph run` on one transport. A `ros2:` entry names a ROS 2 process; the run spawns it as a supervised child on the same staged environment [`cerulion ros2 run`](/cerulion/reference/cli#ros2) uses, so its topics land on the shared transport beside the native nodes'. ```yaml theme={null} nodes: - id: detector # native, as always type: detector outputs: - name: boxes schema: vision_msgs/Detection2DArray - id: camera_driver # a ROS 2 node: `ros2 run ` ros2: package: usb_cam executable: usb_cam_node_exe args: ["--log-level", "warn"] # optional; the executable's own arguments params_file: config/usb_cam.yaml # optional; --ros-args --params-file params: # optional; --ros-args -p key:=value framerate: 30.0 use_sim_time: false - id: bringup # or a launch file: `ros2 launch [args]` ros2: launch: launch/robot.launch.py args: ["use_rviz:=false"] # launch arguments ``` | Key | Meaning | | - | - | | `package` + `executable` | The `ros2 run` form: `ros2 run [args...]`. Both keys are required together. | | `launch` | The `ros2 launch` form: `ros2 launch [args...]`. The alternative to `package`/`executable` — an entry declares one shape or the other, never both. A relative path resolves against the workspace root and must exist; a missing file is refused by name before anything spawns, because `ros2 launch` would otherwise read the name as a package. | | `args` | Forwarded verbatim: the executable's arguments in the `run` form, launch arguments (`name:=value`) in the `launch` form. | | `params_file` / `params` | ROS parameters, for the `run` form only — appended as `--ros-args --params-file -p :=`. A launch file carries its own parameters; pass launch arguments through `args`. `params` values must be scalars — a string, a number, or a bool, in declaration order. Put nested parameter trees in a `params_file`. | > [!NOTE] > > A `ros2:` entry is an opaque process the run spawns and supervises. It is not scheduled — no trigger policy, no DAG level, no determinism claim — so `level_assignments:` and `process_groups:` may not name one, and `cerulion graph levels` lists these entries apart from the DAG, which its node count excludes. `cerulion graph profile` covers native nodes only. A `ros2:` entry declares no ports: its topics meet native nodes on the shared transport **by name**, and the name is the fully-qualified ROS name verbatim — so a native `#[input]` whose `source:` is the absolute `/tf` reads a ROS 2 `/tf` publisher directly, and the wiring is simply not modelled in the graph. A graph made only of `ros2:` entries is refused — nothing remains for the runtime to run; use `cerulion ros2 launch` for a bare launch file. Each entry spawns before the graph starts, on every run shape, in its own process group; the graph process drives teardown with a SIGINT, a 10-second grace for `ros2 launch` to wind its own nodes down, then a SIGKILL backstop, so no orphan survives an exit path. A child that exits `0` mid-run warns and the graph keeps running — a sidecar finishing must not stop the robot. A child that dies (non-zero, or lost) follows `--peer-loss`: the default `continue` warns and runs degraded, and it is not restarted; `fail` stops the run and exits non-zero naming the entry. A missing `librmw_cerulion.so`, a missing launch or params file, and `ros2` absent from `PATH` are all refused before anything spawns. `graph run --record` records a ROS 2 entry's frames like any other live topic, and the bag's embedded `graph.yaml` carries the `ros2:` entries verbatim, in authored order. `cerulion bag info` renders them as their own section. `cerulion bag play --resim` re-executes the native nodes against the recorded frames and skips the entries — one warning names them, `--report` JSON lists them under `ros2_entries_skipped`, and ROS 2 is never respawned. ## Schema YAML `cerulion schema create ` writes `schemas/.yaml` — the name verbatim — holding a skeleton whose single entry key is the PascalCased name. `cerulion schema create Detections` writes `schemas/Detections.yaml`. A workspace can also carry ROS message definitions verbatim, as `.msg` files under `schemas//msg/.msg`; `cerulion ros2 attach` writes the types it discovered there. That store is a tier between your workspace YAML and the built-in types, and its entries are first-class for node ports, `graph validate`, recording, replay, and `schema info`. A store type types a node port as `native_ros2_messages::::`, generated when the workspace's `.cargo/config.toml` sets `CERULION_WORKSPACE_MSGS` (`cerulion workspace create` writes it). Declaring one name in both tiers is refused outright, naming every source. > [!WARNING] > > `fields:` is a **mapping**, not a list. Each key is the string `" "` and the value is left empty. A list under `fields:`, an entry under `schemas:` that is not a mapping, and two fields with the same name are each refused, naming the schema. `cerulion schema info` on that file exits with the error. `graph run`, `schema list`, `topic` and `node create` warn, skip that file and load the rest, so a graph that needs a schema from the skipped file does not start. An empty `fields:` is valid and means no fields. ```yaml theme={null} schemas: Detections: description: "Detector output for one camera frame" fields: "u32 sequence": "f64 confidence": "string source": # variable "u8[] payload": # variable (dynamic array) "f64[3] position": # fixed array "Quaternion orientation": # nested; fixed because Quaternion is recursively fixed ``` ### Field types | Type form | Notes | | - | - | | `bool`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `f32`, `f64` | Primitives — fixed. | | `string` | UTF-8 string — variable. | | `[N]` | Fixed-size array. Fixed when `T` is fixed. | | `[]` | Dynamic array — variable. | | `string_fixed[N]` | Fixed-capacity string — fixed. | | `` | Nested schema reference. Fixed when the target is recursively fixed, in which case its layout is inlined into the parent. | A schema is **fixed** when every field is fixed, and **variable** otherwise. That distinction decides how a node writes the field (see [Messages and schemas](/cerulion/guides/messages-and-schemas)) and how the runtime sizes the topic's shared memory. Inspect the result with `cerulion schema info Detections`, which prints the field tree, the fixed wire size, the schema hash, and where the definition came from. # MCP tools Source: https://docs.cerulion.com/cerulion/reference/mcp-tools The recording and Cerulion Cloud tools the hosted Cerulion MCP and Hindsight endpoints serve, what each one does, and what it reaches. Early access · Not open source > [!NOTE] > > The hosted Cerulion MCP and Hindsight endpoints are in early access and are not open source. [Book 30 minutes with us](https://link.cerulion.com/book/docs) for help getting connected. The hosted endpoints serve the tools below. Your client reads each tool's full description and parameters from the server itself (`tools/list`). **Reach** is where a call goes. See [Connect an MCP client](/cerulion/guides/connect-an-mcp-client) to add the endpoints and sign in. | Endpoint | Serves | | - | - | | `https://mcp.cerulion.com/mcp/cerulion` | Recording tools and Cerulion Cloud tools | | `https://mcp.cerulion.com/mcp/hindsight` | Recording tools | ## Recording tools Served on both endpoints. Every call takes `source`: a public or presigned `https://` URL of an MCAP recording. Pass it on every call; the server does not remember it between calls. An empty `source`, an `http://` URL, or a local path is refused. | Tool | What it does | Reach | | - | - | - | | `open_bag` | Opens a recording, builds or reuses its index, and returns a briefing: the topics and schemas recorded, the debrief headline, and how to cite. On a URL the server has not indexed, it starts indexing and returns at once; call it again with the same URL to get the briefing. | the recording's `https://` host, fetched by Cerulion's server | | `get_debrief` | Returns the deterministic mission summary: metrics, anomalies, and the time the run went sideways. Call it right after `open_bag`. | the recording's `https://` host, fetched by Cerulion's server | | `list_topics` | Lists every indexed topic with `avg_hz`, `message_count`, `max_gap_s`, and `dropout_count`. | the recording's `https://` host, fetched by Cerulion's server | | `find_anomalies` | Lists what the deterministic detectors found (timing gaps, dropouts, latency spikes, recorder departures and discards, signal jumps), worst first, each with the `log_time_ns` to cite. Returns the worst 200 and a count of the rest. | the recording's `https://` host, fetched by Cerulion's server | | `scrub` | Returns the per-second minimum, maximum, mean, and last value of every numeric field on the chosen topics between two times, plus the recorder's own events in that window. Topics default to every topic with signals. | the recording's `https://` host, fetched by Cerulion's server | | `query_index` | Runs one read-only SQL `SELECT` or `WITH` query over the index tables `topics`, `messages`, `meta`, `native_events`, `native_nodes`, `signals`, and `signal_channels`. Returns at most 200 rows and reports the true total when it cuts the output. | the recording's `https://` host, fetched by Cerulion's server | | `sample_messages` | Returns the rows on one topic nearest a `log_time_ns`: topic, log time, and sequence. The rows are timing anchors to cite, not message payloads. | the recording's `https://` host, fetched by Cerulion's server | | `get_foxglove_link` | Turns a cited `log_time_ns` into a Foxglove link to that moment, when the recording has a public URL. | the recording's `https://` host, fetched by Cerulion's server | Cerulion's server keeps each recording's index in its cache. When the recording's host returns an ETag, a later call checks the URL with a conditional request before it reads the cached index. A call whose index is not in the cache downloads the recording again. `log_time_ns` is an integer UNIX-epoch time in nanoseconds. Cite it exactly as a tool returns it. ## Cerulion Cloud tools Served on `https://mcp.cerulion.com/mcp/cerulion` only. They call the Cerulion Cloud API with your own sign-in. The instance and DCV tools act on the Cerulion Cloud instance of the signed-in account, so they work only on an account that has one. | Tool | What it does | Reach | | - | - | - | | `cloud_whoami` | Returns the signed-in Cerulion Cloud user. | Cerulion Cloud over the internet | | `cloud_instance_status` | Reads the instance's state, public IP address, and server URL. | Cerulion Cloud over the internet | | `cloud_instance_start` | Starts the instance. | Cerulion Cloud over the internet | | `cloud_instance_stop` | Stops the instance. The server marks it destructive (`destructiveHint`). | Cerulion Cloud over the internet | | `cloud_instance_reboot` | Reboots the instance. The server marks it destructive (`destructiveHint`). | Cerulion Cloud over the internet | | `cloud_instance_connect` | Returns a server URL, a session ID, and a short-lived DCV token for the instance. | Cerulion Cloud over the internet | | `cloud_dcv_progress` | Reads the current step of the instance's DCV setup. | Cerulion Cloud over the internet | | `cloud_dcv_advance` | Runs the next step of the DCV setup. | Cerulion Cloud over the internet | | `cloud_dcv_reset` | Starts the DCV setup over. The server marks it destructive (`destructiveHint`). | Cerulion Cloud over the internet | # Message types Source: https://docs.cerulion.com/cerulion/reference/message-types The native_ros2_messages packages, the ROS 2 to Rust type mapping, and how fixed and variable fields are written. Cerulion ships ROS 2 compatible message types in the `native_ros2_messages` crate, generated from upstream `.msg` definitions at build time. The current build carries **254 messages across 22 packages**, so most robotics pipelines never need a custom schema. Import a type from its package: ```rust theme={null} use native_ros2_messages::sensor_msgs::Image; ``` Reference it in graph YAML by qualified name (`sensor_msgs/Image`); the `pkg::Type` form is normalized to `pkg/Type`. List everything available on your build, grouped by package: ```bash theme={null} cerulion schema list ``` ## Packages | Package | Types | Representative types | | - | - | - | | `action_msgs` | 3 | `GoalInfo`, `GoalStatus`, `GoalStatusArray` | | `autoware_perception_msgs` | 6 | Perception objects and predicted trajectories. | | `autoware_planning_msgs` | 5 | Planning trajectories and path shapes. | | `builtin_interfaces` | 2 | `Time`, `Duration` | | `control_msgs` | 39 | `JointTrajectoryControllerState`, `DynamicJointState`, `JointJog`, `PidState`, `GripperCommand` | | `diagnostic_msgs` | 3 | `DiagnosticArray`, `DiagnosticStatus`, `KeyValue` | | `geometry_msgs` | 32 | `Point`, `Pose`, `PoseStamped`, `Quaternion`, `Transform`, `Twist`, `Vector3` | | `grid_map_msgs` | 2 | `GridMap`, `GridMapInfo` | | `moveit_msgs` | 46 | `CollisionObject`, `AttachedCollisionObject`, `DisplayTrajectory`, `Constraints`, `Grasp` | | `nav_msgs` | 5 | `Odometry`, `Path`, `OccupancyGrid`, `MapMetaData`, `GridCells` | | `object_recognition_msgs` | 6 | `RecognizedObject`, `RecognizedObjectArray`, `ObjectInformation` | | `octomap_msgs` | 2 | `Octomap`, `OctomapWithPose` | | `radar_msgs` | 4 | `RadarReturn`, `RadarScan`, `RadarTrack`, `RadarTracks` | | `sensor_msgs` | 27 | `Image`, `Imu`, `LaserScan`, `JointState`, `PointCloud2`, `CameraInfo`, `CompressedImage`, `NavSatFix` | | `shape_msgs` | 4 | `Mesh`, `MeshTriangle`, `Plane`, `SolidPrimitive` | | `statistics_msgs` | 3 | `MetricsMessage`, `StatisticDataPoint`, `StatisticDataType` | | `std_msgs` | 30 | `Header`, `String`, `Bool`, `Empty`, `ColorRGBA`, the numeric scalars, and the `*MultiArray` family | | `tf2_msgs` | 2 | `TFMessage`, `TF2Error` | | `trajectory_msgs` | 4 | `JointTrajectory`, `JointTrajectoryPoint`, and their multi-DOF forms | | `unique_identifier_msgs` | 1 | `UUID` | | `vision_msgs` | 16 | `Detection2D`, `Detection2DArray`, `Detection3D`, `BoundingBox2D`, `ObjectHypothesisWithPose` | | `visualization_msgs` | 12 | `Marker`, `MarkerArray`, `ImageMarker`, the interactive-marker family | > [!NOTE] > > A bare type name that exists in several packages — `Pose2D` is in both `geometry_msgs` and `vision_msgs` — must be qualified. The CLI errors and lists the candidates rather than guessing. ## ROS 2 to Rust type mapping | ROS 2 type | Rust type | | - | - | | `bool` | `bool` | | `byte` / `char` / `uint8` | `u8` | | `int8` | `i8` | | `uint16` / `int16` | `u16` / `i16` | | `uint32` / `int32` | `u32` / `i32` | | `uint64` / `int64` | `u64` / `i64` | | `float32` / `float64` | `f32` / `f64` | | `string` | UTF-8 string, read as `Result<&str, _>` | | `T[]` | dynamic array, read as `&[T]` | ## Fixed and variable fields Fixed-size fields are read and written as plain fields. Variable-length fields (`string`, `T[]`) are **read** through an accessor method and **written** with the same plain assignment: ```rust theme={null} use native_ros2_messages::sensor_msgs::Image; // in tick(), with `#[output] image: Image` self.image.height = 480; // fixed field self.image.width = 640; self.image.encoding = "rgb8"; // variable field — same assignment syntax self.image.header.frame_id = "camera"; // nested field self.image.data = &frame_bytes[..]; // variable field from a slice ``` ```rust theme={null} // in tick(), with `#[input(trigger)] scan: LaserScan` let closest = self.scan.ranges().iter().copied().fold(f32::MAX, f32::min); let frame = self.scan.header.frame_id()?; ``` Variable-length output fields have one extra requirement: a tick that publishes a variable-schema message must write **every** variable field, at every nesting depth, or the frame is discarded with a loud error. For large payloads, `fill_from` writes straight into the shared-memory destination — see the [node macro reference](/cerulion/reference/node-macro). ## Defining your own When no built-in type fits, define a workspace schema: ```bash theme={null} cerulion schema create Detections ``` The YAML format is in [Graph and schema files](/cerulion/reference/graph-and-schema-files). Workspace schemas resolve before built-in messages, so a bare name you define shadows a built-in one (with a warning). # Node macro reference Source: https://docs.cerulion.com/cerulion/reference/node-macro Reference for the #[cerulion_node] and #[cerulion_node_impl] macros, the #[input], #[output] and #[param] field attributes, and #[on_event] callbacks. A node is a Rust struct annotated with `#[cerulion_node(...)]` paired with an adjacent `impl` block annotated with `#[cerulion_node_impl]`. Together they turn your struct into a node that `cerulion node build` compiles and `cerulion graph run` loads — you never call the generated code yourself. Import everything from the prelude: ```rust theme={null} use cerulion_core::prelude::*; ``` The prelude re-exports `cerulion_node`, `cerulion_node_impl`, `NodeError`, the event types, `FillFrom`/`SliceSource`, and the transport types. ### One dependency instead of two `cerulion workspace create` scaffolds two dependencies, `cerulion_core` and `native_ros2_messages`, pinned to the installed CLI's version, and every example on this site uses them. The alternative is the `cerulion` crate, which `cargo add cerulion` writes: it re-exports the runtime, the node macros and the ROS 2 message types at one version. A node written against it imports `cerulion::prelude::*` and takes its port types from `cerulion::msgs`: ```rust theme={null} use cerulion::msgs::geometry_msgs::Vector3; use cerulion::prelude::*; ``` Either manifest works: the macros read your package's `Cargo.toml` and emit paths through the crate it names. A package that names neither is refused, with both manifests spelled out in the error. ## The two macros The macros are used as a pair: * `#[cerulion_node(...)]` on the struct declares the node type, its ports (via field attributes), and its trigger policy. * `#[cerulion_node_impl]` on an adjacent `impl { … }` block lets `tick()` read inputs and write outputs through ordinary field access (`self..…`) — reads and writes go directly to shared memory, zero-copy. > [!NOTE] > > `#[cerulion_node_impl]` takes no arguments. The struct must appear before the impl block. The impl block must define `tick(&mut self) -> Result<(), NodeError>`. It may also define `init(&mut self, ctx: &mut NodeContext) -> Result<(), NodeError>` (runs once before the first tick) and `shutdown(&mut self) -> Result<(), NodeError>` (runs once on a clean exit). ## Complete example ```rust theme={null} use cerulion_core::prelude::*; use native_ros2_messages::geometry_msgs::Vector3; use native_ros2_messages::sensor_msgs::LaserScan; #[cerulion_node(period_ms = 10)] // period-driven; reads the latest scan each tick #[derive(Default)] struct SafetyController { #[input(depth = 1)] // latest-value context input scan: LaserScan, #[output] // Vector3 is a fixed-only schema (x/y/z: f64) linear_velocity: Vector3, } #[cerulion_node_impl] impl SafetyController { fn tick(&mut self) -> Result<(), NodeError> { // Variable-length field read through its typed accessor: let obstacle_close = self.scan.ranges().iter().any(|&r| r < 0.5); // Field writes go straight to shared memory: self.linear_velocity.x = if obstacle_close { 0.0 } else { 0.3 }; Ok(()) } } ``` Build it with `cerulion node build safety_controller`, then wire it into a graph with `cerulion node stage safety_controller`. ## Node-level attributes Exactly one trigger policy applies — either an attribute below, or an inferred data trigger from a field marked `#[input(trigger)]`. A node that declares ports but neither is a compile error. | Attribute | Semantics | | - | - | | `period_ms = N` | Fire every N ms. N must be > 0. | | `sync_window_ms = N` | Bounded sync: fire once per complete set of `#[input(trigger)]` messages that arrived within an N-ms window. Requires ≥2 trigger inputs, all wired in the graph. | | `unbounded_sync` | Sync with no time bound. Requires ≥2 trigger inputs. Suited to batch and offline fusion; control loops want `sync_window_ms` for a bounded latency. | | `external` | Self-triggering ingress node. Requires an `external_source()` method returning `ExternalSource::{Fd, Blocking, HostDriven}`. Rejected under `--time-source virtual`. | | `tick_within_ms = N` | QoS, not a trigger. Per-node tick-duration deadline; a slower tick increments `tick_within_missed_count` and warns with `node_id`, `tick_within_ms`, and `elapsed_ms`. | | `throttle_ms = N` | Rate cap, not a trigger. Defers the node's tick while `now − last_fire < N ms`. | ### Mutual exclusion `unbounded_sync` excludes `sync_window_ms`, `period_ms`, and `external`. `throttle_ms` excludes `period_ms` (a period already pins the rate). `tick_within_ms` stacks with every trigger policy. ### Rejected attributes | Attribute | Reason | | - | - | | `type_name` | Not an attribute — the node type is the folder name. | | `inputs(...)` / `outputs(...)` | Ports are declared as field attributes, not macro arguments. | | `deadline_ms = N` | Use `#[input(expect_within_ms = N)]` or `#[output(promise_within_ms = N)]`. | ## `#[input(...)]` attribute Declares an input port; the field type is the schema. | Key | Default | Meaning | | - | - | - | | `trigger` | | This input fires the node (data trigger, or a member of a sync set). | | `depth = N` | `10` | Receive queue depth in messages. Maximum **64** — a consumer that needs more in-flight messages than that is permanently slower than its producer, so reach for a backpressure policy instead. | | `backpressure = drop_oldest \| sample(N) \| block` | `drop_oldest` | What happens when the queue would overflow. `block` needs every consumer of the topic to declare it and an in-graph producer; a hand-written `process_groups:` may split a `block` edge across processes when it is creditable. See [Backpressure and deadlines](/cerulion/guides/backpressure-and-deadlines). | | `expect_within_ms = N` | | QoS: if N ms elapse with no fresh data on this input, increment `expect_within_missed_count` and warn. Independent of `trigger`. | | `consume = fifo \| latest` | `fifo` | Trigger inputs only. `fifo` fires once per queued frame, in arrival order. `latest` fires at most once per scheduler step and reads the newest queued frame; the older frames that read skipped are not served and not counted. On a non-trigger input, or a trigger input of a `sync_window_ms` or `unbounded_sync` node, `consume` is a compile error. | | `accumulate` | | Each fire receives every frame that arrived since the last fire, oldest first, through `self..iter()`. An accumulate input never fires the node, so the node needs `period_ms`, `external` or a separate trigger input. Cannot be combined with `trigger`, `depth`, `backpressure = block` or `backpressure = sample(N)`. | | `cap = N` | `10` | With `accumulate` only: the most frames one fire holds, from 1 to 64. Past it the oldest frames are dropped and counted in `self..dropped()`. | That is the complete surface: `trigger`, `depth`, `backpressure`, `expect_within_ms`, `consume`, `accumulate`, `cap`. Any other key fails the build. The diagnostic names the unrecognized key and lists the accepted set. ### Trigger inputs versus context inputs A plain `#[input]` that is not the node's trigger is a **latest-value context** read: in `tick()` it yields the most recent message on that topic, held across ticks. Until it has delivered at least once, the tick is a no-op — Cerulion never fabricates a default value for data that has not arrived. That means a 1 Hz map does not starve a 100 Hz consumer, and it also means a producer that stalls without disconnecting keeps serving its last value; add `expect_within_ms` if you need to notice. ## `#[output(...)]` attribute | Form | Meaning | | - | - | | `#[output]` | The canonical form, for every schema — fixed-only or variable. There is nothing to declare per field. | | `#[output(promise_within_ms = N)]` | QoS: if N ms elapse with no publish on this output, increment `promise_within_missed_count` and warn. | > [!WARNING] > > `#[output]` takes no field list. A form such as `#[output(data, encoding)]` is rejected with guidance to assign `self.. = expr` instead. Only the two forms above are accepted. ## `#[param(...)]` attribute Declares a typed setting on a plain field, not a port. The node reads it as `self.`, and a graph file sets it per node under `params:` (see [Graph and schema files](/cerulion/reference/graph-and-schema-files)). The value is fixed when the graph loads, for the whole run. ```rust theme={null} #[cerulion_node(period_ms = 10)] #[derive(Default)] struct Controller { #[output] cmd_vel: Twist, #[param(default = 2.0, min = 0.0, max = 5.0, description = "proportional gain")] gain: f64, } ``` | Key | Meaning | | - | - | | `default = ` | Required. The value when the graph sets none. It must have the field's type exactly: a float field takes `2.0`, never `2`. | | `min = `, `max = ` | Inclusive bounds, on integer and float fields only. A graph value outside them is refused when the graph loads. | | `description = "..."` | Shown by `cerulion node info`. | Field types are `bool`, `i8` to `i64`, `u8` to `u64`, `f32`, `f64` and `String`. Any other key is a compile error. A node must not write a `#[param]` field; keep a value the node changes in a plain field. ## Inside `tick()` | Pattern | Effect | | - | - | | `self..` | Reads a fixed field directly from shared memory. Zero copy. | | `self..()` | Reads a variable-length field through its accessor method: `self.scan.ranges()` returns `&[f32]`; string fields return a `Result<&str, _>`. | | `self.. = expr` | One rule for fixed and variable output fields alike: the write lands in shared memory, and the macro makes it fallible for you. | | `self... = expr` | Nested writes work to any depth, for example `self.detection.pose.position.x = 0.5;`. | | `self...fill_from(producer)?` | Zero-copy producer write. See below. | | `self..emit()?` | Publishes a fieldless message (`std_msgs/Empty`). Exists only on zero-field schemas. | | `self.` | Plain Rust state. Keep per-tick state here. | | `self.now_ns()` | Time in ns from the run's active clock — the read to use in node logic, and the only one that is replay-safe. | | `self.real_ns()` | Raw monotonic hardware ns. Non-deterministic; for benchmarks only. | | `self.virt_ns()` / `self.ext_ns()` | `Some(ns)` only under the virtual / external clock; `None` otherwise. | | `self.request_shutdown()` | Asks the runtime to drain and exit cleanly. | ### Publishing rules worth memorizing * **Only the outputs you write are published.** An output your tick never touches is not published and costs nothing. * **A tick that returns `Err` publishes nothing.** Every output it had written is released without sending. * A variable-schema output must have **all** of its variable fields written on a tick that publishes it, at every nesting depth, or the frame is discarded with a loud error. * Do not read your own output fields — reading one loans a frame you did not mean to send. Keep state in plain struct fields. ### Helpers and closures must be fallible Every port-field assignment carries an injected `?`, so any method or closure that writes a port field has to return a `Result`: ```rust theme={null} // Rejected: a `()` helper writing a port field. fn set_speed(&mut self) { self.cmd_vel.x = 0.3; } // Correct: return Result and propagate at the call site. fn set_speed(&mut self) -> Result<(), NodeError> { self.cmd_vel.x = 0.3; Ok(()) } ``` The same applies inside closures: hoist the value out, or use a fallible combinator such as `try_for_each`. > [!NOTE] > > Port fields cannot be used inside a macro argument (`format!`, `tracing::info!`). Assign to a local first, then log the local. ### `fill_from`: zero-copy producer writes For producers that write into a destination buffer — camera drivers, codecs, file readers, sockets — `fill_from` passes the shared-memory destination (`&mut [T]`) straight to the producer. ```rust theme={null} // Closure form: the producer writes directly into shared memory. self.image.data.fill_from(|buf: &mut [u8]| { let n = self.driver.read_frame_into(buf).map_err(|e| TransportError::NodeError { node_id: "camera".into(), reason: e.to_string(), })?; Ok(n) // bytes written; only the first n are published })?; // Slice form: copy from an existing &[u8] without an intermediate Vec. self.image.data.fill_from(SliceSource::new(&raw_bytes))?; ``` Accepted producers are a closure `FnMut(&mut [T]) -> Result`, `SliceSource::new(slice)`, or any type implementing `FillFrom`. Typed arrays get the element type directly, for example `&mut [f32]` for a `float32[]` field. If the producer returns `Err`, nothing is published that tick. ## `#[on_event]` callbacks Annotate a method in the `#[cerulion_node_impl]` block. The **event parameter type** selects the event, and the filter must name a declared port of the matching scope. Handlers run at the end of a successful tick, in declaration order. | Filter | Event types | | - | - | | `#[on_event(input = "")]` | `BackpressureEvent`, `ExpectWithinEvent`, `LivelinessEvent` | | `#[on_event(output = "")]` | `PromiseWithinEvent` | ```rust theme={null} #[cerulion_node_impl] impl FusionNode { fn tick(&mut self) -> Result<(), NodeError> { Ok(()) } #[on_event(input = "imu")] fn on_imu_overdue(&mut self, event: ExpectWithinEvent) { tracing::warn!(input = %event.input_name, elapsed_ms = event.elapsed_ms, "IMU data overdue"); } } ``` All four events are edge-triggered: one event per regime, not one per occurrence. Two handlers on the same port are fine if their event types differ; two with the same port and type are a compile error, and a mismatched scope is a compile error too. > [!WARNING] > > Handlers dispatch on the node's own tick. A purely data-triggered node stops ticking when its input goes silent, so it may never run its `LivelinessEvent` `Lost` handler. Give such a node a period trigger if you depend on hearing about disconnects. ## Error type `tick()`, `init()`, and `shutdown()` return `Result<(), NodeError>`. The variants you construct are `NodeError::Logic(String)`, `NodeError::InvalidInput { input, reason }`, `NodeError::Fatal(String)`, and `NodeError::Custom(Box)`. Transport and I/O errors convert automatically, so `?` works on them. Every variant except `Fatal` is logged and counted, and the node keeps firing. A node whose `tick()` returns `NodeError::Fatal` is stopped and never fired again; the rest of the graph keeps running. When the run ends, `cerulion graph run` prints `Error: node '' stopped on a fatal error: ` for each stopped node and exits 3. `Fatal` from `init()` fails the graph build. A Python node cannot stop itself with `Fatal`. ## Related > [card] [Trigger policies](/cerulion/reference/trigger-policies) > > The `--policy` grammar and the defaulting matrix. > [card] [Backpressure and deadlines](/cerulion/guides/backpressure-and-deadlines) > > Pick a queue policy and set arrival deadlines. > [card] [Define a node](/cerulion/guides/define-a-node) > > The end-to-end workflow for a new node type. # Trigger policies Source: https://docs.cerulion.com/cerulion/reference/trigger-policies The trigger policy SPEC grammar, macro-attribute equivalents, the defaulting matrix, and policy short labels. A trigger policy decides when a node fires. It can be set on the CLI via `--policy SPEC` (on `node create` and `node modify`) or in source via a `#[cerulion_node(...)]` attribute. Trigger policy lives only on the macro side; graph YAML carries no policy block. ## `--policy SPEC` grammar Accepted forms: | SPEC | Behavior | Rules | | - | - | - | | `period_ms=N` | Fire every N ms. | N must be a positive integer > 0. Bare `period_ms` (no `=N`) → error "requires a value". `period_ms=0` → error "must be > 0". | | `sync_window_ms=N` | Fire when all trigger inputs arrive within an N-ms window. | Same N rules. | | `external` | Self-triggering ingress node: the node supplies its own readiness source (a file descriptor, a blocking call, or host-driven triggering). | Case-insensitive keyword. Rejected under `--time-source virtual`. | | `data_trigger=NAME` or `trigger=NAME` | Fire when the named input receives a message. | NAME must be non-empty and match a declared input. | | anything else | error | "unknown policy spec `X`" listing the accepted forms. | > [!WARNING] > > There is no `default` policy keyword — `--policy default` errors with "unknown policy spec". A 100 ms period must be written `--policy period_ms=100`. > [!WARNING] > > There is no `deadline_ms` policy spec — `--policy deadline_ms=N` errors with "unknown policy spec `deadline_ms`". To watch for late data on a trigger input, use `#[input(trigger, expect_within_ms = N)]` in your node source. ## Macro-attribute equivalents Each `--policy SPEC` has an equivalent `#[cerulion_node(...)]` attribute. See [Node macro reference](/cerulion/reference/node-macro) for full attribute semantics. | `--policy SPEC` | Macro attribute | | - | - | | `period_ms=N` | `#[cerulion_node(period_ms = N)]` | | `sync_window_ms=N` | `#[cerulion_node(sync_window_ms = N)]` | | `external` | `#[cerulion_node(external)]` | | `data_trigger=NAME` / `trigger=NAME` | field marked `#[input(trigger)]` named `NAME` | The `unbounded_sync`, `tick_within_ms = N`, and `throttle_ms = N` attributes have no `--policy` SPEC equivalent; they are macro-only. Write them into `nodes//src/lib.rs` yourself. ## Defaulting matrix When `--policy` is omitted, `node create` resolves the policy from the declared inputs: | Inputs declared | Result | | - | - | | 0 inputs (no `-i`, no `-T`) | Error: source-only nodes must declare a non-data policy explicitly (`--policy period_ms=N` or `--policy external`). | | 1+ inputs via `-i` only | No node-level policy attribute is written. You then have to mark one input `#[input(trigger)]` in the source, or add a node-level policy — a node with ports and neither does not compile. | | `-T` set | A data trigger on that input, regardless of the `-i` count. | | Non-data `--policy` + `-T` | Error (conflict). | ## Policy short labels `node list` and `node info` print a short policy label in their `POLICY` column: | Label | Policy | | - | - | | `period ms` | Period | | `sync ms` | Bounded sync | | `sync ∞` | Unbounded sync | | `external` | External | | `trigger:` | Data trigger | | `-` | None | # Why Cerulion Source: https://docs.cerulion.com/cerulion/why-cerulion See how Cerulion keeps single-machine robotics latency flat, makes execution replayable, and surfaces deadline misses. ![Conceptual robotics lab with a humanoid between two connected workstations.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/robotics-lab-network.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=91d13359572bac8134cd14cd4ef19826) Cerulion is a ground-up rethink of the robotics stack, engineered to be [dramatically faster](https://github.com/cerulion-inc/cerulion/blob/main/docs/benchmarks/results/8a84baf25d5d1710-2026-09-16-fixed100-heroes/HEADLINE.md) and more deterministic where it counts most: the single-machine, multi-process real-time graph. It also keeps the evidence. A robot can fail once and then refuse to fail the same way again. Record a live run, or let Flashback save the moments around a failure, then re-run your changed code against the recording and see exactly which outputs changed. The speed claim is a scope, not a hedge. ROS 2 still leads on ecosystem maturity, multi-vendor support, mature tooling, and proven distributed deployment, and Cerulion bridges to it rather than asking you to abandon it — `cerulion ros2 attach` puts a Cerulion graph on the same topics as your existing ROS 2 nodes. See [Bridge to ROS 2](/cerulion/guides/bridge-ros2). This page explains the design choices behind those properties. For the mental model of how Cerulion works, start with [Core concepts](/cerulion/concepts). ## Where Cerulion pulls ahead ROS 2's architecture carries decades of accumulated complexity: a DDS networking layer, performance features that are opt-in rather than automatic, and execution order that depends on the executor and thread pool. Cerulion is engineered to beat that head-on, turning the frustrations teams feel most on a single machine into deliberate design advantages. ### Zero-copy is the default, not an opt-in In ROS 2, zero-copy means choosing a compatible RMW, using loaned messages, and tuning configuration, so most teams run the default copy-on-receive path and never get it. In Cerulion, zero-copy shared memory **is** the hot path. A message is written once into a shared-memory slot and read in place, so latency stays flat as payloads grow, with no tuning. ### Replayable execution In ROS 2, execution order depends on the executor, thread pool, and DDS scheduling, which makes reproducing a timing bug notoriously hard. In Cerulion, the graph fixes which node depends on which and when each may fire. It does not fix the live schedule: workers run independently and the host OS schedules them. A recording keeps what the graph file cannot, the inputs each node read and the scheduling decisions made. `cerulion bag play --resim all --verify` re-runs a supported native recording against your current node builds and compares the outputs it covers; exit 1 names the topic that changed. A pass means the covered outputs matched, so check what the bag covers with `cerulion bag info`. ROS 2 processes have a separate replay path: record them with `cerulion ros2 run --record-deliveries`, then replay one process at a time with `cerulion ros2 run --replay-deliveries`. See [Execution order](/cerulion/execution-order) for the user-facing controls, and [Record and replay a run](/cerulion/guides/record-and-replay) for the workflow. ### Predictable, low-jitter tails In Cerulion's internal benchmarks the multi-process p99 is 6.61 µs at 64 B and 10.45 µs at 16 MiB; the single-process p99 is 9.41 µs and 14.23 µs. The tail stays within a few multiples of the median at every payload size. See the benchmark notes below before comparing individual cells. ### Timing violations are loud, not silent ROS 2's DDS `DEADLINE` QoS exists but is easy to misconfigure or have silently ignored by the RMW. In Cerulion a deadline is an attribute on the node that owns it — `expect_within_ms` on an input, `promise_within_ms` on an output, `tick_within_ms` on the tick itself — and each one carries a miss counter and emits a structured warning the moment it slips. The count is observable state, not log text you have to grep for. See [Backpressure and deadlines](/cerulion/guides/backpressure-and-deadlines). ### One source of truth, less config sprawl In ROS 2, behavior is spread across code, launch files, parameter YAMLs, and QoS profiles that can silently conflict. In Cerulion, node behavior lives on the macro — there is no policy block in graph YAML to contradict it — and the graph file carries the wiring plus how the graph is deployed. No silent overrides, no config drift. ### A shallow learning curve ROS 2 has a steep ramp: DDS QoS matrices, launch files, parameter plumbing. Cerulion asks you to write a Rust struct with `#[cerulion_node]` and a `tick()` under `#[cerulion_node_impl]`; the CLI scaffolds the workspace, nodes, and graph for you. ### A memory-safe Rust foundation ROS 2's core client library (`rclcpp`) is C++, exposed to whole classes of memory bugs. Cerulion is built in Rust: memory safety without a garbage collector, and predictable performance. ## The performance story Cerulion's strongest performance claim is **payload flatness**. In the multi-process default, the median round trip is 3.97 µs to 4.43 µs from 64 B to 16 MiB; single-process it is 2.66 µs to 2.80 µs. Over the same range the ROS 2 defaults median goes from 311 µs to 103.9 ms. The product default is the multi-process column, not the single-process result. Round-trip latency at a nominal 100 Hz publish rate, single machine, one publisher/subscriber pair. Both ROS 2 lanes are ROS 2 Jazzy. | Payload | Cerulion (multi-process, default) | ROS 2 (defaults) | vs. ROS 2 defaults | Cerulion (single process) | ROS 2 (composed + intra-process) | | - | - | - | - | - | - | | 64 B | 4.07 µs | 311 µs | 76× | 2.69 µs | 24.6 µs | | 256 B | 3.97 µs | 310 µs | 78× | 2.68 µs | 28.3 µs | | 1 KiB | 4.01 µs | 410 µs | 102× | 2.66 µs | 28.5 µs | | 4 KiB | 4.01 µs | 442 µs | 110× | 2.68 µs | 28.4 µs | | 16 KiB | 4.02 µs | 464 µs | 116× | 2.70 µs | 28.9 µs | | 64 KiB | 4.04 µs | 464 µs | 115× | 2.75 µs | 25.9 µs | | 256 KiB | 4.04 µs | 483 µs | 120× | 2.71 µs | 27.7 µs | | 1 MiB | 4.08 µs | 11.0 ms | 2,687× | 2.76 µs | 29.8 µs | | 4 MiB | 4.33 µs | 12.9 ms | 2,983× | 2.77 µs | 33.6 µs | | 16 MiB | 4.43 µs | 103.9 ms | 23,422× | 2.80 µs | 33.4 µs | All values are p50, the median of five per-repetition medians. The `vs. ROS 2 defaults` column is the ratio of the ROS 2 defaults p50 to the Cerulion multi-process p50, computed from unrounded p50s; dividing the rounded values shown may not reproduce the ratios exactly. The figures are printed as the [benchmark package](https://github.com/cerulion-inc/cerulion/blob/main/docs/benchmarks/results/8a84baf25d5d1710-2026-09-16-fixed100-heroes/HEADLINE.md) prints them. > [!NOTE] > > These are **internal benchmarks**, single machine, one > publisher/subscriber pair. They are not guarantees and have no error bars. > They were measured on 2026-09-16 on one x86-64 Linux desktop (24-core Intel > Core Ultra 9 285K, stock settings with no real-time tuning, performance > governor), with the Cerulion recorder on, as it is by default. The > multi-process lane ran in free-run mode, the default for a multi-process > run. Every row sustained the 100 Hz target on all four lanes. > The `ROS 2 (defaults)` lane is the zero-config `ros2 run` experience on Jazzy: > default RMW (`rmw_fastrtps_cpp`), no profiles XML, no transport environment, > plain `publish()` plus typed-callback receive, and three separate processes. > It claims no transport-engagement label: its claim is "the defaults, > whatever they do." > The composed lane is a single process with the nodes on one executor and > intra-process communications enabled, which is why its latency is payload-flat. > Its shape-matched Cerulion counterpart is the single-process column, not the > multi-process default. > The process-count asymmetry is explicit: Cerulion multi-process uses 2 worker > processes with 1 process crossing inside the measured window; ROS 2 defaults > use 3 processes with 2 crossings. Executor models also differ > (native graph workers versus independent `rclcpp` executors). ### Reading the table * **Payload flatness.** Cerulion multi-process holds 3.97 µs to 4.43 µs from 64 B to 16 MiB; single-process holds 2.66 µs to 2.80 µs. This is the shape claim, and it is the strongest one. * **Default-vs-default lead.** Cerulion is 76× to 120× faster than ROS 2 defaults at control-loop payloads (64 B to 256 KiB); 2,687× at a 1 MiB depth frame; 23,422× at a 16 MiB dense scan. These figures describe *ROS 2 defaults*, never ROS 2 in every possible configuration. * **Against ROS 2 configured for speed.** ROS 2 composed with intra-process communications is 24.6 µs to 33.6 µs, still behind both Cerulion columns, and unlike the defaults it is payload-flat too. * **Tail.** Multi-process p99 is 6.61 µs at 64 B and 10.45 µs at 16 MiB; single-process p99 is 9.41 µs at 64 B and 14.23 µs at 16 MiB. * **Rate.** Every published row sustained the 100 Hz target on all four lanes. > [!NOTE] > > **Beyond one machine.** The figures above are the single-machine graph, which is > where the zero-copy path lives. Across machines, Cerulion runs a network layer > on the same core: `cerulion topic list` finds the robots on your account, on > one LAN or across networks, with no configuration, and `cerulion connect` pulls a robot's topics onto your desk as > if they were local. See > [Networking and remote robots](/cerulion/guides/network-and-remote-robots). ## What you get With a graph file as your source of truth, you get flat latency at sensor payload sizes without tuning, recordings you can re-run your code against, and loud deadline misses. Put those behaviors into practice with [execution order](/cerulion/execution-order), [run a graph across processes](/cerulion/guides/run-multi-process), and [record and replay a run](/cerulion/guides/record-and-replay). ## Next steps > [card] [Core concepts](/cerulion/concepts) > > Workspaces, nodes, graphs, topics, and schemas: the mental model. > [card] [Execution order](/cerulion/execution-order) > > See how your graph determines levels, triggers, clocks, and process layout. > [card] [Quickstart](/cerulion/quickstart) > > Go from zero to a running graph you can observe with `topic echo`. > [card] [Define a node](/cerulion/guides/define-a-node) > > Create a node type, choose a trigger policy, and write `tick()`. > [card] [CLI reference](/cerulion/reference/cli) > > Every command and flag, in one place. # Cerulion Source: https://docs.cerulion.com/index Cerulion is the operating system for physical AI. An open-source, zero-copy robot runtime for Linux and macOS, ROS 2 compatible. Open-source robot runtime Cerulion is the operating system for physical AI. **An open-source, zero-copy robot runtime that records runs, replays failures against new code, and reaches your robots from anywhere. It's ROS 2 compatible.** [Try the Quickstart](/cerulion/quickstart) [Explore the source ↗](https://github.com/cerulion-inc/cerulion) ![Conceptual robotics lab: a camera's data flows to a workstation, robotic arm, and mobile platform beside a humanoid.](https://mintcdn.com/cerulion-5327fd47/c4yo1-kf9ksD3z0q/images/home-lab-light.webp?fit=max\&auto=format\&n=c4yo1-kf9ksD3z0q\&q=85\&s=e8f7997fd5e1947a194d71e249dccb51) ## What Cerulion is Cerulion is an open-source Rust runtime for robots and real-time systems. You compose your application as a **graph** of **nodes** that pass messages over zero-copy shared memory, and you build, wire, and run the whole thing through one CLI: `cerulion`. Nodes on one machine exchange messages through shared memory, with no serialization on the local path. In internal benchmarks on one x86-64 Linux desktop, a 1 MiB round trip with the default multi-process layout has a median of 4.08 µs, close to the 2.48 µs of raw iceoryx2 shared memory; see the [benchmark results](https://github.com/cerulion-inc/cerulion/blob/main/docs/benchmarks/results/8a84baf25d5d1710-2026-09-16-fixed100-heroes/HEADLINE.md). A run records to a standard MCAP bag, and `cerulion bag play --resim all --verify` re-runs a supported recording against your current node builds and compares the outputs. Flashback saves the moments around a failure from a rolling in-memory window. A robot's topics are readable from any computer signed in to the same account, on one LAN or across networks. The [CLI and runtime are open source](https://github.com/cerulion-inc/cerulion) under AGPL-3.0-only, with a commercial license available. [Install the CLI](/cerulion/installation) and run the quickstart. ## Why teams use it > [card] Zero-copy pub/sub > > Nodes exchange messages over iceoryx2 shared memory. Reads and writes go > straight to the payload, with no serialization on the local hot path. > [card] Record and re-execute > > Record a live run to a standard MCAP bag, then re-run your current node > builds against it and see which outputs changed. > [card] Flashback > > Save the moments around a failure from a rolling in-memory window, on > request or when the runtime detects a fault. > [card] Trigger policies > > Decide when each node fires (periodic, data-triggered, synchronized, or > external) with per-node tick deadlines that warn loudly when missed. > [card] Ergonomic node API > > Define a node as a Rust struct with `#[cerulion_node]`. Field attributes > declare ports; the macro rewrites `self.` access into zero-copy > shared-memory reads and writes for you. > [card] Fault isolation by default > > On Linux and macOS a live graph runs as separate worker processes. A crash > is contained to its own process, and the surviving workers keep running, > degraded, by default. > [card] Works with ROS 2 > > 254 built-in ROS 2 message types. `rmw_cerulion` runs ROS 2 nodes on > Cerulion's transport, tested on Foxy, Galactic, Humble, Jazzy and Lyrical, > and `cerulion ros2 attach` bridges an existing DDS robot's topics into a > Cerulion graph. > [card] Your robots from your desk > > Sign the robot and your computer in to the same account, and read its > topics from your desk, on one LAN or across networks. ## Start here > [card] [Installation](/cerulion/installation) > > Set up the Rust toolchain, get the `cerulion` CLI, and verify it works. > [card] [Quickstart](/cerulion/quickstart) > > Build and run a complete two-node graph, then watch its messages with > `topic echo`. > [card] [Concepts](/cerulion/concepts) > > Learn the mental model: workspaces, nodes, graphs, topics, and schemas. ## Hindsight and the hosted MCP server The runtime is open source. Hindsight and the hosted MCP server are closed source and in early access: [book 30 minutes with us](https://link.cerulion.com/book/docs) to get access. > [card] [Hindsight](/cerulion/hindsight) > > **Early access.** Point it at a recording and find the moment the run went > sideways, with every claim cited to a topic and timestamp. > [card] [Connect an MCP client](/cerulion/guides/connect-an-mcp-client) > > **Early access.** Give your coding agent tools that analyze MCAP recordings > served over HTTPS. Build and run your workspace with the `cerulion` CLI. ## Build with the community ![](https://mintcdn.com/cerulion-5327fd47/6IFTdIgnufeWJzYG/images/community-lion.png?fit=max\&auto=format\&n=6IFTdIgnufeWJzYG\&q=85\&s=e2cf9680320c0ce4e7885701850a2ec4) **Meet us on Discord**Get unstuck. Share a run. Start contributing. [Open](/cerulion/community)