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

Recorder --regex and --exclude options #604

Merged
merged 5 commits into from
Jan 25, 2021
Merged

Conversation

adamdbrw
Copy link
Collaborator

@adamdbrw adamdbrw commented Jan 19, 2021

Resolves issues #559 and #560. This is a minimal implementation that brings the regex filtering feature to rosbag2.

Implements ros2 bag record -e / --regex and -x / --exclude options to specify how topics are recorded.

  • the --regex option is exclusive with -all and specifying topics
  • the --exclude option can be applied together with either --regex or --all, but is exclusive with explicit topic list

@adamdbrw adamdbrw requested a review from a team as a code owner January 19, 2021 18:29
@adamdbrw adamdbrw requested review from thomas-moulard and jaisontj and removed request for a team January 19, 2021 18:29
@adamdbrw adamdbrw marked this pull request as draft January 19, 2021 18:29
@adamdbrw adamdbrw marked this pull request as ready for review January 20, 2021 13:30
@adamdbrw adamdbrw changed the title A minimal implementation of recording by regex Recorder --regex option Jan 21, 2021
- you can use -x or --regex option now to specify how topics are recorded
- this new option is exclusive with -a and specifying topics (for simplicity)
- to be supplemented with tests..

Signed-off-by: Adam Dabrowski <[email protected]>
Signed-off-by: Adam Dabrowski <[email protected]>
@adamdbrw adamdbrw force-pushed the record_with_topic_regex branch from 7922478 to c318f75 Compare January 22, 2021 14:16
@adamdbrw adamdbrw force-pushed the record_with_topic_regex branch from 24b21c4 to c3fc263 Compare January 25, 2021 10:19
@adamdbrw
Copy link
Collaborator Author

@mjeronimo can I ask for a review and if this is alright, to run jobs?

Copy link
Collaborator

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

Functionally this looks good, but I have some nitpicks on style and language that I'd like to address before merging

@adamdbrw adamdbrw changed the title Recorder --regex option Recorder --regex and --exclude options Jan 25, 2021
Signed-off-by: Adam Dabrowski <[email protected]>
Copy link
Collaborator

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for the updates

@emersonknapp
Copy link
Collaborator

Gist: https://gist.githubusercontent.com/emersonknapp/20bbe7e473b4159fb5f88662b552963c/raw/656e51e4a43294405eae946a887b2d838489c554/ros2.repos
BUILD args: --packages-up-to ros2bag rosbag2_tests rosbag2_transport
TEST args: --packages-select ros2bag rosbag2_tests rosbag2_transport
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/7512

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@emersonknapp emersonknapp merged commit face4b1 into master Jan 25, 2021
@delete-merged-branch delete-merged-branch bot deleted the record_with_topic_regex branch January 25, 2021 23:01
emersonknapp pushed a commit that referenced this pull request Feb 2, 2021
* Regex and exclude options for recording topics
- you can use -e or --regex option now to specify how topics are recorded
- can use -x or --exclude to exclude topics from recording
- regex is exclusive with -a and specifying topics (for simplicity)

Signed-off-by: Adam Dabrowski <[email protected]>
emersonknapp pushed a commit that referenced this pull request Feb 17, 2021
* Regex and exclude options for recording topics
- you can use -e or --regex option now to specify how topics are recorded
- can use -x or --exclude to exclude topics from recording
- regex is exclusive with -a and specifying topics (for simplicity)

Signed-off-by: Adam Dabrowski <[email protected]>
@purentap
Copy link

is this still usable? cant seem rosbag2 cant seem to recognize -x flag for regex

@MichaelOrlov
Copy link
Contributor

@purentap Yes exclude option is currently supported for the recorder. See https://github.com/ros2/rosbag2/blob/rolling/ros2bag/ros2bag/verb/record.py#L73-L76 for details.

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.

5 participants