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

Display bag summary using ros2 bag info #42

Closed
wants to merge 82 commits into from

Conversation

greimela-si
Copy link
Contributor

@greimela-si greimela-si commented Oct 4, 2018

This PR adds a new ros2 bag CLI verb info which prints a summary of a bag content.

The printout looks like this:

$ ros2 bag info 2018_10_04-11_08_21

Files:            2018_10_04-11_08_21.db3
Bag size:         44.4 KiB
Storage id:       sqlite3
Storage format:   cdr
Duration:         21.3s
Start:            Oct  4 2018 11:08:21.483 (1538644101.483)
End               Oct  4 2018 11:08:42.486 (1538644122.486)
Messages:         22
Topics with Type: /string_topic; std_msgs/String; 22 msgs

These infos are stored in a metadata file at the end of the record process to allow getting infos about a bag without inspecting its content.
This is necessary since the user might not have access to the storage backend used to record the bagfile.

Some minor changes have been added in this PR as well:

  • Store rosbags using a folder, not a file.
    This folder contains the metadata.yaml file as well as all files created by the storage backend.
  • Add record options --output to state the output file and --storage to select the storage backend.
    Default: Use the current timestamp as bag name and sqlite3 as storage backend
  • Stabilize integration and e2e tests.

CI:

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

Martin-Idel-SI and others added 30 commits September 28, 2018 15:34
- We currently only need to write files, but yaml-cpp basically
  wants to have both versions anyway (it also makes testing easier)
- Only implements methods to write and read yaml via yaml-cpp
- This workaround is taken from rviz
- upstream issue jbeder/yaml-cpp#461
get_metadata() returns the metadata that will be written to the metadata yaml file.
- Use interface to make writing optional in tests
- At the moment, there is no need to expose WriterImpl
The methods in metadata_io only receive the uri where the
metadata.yaml file can be found in.
This way the information on how to find the metadata file is contained
in one place.
Also adds CLI parameters for uri and storage id to record
File size should be determined dynamically when calling info()
greimela-si and others added 22 commits October 4, 2018 10:20
This moves all assertions into the test body and allows to also test for failures.
Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

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

I am sorry, but I am not able to review this PR with the size as-is. There is too much stuff happening which is not related to Info.
Please consider closing this PR and opening multiple independent PRs.

From a first walk-through the 80 files, I see at least three possible PRs:

  • Actual Info
  • rosbag2 factory and changes related to reader and writer(impl)
  • testing related stuff (sqlite3, etc.)

ros2bag/ros2bag/verb/info.py Show resolved Hide resolved
rosbag2/include/rosbag2/rosbag2_factory.hpp Show resolved Hide resolved
rosbag2/src/rosbag2/info.cpp Show resolved Hide resolved
rosbag2/src/rosbag2/rosbag2_factory.cpp Show resolved Hide resolved
rosbag2/src/rosbag2/writer_impl.hpp Show resolved Hide resolved
@greimela-si
Copy link
Contributor Author

This PR has been splitted into #43, #44 and #45.

@tfoote tfoote removed the in review label Oct 11, 2018
@anhosi anhosi deleted the feature/ros2_bag_info branch November 30, 2018 08:16
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
Incorporates fixes from foxglove/mcap#478 and foxglove/mcap#482

Signed-off-by: James Smith <james@foxglove.dev>
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.

6 participants