Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
members = [
"system/atlas",
"system/chronos/clock",
"system/chronos",
"system/executor",
"system/liaison",
"system/pilot",
Expand Down
10 changes: 10 additions & 0 deletions system/chronos/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "robonix-chronos"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Robonix Chronos clock-domain models"

[dependencies]
serde.workspace = true
thiserror.workspace = true
24 changes: 10 additions & 14 deletions system/chronos/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# Chronos — unified time
# Chronos

One of the 12 Robonix system components. Provides a single monotonic
time source plus PTP / IEEE-1588 alignment between hardware (lidar,
camera, IMU, chassis odometry) and the runtime.
`robonix-chronos` provides `ChronosCore`: a deterministic device-to-reference clock model library. Register a clock domain and policy, submit paired `ClockObservation` values, then query status, model coefficients or conversions. It does not read host clocks or run a process.

**Status — v0.1 stub.** Not yet implemented.
The core bounds its observation window, checks integer conversion overflow, tracks reference/device generations, and handles wrap, outliers, holdover and reset. Model updates support step and bounded slew.

For now, components read system wall time / per-sensor timestamps
directly. Scene / mapping fuse multimodal data on their own. Chronos
will absorb that responsibility in v0.2.
Fitted rates outside the signed coefficient range are rejected, including a floating-point rate that rounds to the exclusive upper boundary.

When implemented, Chronos will:
Refreshing a new generation preserves retained models from earlier generations; their freshness cannot be computed from the new observations.

- expose a single `time/now` capability returning a monotonic, machine-
global time stamp consistent with sensor headers,
- run a PTP master/slave loop (1588v2) to discipline NIC clocks across
the body's compute units,
- emit drift / sync-quality metrics to [vitals](../vitals/).
A strictly newer reference generation clears `Fault` to `Reset` and replaces its diagnostic reason. A retained model becomes `Unsynced` with its old generation identity until refitting. Equal-generation updates are idempotent, and reference availability recovery preserves `Fault`.

Outlier checks include the configured drift allowance over steady time since the last accepted observation, so permitted rate changes and observations within holdover uncertainty can update the model. Larger residuals remain rejected.

Run `cargo test -p robonix-chronos --test core`.
Loading
Loading