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

Allow file attachments to a bag #117

Open
chriser- opened this issue Sep 23, 2020 · 2 comments
Open

Allow file attachments to a bag #117

chriser- opened this issue Sep 23, 2020 · 2 comments

Comments

@chriser-
Copy link
Contributor

We have a topic that publishes data (position, acceleration, ...) and we want to extract this data to a csv file.

It would be nice if we could add file attachments to a bag through scripts, which can then be downloaded via the bag information window.

@pjreed
Copy link
Contributor

pjreed commented Sep 30, 2020

I agree, this sounds useful. Adding a way to attach files to a bag together with a widget for viewing them would probably also make it easy to implement #102 . I'll have to think a bit about a good way to implement actually storing the files; off the top of my head, I think it'd be useful to be able to attach files through the GUI, add them via a script, or read them from disk at the same time a bag file is added to the filesystem.

In the meantime, technically a script can return anything you want and it will be saved, although binary data might break the result viewer, and anything that's not JSON won't have pretty formatting. A workaround for storing binary data might be to base64-encode it and then store it as a string in JSON output...

@ansgri
Copy link

ansgri commented Mar 4, 2021

That would be a good addition indeed. Currently our workaround for this and #123 (reported by my colleague) is to save files in a parallel file tree and viewing them manually (and optionally tagging with the path to that data), and it would be very useful to be able to e.g. return a file path or URL or even b64-encoded data and have the GUI recognize it in the bag info, allowing downloading or viewing (for images).

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

No branches or pull requests

3 participants