This repository was archived by the owner on Jul 2, 2026. It is now read-only.
feat: port bno085/vl53l1x/zed_f9p/oak_d_lite to phoxal 0.16#8
Merged
Conversation
Port the four remaining sensor component drivers from the old phoxal 0.9 Runtime trait onto the new #[derive(phoxal::Runtime)] pattern (matching the already-migrated ddsm115), publishing the recovered y2026_1 component-capability contracts. - bno085: imu + accelerometer + gyroscope - vl53l1x: range (distance from the Range capability's max_range_m) - zed_f9p: gnss (was previously unimplemented; now a working stub publisher) - oak_d_lite: camera (per distinct capability id: left_mono/rgb/right_mono) + depth + imu + accelerometer + gyroscope Each driver discovers its capabilities from the resolved component model (ctx.robot().component_for_instance) rather than hardcoding ids, so a component with multiple same-kind capabilities (oak_d_lite's three cameras) is handled. A fixed #[step] clock plus a per-capability divisor (round(step_hz / publish_rate_hz)) reproduces the old per-capability publish rates. Backends are simulation stubs (as the old bno085/vl53l1x were; zed_f9p/oak_d_lite were unimplemented) - real hardware backends are a follow-up. Workspace moves to phoxal 0.16 (incl. ddsm115); clap/tokio/async-trait/tracing dropped per crate (the framework owns the runtime + CLI). Old src/runtime.rs modules removed; each driver is a single src/main.rs. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports the four remaining sensor component drivers from the old phoxal 0.9
Runtimetrait onto the new#[derive(phoxal::Runtime)]pattern (matching the already-migratedddsm115), publishing the recoveredy2026_1component-capability contracts (framework #108, shipped in phoxal 0.16.0).bno085vl53l1xRangecapability'smax_range_m)zed_f9poak_d_liteleft_mono/rgb/right_mono) + depth + imu + accelerometer + gyroscopeDesign
ctx.robot()?.component_for_instance(&instance)) instead of hardcoding ids, so a component with multiple same-kind capabilities — oak_d_lite's three cameras — is handled by binding one publisher per capability id. The derive recognizesVec<Publisher<T>>and reports each contract once.#[step(hz=N)]needs a compile-time literal, so each driver runs at a fixed max rate and gates each capability withdivisor = round(step_hz / publish_rate_hz), reproducing the old per-capability publish rates.Workspace
Moves to
phoxal = "0.16"(including ddsm115, now on the workspace dep). Per-crateclap/tokio/async-trait/tracingdropped (the framework owns the runtime + CLI parsing). Oldsrc/runtime.rsmodules removed; each driver is a singlesrc/main.rs.Verification
cargo build,cargo test(11 tests),cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all -- --check— all greenemit-apistests assert the expected publish contracts; helper tests cover the divisor + frame-sizing logicapi::component::*types; capability discovery validated against eachcomponent.yaml🤖 Generated with Claude Code