Upgrade roslibrust_transforms to transforms v2.1 - #338
Open
deniz-hofmeister wants to merge 1 commit into
Open
Conversation
Static transforms are now represented by Stamp::Static instead of a zero timestamp, transforms are built with Transform::new / Transform::static_between, and add_transform() publishes static transforms to /tf_static automatically, replacing update_static_transform(). Invalid or conflicting transforms received over the wire are dropped with a warning. Adds latest_common_time() and remove_frame(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012d8cWsKHLhd1yYavxxsE9A
Contributor
Author
|
Hey @Carter12s , I recently released a v2 of my transforms library, so I would like to propose this PR to update your transforms version to v2. Please have a look. Things that improved over v1 is an API overhaul with greatly improved Error reporting. |
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.
Description
Upgrades
roslibrust_transformsfrom transforms v1.2 to v2.1 and adapts to its new API.Breaking changes
Stamp::Staticinstead of a magic zero timestamp. On the wire they are still stamped with time zero.Transform::new(...)/Transform::static_between(...)instead of struct literals, and fields are accessed via methods (translation(),rotation(),parent(),child(),timestamp()). Construction is fallible, so non-unit quaternions and NaN/infinite components are caught up front.update_static_transform()is removed.add_transform()now routes by the transform's stamp:Stamp::Atpublishes to/tf,Stamp::Staticpublishes to/tf_static. The registry is updated before publishing, so a transform the registry rejects (e.g. one that would re-parent a frame) is never sent to other nodes; rejection surfaces as a newTransformManagerError::RejectedTransform.IntoTransform::into_transformnow returnsResult<Transform, TransformError>.Stamp,TimeError,TimePoint, andTransformErrorare re-exported alongside the existing types.New features
latest_common_time(target, source)— the tf2-style "latest available transform" lookup, returningStamp::At(time)orStamp::Staticfor purely static chains.remove_frame(frame)— drops a frame from the local buffer, providing an escape hatch for re-parenting (the transforms crate rejects a child appearing under a new parent otherwise).Robustness fixes
/tf//tf_staticare dropped with a warning instead of silently corrupting the buffer (v1.2's infallibleadd_transformmade this impossible to detect).sec) are clamped to zero rather than wrapping, sinceTimestampis unsigned nanoseconds.broadcastchannel to awatchchannel, so notifications coalesce and lagged-receiver handling disappears.get_transform,get_transform_at,wait_for_transformchecks) take a read lock instead of a write lock, since v2 registry lookups no longer require&mut.Housekeeping
chronodependency./tf_static,latest_common_time, and re-parenting rejected untilremove_frameis called.🤖 Generated with Claude Code