From ae2f8761a1d27d5cb11c3cbcabdbeeaf2075b997 Mon Sep 17 00:00:00 2001 From: jbernavaprah Date: Thu, 11 Jun 2026 10:49:21 +0200 Subject: [PATCH] feat!: migrate to phoxal v0.5.0 typed bus Bump phoxal 0.4.0 -> 0.5.0. rerun-proxy subscriptions moved to fluent typed topics (frame/joint/odometry/drive/presence + component(id).(cap) with ANY wildcards for camera/depth profiles); Stamped -> Received{at_ns,value} (at_ns drives Rerun time); asset fetch via bus.request. No subscriber_builder / path() / TypedSchema. Known gap: the v0.5.0 topic tree lacks fluent leaves for microphone/speaker capabilities, so those visualization paths were removed pending the leaves being added to the framework tree (follow-up: phoxal v0.5.x). Verified: cargo check/build/test green (17 tests). Co-Authored-By: Claude Opus 4.8 --- .DS_Store | Bin 0 -> 6148 bytes Cargo.lock | 5 +- Cargo.toml | 2 +- src/.DS_Store | Bin 0 -> 6148 bytes src/assets.rs | 14 +- src/capability/accelerometer.rs | 10 +- src/capability/battery.rs | 10 +- src/capability/camera.rs | 10 +- src/capability/depth.rs | 14 +- src/capability/encoder.rs | 10 +- src/capability/gnss.rs | 10 +- src/capability/gyroscope.rs | 11 +- src/capability/imu.rs | 10 +- src/capability/lidar.rs | 10 +- src/capability/magnetometer.rs | 10 +- src/capability/microphone.rs | 19 - src/capability/mmwave.rs | 20 +- src/capability/mod.rs | 96 ++-- src/capability/range.rs | 10 +- src/capability/speaker.rs | 19 - src/event.rs | 74 ++- src/frame_graph.rs | 8 +- src/logging/drive.rs | 16 +- src/logging/helpers.rs | 6 +- src/logging/joint.rs | 10 +- src/logging/odometry.rs | 12 +- src/logging/static_scene.rs | 2 +- src/main.rs | 12 +- src/scene.rs | 4 +- src/subscriptions.rs | 870 ++++++++------------------------ src/system.rs | 8 +- 31 files changed, 395 insertions(+), 917 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store delete mode 100644 src/capability/microphone.rs delete mode 100644 src/capability/speaker.rs diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b9492eab2dca008deffd217cb57ee7ee26ca7077 GIT binary patch literal 6148 zcmeHKJ8l9&47FK`m1rnaPLT_6g9+Lk03oGDfD{VQq9FS1D02`Fl5?bwlq=-<6J^nc zC=~_RlIQK%elwa^tY?Ub$NS}oXh=jQT#ybjbWQT&9qW0d4`f+mG+or2twu5bmkGC^ z9lg+E{oLk%9)B{Mx~k^udX7l>^!|E3`FMM1XP19ux2x8w#SFBtP#_ct1ww&P;HDMu z9$gM@T7@`#C=d$#rhxn(5?nAlHir7^z@Se6pj_kC@U3qNV3GhZJ2r-hz}Tojqq09S z*yxBSugi{&q0xzTXRPBpv%gSScSk&FIdL|OF%$>|P8BF@I+XtZ2tV`wKPAO16bJ>b zN&)Uy(`t+(d2j6;PI_&E&*0yNS}n(*tr)1S7!zs5cdfc4-^gdj#!%^qD;*dY0nsHa I6u5)}Uy&9l*Z=?k literal 0 HcmV?d00001 diff --git a/Cargo.lock b/Cargo.lock index 6e00d24..bc68e00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3141,14 +3141,15 @@ dependencies = [ [[package]] name = "phoxal" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069b276097c1231660a800e2fc27719cf4cc9d42e0f8928589d96da8db877847" +checksum = "28e98fd325a693585a7ba0db4dfbffa940b913217630bd412c3e82f077f77ce4" dependencies = [ "anyhow", "arc-swap", "async-trait", "clap", + "const_format", "derive-new", "derive_setters", "dotenvy", diff --git a/Cargo.toml b/Cargo.toml index 7ed2f39..3adc032 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ serde = { version = "1.0.228", features = ["derive"] } tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "time", "signal", "sync", "fs"] } tracing = "0.1.44" urdf-rs = "0.9.0" -phoxal = { version = "0.4.0" } +phoxal = { version = "0.5.0" } [workspace.lints.rust] unused = "warn" diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..693a1c63c9f87fcd92c9b4f19cf60fa7f1659c1e GIT binary patch literal 6148 zcmeHKu};G<5IvVl1Q_VZ=wIj`m@0fhN0yRS3Y8L^0R}dI5#lfS1Ac%JAtWTkz`{G9 zDG4DG69RM>ou6~Qvo9}E&L$!=yI4($CPb7$8Am&4z7QT~?a3%vc+kW-3R+VIJ*Uf_ zw;FyU1N`oGX-Oy4KwIyxDyQ?MuNz7F_?7RB5Z*$sO z-|+WI+xWITmAKY)MrAj{{oB4rJGZBY=l9$`%~Si2tcJZh`Ot#%QBekz0cGH?GJu-R zlI;m6(rjCs<^CY?}ZrwF@^?qr;xw#tAq&}CptZYNy-kA~0x-5|YF29$w+ z#ef;-^L&O!O0~83a9nFGbOB{yzaY2?K_`}C_;M*efJTAcatG)V20>ULx)F#pXrm1L GC Result> { - match phoxal::api::asset::v1::get::query(bus, &AssetRequest::new(path), retry).await? { + match bus + .request( + &topic::new().v1().asset().get(), + &AssetRequest::new(path), + retry, + ) + .await? + { Some(AssetResponse::Ok { bytes }) => Ok(bytes), Some(AssetResponse::NotFound) => Err(anyhow!("asset '{path}' was not found")), Some(AssetResponse::InvalidPath(reason)) => { diff --git a/src/capability/accelerometer.rs b/src/capability/accelerometer.rs index d8e3cb1..2f37e12 100644 --- a/src/capability/accelerometer.rs +++ b/src/capability/accelerometer.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::accelerometer::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::accelerometer::Sample; +use phoxal::bus::typed::Received; use rerun::{Arrows3D, RecordingStream}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,12 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/acceleration").as_str(), - &Arrows3D::from_vectors([*stamped.data.linear_acceleration()]) + &Arrows3D::from_vectors([*received.value.linear_acceleration()]) .with_origins([[0.0, 0.0, 0.0]]), )?; Ok(()) diff --git a/src/capability/battery.rs b/src/capability/battery.rs index ab807ee..8561035 100644 --- a/src/capability/battery.rs +++ b/src/capability/battery.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::battery::State; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::battery::State; +use phoxal::bus::typed::Received; use rerun::{RecordingStream, Scalars}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,12 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/battery_percentage").as_str(), - &Scalars::new([f64::from(stamped.data.percentage())]), + &Scalars::new([f64::from(received.value.percentage())]), )?; Ok(()) } diff --git a/src/capability/camera.rs b/src/capability/camera.rs index e737ee7..e7f38df 100644 --- a/src/capability/camera.rs +++ b/src/capability/camera.rs @@ -1,6 +1,6 @@ use anyhow::{Result, anyhow, ensure}; -use phoxal::api::component::v1::capability::camera::{Encoding, Frame}; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::camera::{Encoding, Frame}; +use phoxal::bus::typed::Received; use phoxal::model::component::v1::capability::Capability; use rerun::{Image, RecordingStream}; @@ -12,12 +12,12 @@ pub(crate) fn log( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - let frame = &stamped.data; + let frame = &received.value; let resolution = [frame.width(), frame.height()]; - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); let image_entity_path = scene.image_entity_path(capability_id)?; if let Some(pinhole) = camera_pinhole(scene, capability_id, resolution)? { rec.log(image_entity_path.as_str(), &pinhole)?; diff --git a/src/capability/depth.rs b/src/capability/depth.rs index 1b13041..61e5dde 100644 --- a/src/capability/depth.rs +++ b/src/capability/depth.rs @@ -1,7 +1,7 @@ use anyhow::{Result, anyhow}; use image::{ExtendedColorType, ImageEncoder, codecs::png::PngEncoder}; -use phoxal::api::component::v1::capability::depth::{Depth, MILLIMETERS_PER_METER}; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::depth::{Depth, MILLIMETERS_PER_METER}; +use phoxal::bus::typed::Received; use phoxal::model::component::v1::capability::Capability; use rerun::{EncodedDepthImage, RecordingStream, components::MediaType}; @@ -13,7 +13,7 @@ pub(crate) fn log( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { let capability = scene.capability(capability_id)?; let Capability::Depth(depth) = capability else { @@ -21,9 +21,9 @@ pub(crate) fn log( "capability '{capability_id}' is not a depth capability" )); }; - let resolution = payload_resolution(&stamped.data, [depth.width_px, depth.height_px])?; + let resolution = payload_resolution(&received.value, [depth.width_px, depth.height_px])?; - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); let image_entity_path = scene.image_entity_path(capability_id)?; if let Some(pinhole) = pinhole_from_horizontal_fov(resolution, depth.field_of_view_rad) { rec.log(image_entity_path.as_str(), &pinhole)?; @@ -32,7 +32,7 @@ pub(crate) fn log( let depth_entity_path = scene.depth_entity_path(capability_id)?; rec.log( depth_entity_path.as_str(), - &EncodedDepthImage::new(samples_to_png(stamped.data.samples_mm(), resolution)?) + &EncodedDepthImage::new(samples_to_png(received.value.samples_mm(), resolution)?) .with_media_type(MediaType::png()) .with_meter(MILLIMETERS_PER_METER) .with_point_fill_ratio(0.35), @@ -80,7 +80,7 @@ fn samples_to_native_bytes(samples: &[u16]) -> Vec { #[cfg(test)] mod tests { use image::ImageReader; - use phoxal::api::component::v1::capability::depth::Depth; + use phoxal::api::v1::component::capability::depth::Depth; use super::{payload_resolution, samples_to_png}; diff --git a/src/capability/encoder.rs b/src/capability/encoder.rs index e7fd090..f1232aa 100644 --- a/src/capability/encoder.rs +++ b/src/capability/encoder.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::encoder::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::encoder::Sample; +use phoxal::bus::typed::Received; use rerun::{RecordingStream, Scalars}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,12 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/ticks").as_str(), - &Scalars::new([stamped.data.ticks() as f64]), + &Scalars::new([received.value.ticks() as f64]), )?; Ok(()) } diff --git a/src/capability/gnss.rs b/src/capability/gnss.rs index 17c63de..fe51c43 100644 --- a/src/capability/gnss.rs +++ b/src/capability/gnss.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::gnss::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::gnss::Sample; +use phoxal::bus::typed::Received; use rerun::{RecordingStream, Scalars}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,12 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/gnss_altitude").as_str(), - &Scalars::new([stamped.data.altitude()]), + &Scalars::new([received.value.altitude()]), )?; Ok(()) } diff --git a/src/capability/gyroscope.rs b/src/capability/gyroscope.rs index 1d976c5..86af783 100644 --- a/src/capability/gyroscope.rs +++ b/src/capability/gyroscope.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::gyroscope::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::gyroscope::Sample; +use phoxal::bus::typed::Received; use rerun::{Arrows3D, RecordingStream}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,13 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/angular_velocity").as_str(), - &Arrows3D::from_vectors([*stamped.data.angular_velocity()]).with_origins([[0.0, 0.0, 0.0]]), + &Arrows3D::from_vectors([*received.value.angular_velocity()]) + .with_origins([[0.0, 0.0, 0.0]]), )?; Ok(()) } diff --git a/src/capability/imu.rs b/src/capability/imu.rs index b99d95e..75f0318 100644 --- a/src/capability/imu.rs +++ b/src/capability/imu.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::imu::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::imu::Sample; +use phoxal::bus::typed::Received; use rerun::{Quaternion, RecordingStream, Transform3D}; use crate::logging::helpers::set_logical_time; @@ -9,10 +9,10 @@ use crate::visuals::reorder_wxyz_to_xyzw; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); - if let Some(orientation) = stamped.data.orientation() { + set_logical_time(rec, received.at_ns); + if let Some(orientation) = received.value.orientation() { rec.log( format!("{capability_entity_path}/orientation").as_str(), &Transform3D::from_translation_rotation( diff --git a/src/capability/lidar.rs b/src/capability/lidar.rs index 09c53c4..d7c283a 100644 --- a/src/capability/lidar.rs +++ b/src/capability/lidar.rs @@ -1,6 +1,6 @@ use anyhow::{Result, anyhow}; -use phoxal::api::component::v1::capability::lidar::Scan; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::lidar::Scan; +use phoxal::bus::typed::Received; use phoxal::model::component::v1::CapabilityRef; use phoxal::model::component::v1::capability::{Capability, LidarOutput}; use rerun::{Clear, Points3D, RecordingStream}; @@ -13,11 +13,11 @@ pub(crate) fn log( scene: &SceneModel, capability_entity_path: &str, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); - match &stamped.data { + match &received.value { Scan::Ranges(scan) => { let config = lidar_config(scene, capability_id)?; if config.output != LidarOutput::Ranges { diff --git a/src/capability/magnetometer.rs b/src/capability/magnetometer.rs index 9cf90ae..b5a4804 100644 --- a/src/capability/magnetometer.rs +++ b/src/capability/magnetometer.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::magnetometer::Sample; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::magnetometer::Sample; +use phoxal::bus::typed::Received; use rerun::{Arrows3D, RecordingStream}; use crate::logging::helpers::set_logical_time; @@ -8,12 +8,12 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); + set_logical_time(rec, received.at_ns); rec.log( format!("{capability_entity_path}/magnetic_field").as_str(), - &Arrows3D::from_vectors([*stamped.data.magnetic_field()]).with_origins([[0.0, 0.0, 0.0]]), + &Arrows3D::from_vectors([*received.value.magnetic_field()]).with_origins([[0.0, 0.0, 0.0]]), )?; Ok(()) } diff --git a/src/capability/microphone.rs b/src/capability/microphone.rs deleted file mode 100644 index 619c6d5..0000000 --- a/src/capability/microphone.rs +++ /dev/null @@ -1,19 +0,0 @@ -use anyhow::Result; -use phoxal::api::component::v1::capability::microphone::Frame; -use phoxal::bus::pubsub::Stamped; -use rerun::{RecordingStream, Scalars}; - -use crate::logging::helpers::set_logical_time; - -pub(crate) fn log( - rec: &RecordingStream, - capability_entity_path: &str, - stamped: &Stamped, -) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); - rec.log( - format!("{capability_entity_path}/audio_bytes").as_str(), - &Scalars::new([stamped.data.data().len() as f64]), - )?; - Ok(()) -} diff --git a/src/capability/mmwave.rs b/src/capability/mmwave.rs index 477b7b9..862852a 100644 --- a/src/capability/mmwave.rs +++ b/src/capability/mmwave.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use phoxal::api::component::v1::capability::mmwave::Scan; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::mmwave::Scan; +use phoxal::bus::typed::Received; use rerun::{Arrows3D, Clear, Points3D, RecordingStream, Scalars}; use crate::logging::helpers::set_logical_time; @@ -8,23 +8,23 @@ use crate::logging::helpers::set_logical_time; pub(crate) fn log( rec: &RecordingStream, capability_entity_path: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - set_logical_time(rec, stamped.timestamp_ns); - let positions = stamped - .data + set_logical_time(rec, received.at_ns); + let positions = received + .value .detections() .iter() .map(|detection| detection.position) .collect::>(); - let velocities = stamped - .data + let velocities = received + .value .detections() .iter() .map(|detection| detection.velocity) .collect::>(); - let snr = stamped - .data + let snr = received + .value .detections() .iter() .map(|detection| f64::from(detection.snr)) diff --git a/src/capability/mod.rs b/src/capability/mod.rs index 731878c..adf0c1a 100644 --- a/src/capability/mod.rs +++ b/src/capability/mod.rs @@ -8,123 +8,119 @@ mod gyroscope; mod imu; mod lidar; mod magnetometer; -mod microphone; mod mmwave; mod range; -mod speaker; use crate::scene::SceneModel; use anyhow::Result; -use phoxal::api::component::v1::capability::accelerometer::Sample as AccelerometerSample; -use phoxal::api::component::v1::capability::battery::State as BatteryState; -use phoxal::api::component::v1::capability::camera::Frame as CameraFrame; -use phoxal::api::component::v1::capability::depth::Depth; -use phoxal::api::component::v1::capability::encoder::Sample as EncoderSample; -use phoxal::api::component::v1::capability::gnss::Sample as GnssSample; -use phoxal::api::component::v1::capability::gyroscope::Sample as GyroscopeSample; -use phoxal::api::component::v1::capability::imu::Sample as ImuSample; -use phoxal::api::component::v1::capability::lidar::Scan as LidarScan; -use phoxal::api::component::v1::capability::magnetometer::Sample as MagnetometerSample; -use phoxal::api::component::v1::capability::microphone::Frame as MicrophoneFrame; -use phoxal::api::component::v1::capability::mmwave::Scan as MmwaveScan; -use phoxal::api::component::v1::capability::range::Sample as RangeSample; -use phoxal::api::component::v1::capability::speaker::audio::Audio; -use phoxal::bus::pubsub::Stamped; +use phoxal::api::v1::component::capability::accelerometer::Sample as AccelerometerSample; +use phoxal::api::v1::component::capability::battery::State as BatteryState; +use phoxal::api::v1::component::capability::camera::Frame as CameraFrame; +use phoxal::api::v1::component::capability::depth::Depth; +use phoxal::api::v1::component::capability::encoder::Sample as EncoderSample; +use phoxal::api::v1::component::capability::gnss::Sample as GnssSample; +use phoxal::api::v1::component::capability::gyroscope::Sample as GyroscopeSample; +use phoxal::api::v1::component::capability::imu::Sample as ImuSample; +use phoxal::api::v1::component::capability::lidar::Scan as LidarScan; +use phoxal::api::v1::component::capability::magnetometer::Sample as MagnetometerSample; +use phoxal::api::v1::component::capability::mmwave::Scan as MmwaveScan; +use phoxal::api::v1::component::capability::range::Sample as RangeSample; +use phoxal::bus::typed::Received; use rerun::RecordingStream; pub(crate) fn log_imu( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - imu::log(rec, scene.capability_entity_path(capability_id)?, stamped) + imu::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_accelerometer( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - accelerometer::log(rec, scene.capability_entity_path(capability_id)?, stamped) + accelerometer::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_gyroscope( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - gyroscope::log(rec, scene.capability_entity_path(capability_id)?, stamped) + gyroscope::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_gnss( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - gnss::log(rec, scene.capability_entity_path(capability_id)?, stamped) + gnss::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_battery( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - battery::log(rec, scene.capability_entity_path(capability_id)?, stamped) + battery::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_encoder( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - encoder::log(rec, scene.capability_entity_path(capability_id)?, stamped) + encoder::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_camera( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - camera::log(rec, scene, capability_id, stamped) + camera::log(rec, scene, capability_id, received) } pub(crate) fn log_depth( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - depth::log(rec, scene, capability_id, stamped) + depth::log(rec, scene, capability_id, received) } pub(crate) fn log_range( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - range::log(rec, scene.capability_entity_path(capability_id)?, stamped) + range::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_lidar( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { lidar::log( rec, scene, scene.capability_entity_path(capability_id)?, capability_id, - stamped, + received, ) } @@ -132,34 +128,16 @@ pub(crate) fn log_magnetometer( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, + received: &Received, ) -> Result<()> { - magnetometer::log(rec, scene.capability_entity_path(capability_id)?, stamped) -} - -pub(crate) fn log_microphone( - rec: &RecordingStream, - scene: &SceneModel, - capability_id: &str, - stamped: &Stamped, -) -> Result<()> { - microphone::log(rec, scene.capability_entity_path(capability_id)?, stamped) + magnetometer::log(rec, scene.capability_entity_path(capability_id)?, received) } pub(crate) fn log_mmwave( rec: &RecordingStream, scene: &SceneModel, capability_id: &str, - stamped: &Stamped, -) -> Result<()> { - mmwave::log(rec, scene.capability_entity_path(capability_id)?, stamped) -} - -pub(crate) fn log_speaker_data( - rec: &RecordingStream, - scene: &SceneModel, - capability_id: &str, - stamped: &Stamped