Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-based filtering #885

Open
imstevenpmwyca opened this issue Oct 15, 2021 · 3 comments
Open

Content-based filtering #885

imstevenpmwyca opened this issue Oct 15, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@imstevenpmwyca
Copy link

Description

Something similar to what this does in ros1:
rosbag filter mappingData_input.bag mappingData_output.bag 'topic != "/tf" or topic == "/tf" and m.transforms[0].header.frame_id != "map" and m.transforms[0].child_frame_id != "odom"'

Completion Criteria

After filtering a bag with a tf that has map->odom->base we get a new bag with a tf that has only odom->base

@emersonknapp
Copy link
Collaborator

More generically I think I would call this feature "content-based filtering". This would involve the converter feature, but also needs the ability to provide an arbitrary python expression.

I think, though, that you should currently be able to do this via a small Python script using the rosbag2_py API.

@emersonknapp emersonknapp changed the title Filter a specific transformation from the /tf topic Content-based filtering Dec 1, 2021
@imstevenpmwork
Copy link

For those who might be interested, I quickly did a script for the original issue using the rosbag2_py API as suggested. It is probably not the best, but it does the job.
https://github.com/imstevenpmwork/filter_tf_topic_from_bag

@fujitatomoya
Copy link
Contributor

related to ros2/design#282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants