Skip to content

Read TF from any bag topic (--tf-topic / --tf-static-topic) - #24

Merged
nathanhhughes merged 2 commits into
MIT-SPARK:mainfrom
harelb:feature/bag-tf-topic
Oct 26, 2026
Merged

nathanhhughes merged 2 commits into
MIT-SPARK:mainfrom
harelb:feature/bag-tf-topic

Conversation

@harelb

@harelb harelb commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Bags that record TF on namespaced topics (e.g. /<robot>/tf, /<robot>/tf_static) used to skip
TF frame filtering, because the TF plugin and static_tfs_from_bag only looked at /tf and
/tf_static by name. Remapping the topic at playback doesn't help: the plugin decides what to
filter from the topic names stored in the bag.

  • play_rosbag TF plugin: add --tf-topic and --tf-static-topic (defaults /tf,
    /tf_static). The chosen bag topics go through the same --filter-tf / -k / -f filtering,
    and the filtered transforms are still republished on /tf and /tf_static.
  • static_tfs_from_bag: add --tf-static-topic (default /tf_static).

The defaults keep existing commands and older bags behaving exactly as before.

Testing

  • Replayed an older bag (TF on /tf) through play_rosbag --filter-tf with the defaults; frame
    filtering and a downstream Hydra scene graph worked as before.
  • static_tfs_from_bag on the same bag with the default topic extracted all 17 static transforms.
  • Not yet tested on a bag with namespaced TF (one is being recorded).

🤖 Generated with Claude Code

Add --tf-topic and --tf-static-topic (defaults /tf and /tf_static) so
bags that record TF on namespaced topics like /<robot>/tf still go
through frame filtering. The filtered transforms are republished on
/tf and /tf_static as before.
Add --tf-static-topic (default /tf_static) so bags that record static TF
on a namespaced topic like /<robot>/tf_static can be dumped too, matching
the option on the play_rosbag TF plugin.
@harelb
harelb force-pushed the feature/bag-tf-topic branch from 7e56a63 to 89e02cb Compare October 21, 2026 19:46
@harelb
harelb marked this pull request as ready for review October 21, 2026 19:49

@nathanhhughes nathanhhughes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm definitely fine with this even if we don't end up recording remapped TF topics long term.

The option descriptions are a little off though; I don't need the examples of alternative /tf and /tf_static topics, and technically the /tf_static processing publishes aggregated transforms, not filtered transforms. I forget if you have merge access, so lmk if you have time to clean them up or just want me to merge this

@nathanhhughes
nathanhhughes merged commit f628bcb into MIT-SPARK:main Oct 26, 2026
1 check passed
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.

2 participants