rosbag2 icon indicating copy to clipboard operation
rosbag2 copied to clipboard

New `ros2 bag echo` verb to dump a single topic to stdout?

Open moooeeeep opened this issue 1 month ago • 1 comments

Description

I was looking to dump a single topic's content to stdout in csv format, like rostopic echo -b <bagfile> -p <topic> used to do.

Related question: https://robotics.stackexchange.com/questions/114194/exporting-single-topic-data-to-csv-with-rosbag2-bag-files

I had the impression that this feature doesn't exist, so I wrote a small script using the Python API. I wondered if it would be useful to add this as a new verb to the cli (the actual name would be open for debate)?

Related Issues

None

Completion Criteria

  • CLI verb to dump topic from bagfile to stdout (yaml and/or csv format)
  • Required customization options, e.g., to specify storage id and output format

Implementation Notes / Suggestions

Similar to the test code of the SequentialReader, but with formatted output.

Testing Notes / Suggestions

Process known bagfiles for different sets of options and verify the captured output.

moooeeeep avatar Jan 07 '25 11:01 moooeeeep