Skip to main content

Crate clankers_data

Crate clankers_data 

Source
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

TypeRole
McapLogOpen a log and produce an InspectReport
ReplayStream messages with optional per-message handler
ReplaySummaryCounts, duration, topics seen
CompareReportDiff two logs (used by clankers compare)
McapWriterWrite 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;

Modules§

compare
inspect
log
replay
sample
writer