feat(tf): add hiroz-tf crate with TF2 listener, broadcaster, and buffer#191
Open
YuanYuYuan wants to merge 17 commits into
Open
feat(tf): add hiroz-tf crate with TF2 listener, broadcaster, and buffer#191YuanYuYuan wants to merge 17 commits into
YuanYuYuan wants to merge 17 commits into
Conversation
Introduces `ros-z-tf`, a pure-Rust TF2 listener and transform buffer that subscribes to `/tf` and `/tf_static`, maintains a frame tree, and provides `lookup_transform` with multi-hop LCA traversal and linear/slerp interpolation. Public API: - `Buffer::new(node)` — subscribes to /tf (Volatile) and /tf_static (TransientLocal) - `Buffer::lookup_transform(target, source, time)` — LCA-based chain composition - `Buffer::can_transform(target, source, time)` — non-panicking availability check - `Buffer::all_frames()` — enumerate known frame IDs - `LookupError` — UnknownFrame, NoCommonAncestor, ExtrapolationError Also adds `tf2_msgs` message definitions to ros-z-codegen assets and extends `GeneratorConfig` with `protobuf_excluded_packages` to handle packages whose cross-package array fields cannot be represented in protobuf (e.g. `geometry_msgs/TransformStamped[]` in TFMessage).
…sform, lookup_transform_full - ros-z core: declare PublicationCache alongside ZPub for TransientLocal publishers; use QueryingSubscriber (FetchingSubscriber) for TransientLocal subscribers so late joiners receive previously published data - ros-z-tf: add TransformBroadcaster (/tf, Volatile) and StaticTransformBroadcaster (/tf_static, TransientLocal) - ros-z-tf: add wait_for_transform (async, notified on each add_message) with WaitError::Timeout and WaitError::Lookup variants - ros-z-tf: add lookup_transform_full for fixed-frame two-time lookups - remove #[ignore] from tf_static_transient_local_replayed_on_connect - 8 integration tests pass, 28 unit tests pass
…rder, optional wait timeout - StaticTransformBroadcaster zeroes all timestamps before publishing (tf2 spec requires sec=0, nanosec=0 on /tf_static for ROS 2 interop) - lookup_transform_full reordered to (target, target_time, source, source_time, fixed_frame) matching tf2 C++ and roslibrust APIs - wait_for_transform now takes Option<Duration>; None falls back to the buffer's default duration (10 s) - Document intentional separation of Buffer and broadcaster types
…y codegen filter - QosHistory::KeepAll was mapped to usize::MAX for PublicationCache ring buffer capacity, which would OOM on first transient-local publisher; cap at 1000 entries to match tf2 buffer convention - tf-tests feature no longer hardcodes ros-z-tf/jazzy; distro propagation uses '?' syntax so it only activates when the optional dep is enabled - generate_protobuf_types always filters excluded packages via one-liner instead of a split-variable conditional
…t_naming Adds digit→uppercase split so Int8MultiArray→Int8MultiArray and ensures TFMessage→TfMessage matches what prost_build generates.
- Move crates/ros-z-tf/ to crates/hiroz-tf/ - Move tf2_msgs assets from crates/ros-z-codegen/ to crates/hiroz-codegen/ - Update all ros-z/ros_z references to hiroz/hiroz in crate source, Cargo.toml, README, and tf_integration tests
SubInner was added by the feat(tf) commit outside of any conflict zone, but the ZSub struct field was resolved to HEAD's AdvancedSubscriber<()> (from PR #183), leaving SubInner unreferenced. The follow-up allow(dead_code) commit was suppressing a lint on code that should not exist at all.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
hiroz-tfcrate: pure-Rust TF2 transform listener, buffer, and broadcaster built on hiroz pub/subBufferwith time-series frame storage, LCA traversal, and slerp/lerp interpolation forlookup_transformTransformBroadcasterandStaticTransformBroadcaster(TransientLocal replay for late joiners)wait_for_transformKey Changes
crates/hiroz-tf/— new crate:Buffer,TransformBroadcaster,StaticTransformBroadcaster,LookupError,WaitErrorcrates/hiroz-tests/tests/tf_integration.rs— integration test suite (feature:tf-tests)crates/hiroz-msgs/— addtf2_msgs/TFMessageto generated messagescrates/hiroz/src/pubsub.rs— exposeAdvancedPublisher/AdvancedSubscriberneeded by the broadcastercrates/hiroz-codegen/— fix prost naming word-boundary replication and remove unnecessarytf2_msgsexclusionBreaking Changes
None