Skip to content

Add field selection to ros2 topic delay - #1272

Open
sylvesterkaczmarek wants to merge 1 commit into
ros2:rollingfrom
sylvesterkaczmarek:fix-738-topic-delay-field
Open

Add field selection to ros2 topic delay#1272
sylvesterkaczmarek wants to merge 1 commit into
ros2:rollingfrom
sylvesterkaczmarek:fix-738-topic-delay-field

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Addresses #738.

Add an optional --field selector to ros2 topic delay so the timestamp header can come from a nested sub-message instead of requiring the topic's root message to have a header.

The selector follows the existing field syntax:

  • . selects nested fields
  • .[index] selects array elements

Example for TF:

ros2 topic delay /tf --field transforms.[0]

This keeps the implementation generic and does not special-case TF message types.

Testing

Added focused tests for:

  • root-message behavior when --field is omitted
  • nested array field selection
  • invalid field handling

Did you use Generative AI?

Yes. AI was used to assist with tests.

Allow ros2 topic delay to read the timestamp header from a selected sub-message, including indexed array fields such as transforms.[0].

Add focused tests for root, nested-array, and invalid field selection.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant