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

Refactor plugin query mechanism and standardize trait management #833

Merged
merged 26 commits into from
Aug 13, 2021

Conversation

camm73
Copy link
Contributor

@camm73 camm73 commented Aug 2, 2021

Refactored duplicated code for querying available plugins by adding a shared template function in a new rosbag2_py utils file py_utils.hpp.

Removed all plugin query code from individual Factory classes to consolidate it within rosbag2_py.

Standardized trait management between StorageTraits, ConverterTraits, and CompressionTraits.

@camm73 camm73 requested a review from a team as a code owner August 2, 2021 21:14
@camm73 camm73 requested review from MichaelOrlov and piraka9011 and removed request for a team August 2, 2021 21:14
@camm73 camm73 force-pushed the cameron/refactor-plugin-query branch from ca3f289 to b507ade Compare August 2, 2021 21:24
@emersonknapp emersonknapp requested review from emersonknapp and lihui815 and removed request for piraka9011 August 3, 2021 22:53
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.

As discussed off-ticket, get_class_plugins interface requires a bit too much extra knowledge to use, let's investigate if we can get it to a usage like get_class_plugins<SomeBaseInterface>();

@camm73 camm73 force-pushed the cameron/refactor-plugin-query branch 2 times, most recently from d515acd to 49fd9dc Compare August 6, 2021 21:46
Cameron Miller and others added 18 commits August 6, 2021 21:47
Signed-off-by: Cameron Miller <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
…ethod (ros2#814)

Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
…queue() (ros2#832)

Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
* For the `ros2 bag record` CLI - don't hardcode available choices, instead query for what is installed

Signed-off-by: Cameron Miller <[email protected]>
* Create design proposal for snapshot feature

Co-authored-by: Cameron Miller <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
- has_next() - calls recursively until next message OR no next file found

- read_next() - calls has_next() to ensure necessary rollovers are made

Signed-off-by: Sonia Jin <[email protected]>
Signed-off-by: Cameron Miller <[email protected]>
@camm73 camm73 force-pushed the cameron/refactor-plugin-query branch from 49fd9dc to ccce390 Compare August 6, 2021 21:51
@camm73
Copy link
Contributor Author

camm73 commented Aug 6, 2021

Should be good to go now

@emersonknapp emersonknapp requested review from emersonknapp and removed request for MichaelOrlov August 9, 2021 22:02
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.

This is looking much better - I like the new plugin query interface.

Noted a few things to address - for the includes and docstrings make sure to take a sweep across the whole diff, I only marked a few instances.

@camm73 camm73 requested a review from emersonknapp August 10, 2021 01:13
@emersonknapp
Copy link
Collaborator

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

@emersonknapp emersonknapp merged commit 342d8ed into ros2:master Aug 13, 2021
WJaworskiRobotec pushed a commit to RobotecAI/rosbag2 that referenced this pull request Sep 12, 2021
…2#833)

* Refactor plugin query mechanism and standardize trait management
* Adds utility function to query all installed plugins for a given plugin interface class, and uses that in rosbag2_py to present options for recording and listing

Signed-off-by: Cameron Miller <[email protected]>
Signed-off-by: Wojciech Jaworski <[email protected]>
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.

4 participants