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

Readers/info can accept a single bag storage file, and detect its storage id automatically #1072

Merged
merged 6 commits into from
Aug 26, 2022

Conversation

emersonknapp
Copy link
Collaborator

@emersonknapp emersonknapp commented Aug 19, 2022

Closes #972

API-level allowance for bare bag files as input. Main improvement is the storage factory loop over all plugins, when storage id is not provided.

To expose this new capability consistently, factor out common options into a single place for all ros2 bag verbs that read bags.

… its storage id

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp emersonknapp force-pushed the emersonknapp/reader-allow-single-file branch from a941f17 to b81bfea Compare August 19, 2022 21:37
@emersonknapp
Copy link
Collaborator Author

Gist: https://gist.githubusercontent.com/emersonknapp/e68af89691e22dd924aa077fd66a298b/raw/a8c3181416c2d89e59b10df9f616ff8aee8203e3/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_storage rosbag2_cpp
TEST args: --packages-above rosbag2_storage rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/10681

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

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>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp emersonknapp changed the title allow Info and Reader to accept a single bag storage file, and detect its storage id Readers/info can accept a single bag storage file, and detect its storage id automatically Aug 22, 2022
@emersonknapp
Copy link
Collaborator Author

@MichaelOrlov any concerns here?

@emersonknapp
Copy link
Collaborator Author

emersonknapp commented Aug 23, 2022

Gist: https://gist.githubusercontent.com/emersonknapp/7d8a4e70a1192d9dc5bbcb4054ff1956/raw/b344e687fdbd8f0959e589b0a03b97a09532f812/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_storage rosbag2_cpp
TEST args: --packages-above rosbag2_storage rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/10690

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

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

@emersonknapp Idea and implementation looks great!
However I have a few questions in the scope of the code review which I would like to clarify and minor nitpicks to fix.

One of the questions is: "If storage id not specified directly and URI pointing out to the db3 file directly. Will we fail to load metadata? Or what behavior will be in this case?"

… debug logging

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp
Copy link
Collaborator Author

OK @MichaelOrlov - i updated the tests and the storage factory logging - lmk what you think now.

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

@emersonknapp Looks good now. Approving.
Please re-run CI one more time since it was some changes from last run.

@emersonknapp
Copy link
Collaborator Author

Gist: https://gist.githubusercontent.com/emersonknapp/2396fcd1ddd4175a8bfe93f8b6382b16/raw/b344e687fdbd8f0959e589b0a03b97a09532f812/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_storage rosbag2_cpp
TEST args: --packages-above rosbag2_storage rosbag2_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/10697

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

@MichaelOrlov MichaelOrlov merged commit 7e5bd14 into rolling Aug 26, 2022
@delete-merged-branch delete-merged-branch bot deleted the emersonknapp/reader-allow-single-file branch August 26, 2022 22:05
@emersonknapp
Copy link
Collaborator Author

@Mergifyio backport humble

mergify bot pushed a commit that referenced this pull request Aug 30, 2022
…rage id automatically (#1072)

* allow Info and Reader to accept a single bag storage file, and detect its storage id

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix end to end test and reduce verbosity

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix MSBuild warning

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Reader CLIs can take single file consistently

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix info end to end test

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Cleanup sqlite3 hardcoding in tests, clean wording in storage factory debug logging

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
(cherry picked from commit 7e5bd14)

# Conflicts:
#	ros2bag/ros2bag/verb/burst.py
#	ros2bag/ros2bag/verb/reindex.py
#	rosbag2_cpp/test/rosbag2_cpp/test_info.cpp
@mergify
Copy link

mergify bot commented Aug 30, 2022

backport humble

✅ Backports have been created

emersonknapp added a commit that referenced this pull request Sep 15, 2022
…rage id automatically (#1072)

* allow Info and Reader to accept a single bag storage file, and detect its storage id

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix end to end test and reduce verbosity

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix MSBuild warning

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Reader CLIs can take single file consistently

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix info end to end test

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Cleanup sqlite3 hardcoding in tests, clean wording in storage factory debug logging

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
emersonknapp added a commit that referenced this pull request Sep 15, 2022
…rage id automatically (#1072)

* allow Info and Reader to accept a single bag storage file, and detect its storage id

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix end to end test and reduce verbosity

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix MSBuild warning

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Reader CLIs can take single file consistently

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix info end to end test

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Cleanup sqlite3 hardcoding in tests, clean wording in storage factory debug logging

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2022-9-15/27394/1

MichaelOrlov pushed a commit that referenced this pull request Sep 22, 2022
…rage id automatically (#1072) (#1077)

* allow Info and Reader to accept a single bag storage file, and detect its storage id

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix end to end test and reduce verbosity

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix MSBuild warning

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Reader CLIs can take single file consistently

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Fix info end to end test

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>

* Cleanup sqlite3 hardcoding in tests, clean wording in storage factory debug logging

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>
Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com>
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/psa-default-ros-2-bag-storage-format-is-changing-to-mcap-in-iron/28489/1

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.

Readers detect storage plugin automatically
3 participants