Expand description
§MCAP logging, replay, and inspection
Read, write, inspect, and compare robot logs in MCAP format.
Works with the clankers CLI (clankers inspect, clankers replay, clankers compare)
and with ReplayContext in tests.
§Inspect a log
use clankers_data::{format_inspect_report, McapLog};
let log = McapLog::open("sample_data/camera_log.mcap")?;
println!("{}", format_inspect_report(log.report()));§Replay messages
use clankers_data::Replay;
let replay = Replay::from_mcap("sample_data/camera_log.mcap")?;
let result = replay.run(|_msg| async { Ok(()) }).await?;
println!("handled {} messages", result.summary.input_messages);§Key types
| Type | Role |
|---|---|
McapLog | Open a log and produce an InspectReport |
Replay | Stream messages with optional per-message handler |
ReplaySummary | Counts, duration, topics seen |
CompareReport | Diff two logs (used by clankers compare) |
McapWriter | Write MCAP files from nodes |
Re-exports§
pub use compare::compare_logs;pub use compare::format_compare_report;pub use compare::CompareReport;pub use inspect::format_inspect_report;pub use inspect::InspectReport;pub use inspect::McapLog;pub use log::McapRecord;pub use replay::Replay;pub use replay::ReplayResult;pub use replay::ReplaySummary;pub use writer::McapWriter;