-
Notifications
You must be signed in to change notification settings - Fork 240
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
Rewrite TopicFilter for single-call reusability #924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aprvd
Gist: https://gist.githubusercontent.com/emersonknapp/381cd682c4996d49c6ebe6c2bff84f58/raw/78b1ff1c7c2c9037644aba6e82180650249d820b/ros2.repos |
c2c417e
to
7c8568e
Compare
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
7c8568e
to
c9c2407
Compare
Gist: https://gist.githubusercontent.com/emersonknapp/bf422b73c5ded4e87b1dedca3c876f32/raw/78b1ff1c7c2c9037644aba6e82180650249d820b/ros2.repos |
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Part of #831
Going to use this filter for Converter functionality to choose which Writers receive which topics from Readers. The single-call structure makes it clear that both the Recorder and the Converter use the same logic.
The current implementation was hard to understand the order of operations for the topic filter.
This new implementation fully checks each topic all the way through all filters, allowing it to be easily used for a single topic, or iterate over a container. This is a mild optimization in that only a single container copy is done, rather than repeatedly copying into a new container for each filter step.
More importantly, it makes the pipeline of functions easier to follow and extend by clearly showing the linear order of filters for a topic.