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

CLI: mcap cat --csv --topics /tf #438

Open
wkalt opened this issue Jun 23, 2022 · 6 comments
Open

CLI: mcap cat --csv --topics /tf #438

wkalt opened this issue Jun 23, 2022 · 6 comments
Labels
cli feature New feature or request

Comments

@wkalt
Copy link
Contributor

wkalt commented Jun 23, 2022

It would be nice if we could spit out a CSV file with column headers. If a user wanted to look at the history of a single topic in R or python this would make that very easy to do that.

I think it would probably require that the --topics flag be specified with only one topic. Then we could define a JSON->CSV translation and pipe the JSON output to it. Seems easier to work off the newline-delimited JSON output than write new ros/protobuf converters for CSV.

@wkalt wkalt added the feature New feature or request label Jun 23, 2022
@jhurliman jhurliman added the cli label Sep 22, 2022
@sisaha9
Copy link

sisaha9 commented Feb 10, 2023

Has there been any work started on this?

@jtbandes
Copy link
Member

Currently no work has been started. Could you describe your use case and desired functionality, to aid the discussion?

@sisaha9
Copy link

sisaha9 commented Feb 10, 2023

We had a similar tool developed for SQL based ROS2 bags. We could pass a ROS2 bag, a topic and an output file name and we would get a CSV file with all the information on that topic. I like the CLI method mentioned here. Would love to contribute on it but not too familiar with Go. If there was a way to do this via the Python API I would like to take a look at it

@jtbandes
Copy link
Member

You could absolutely achieve this with a Python script. Here are some Python examples to get you started: https://mcap.dev/guides/python/ros2.html

@sisaha9
Copy link

sisaha9 commented Feb 11, 2023

Do you have any suggestions on how to get the list of attributes for a message (including nested). A DFS could then be used to construct the CSV file

@sisaha9
Copy link

sisaha9 commented Feb 11, 2023

Or if it's possible to convert to JSON via a Python method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli feature New feature or request
Development

No branches or pull requests

4 participants