How to receive protobuf messages sent by the Foxglove server and then save them as MCAP?

89 Views Asked by At

I have customized some protobufs, processed them on the server using C++, and published them through the localhost port using the Foxglove server. I hope to save these messages as mcap files for playback with Foxglove.

Is this attempt feasible, or is there a more common method to save custom protobufs as mcap files?

I have made the following attempts:

1.Installed mcap on the server, but encountered environment issues. 2. Used Foxglove websocket locally to receive information and then saved it using mcap, but did not find relevant tutorials.

1

There are 1 best solutions below

1
jtbandes On

You can use the mcap-record example client to do this, for example:

$ npx @foxglove/ws-protocol-examples@latest mcap-record ws://localhost:8765 -o <file.mcap>

It should also be possible to use the mcap libraries on the server to record MCAP directly. Please start an issue or discussion or join us in Slack to report any problems you encounter with using these libraries.