[c++] Open a mcap to append data #1084
-
Is possible to open an existing mcap to write additional messages? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 10 replies
-
Internal tracking ticket: FG-2732 |
Beta Was this translation helpful? Give feedback.
-
Not with the current client libraries, but such a thing is technically possible. Do you have a particular use case that requires this rather than opening a new MCAP file? |
Beta Was this translation helpful? Give feedback.
-
I need to write additional messages to mcap without rewrite everything. |
Beta Was this translation helpful? Give feedback.
-
This is also by design to identify whether an mcap file was closed or that the recording process died before closing the file. However as noted in another response, there are writers and approaches that can make this faster than re-writing the entire file - but not ones we've implemented in the current interfaces. If you are interested in append able mcap files I would suggest using un-chunked files (which are trivial to append to by over-writing the footer and adding more data) or using |
Beta Was this translation helpful? Give feedback.
We tend to view mcap files as append-only, write once, robot log files rather than "database" files which you can go back and modify. If you want to write additional messages you can either use one of the reader libraries to read the existing file and write a new one, or use the CLI
mcap merge
command to merge several mcap files together.