Message Serialization for Rosbags

asked 2016-06-22 17:51:47 -0600

kabla002 gravatar image

updated 2016-06-22 17:53:40 -0600

Hi Everyone,

My ultimate goal, is to read read a rosbag it into MATLAB, create a new topic based on the messages in the bag then write all of the messages out (including those from the old bag file) to a new bag file. After some searching I am unable to find any support for writing to a rosbag in the MATLAB Toolkit.

I'm considering writing my own ros bag writer and I've found the following that I believe will help.

  1. Rosbag format documentation
  2. Java library for rosbags (jrosbag) that seems to handle all of the details of indexes and chunks etc.

Using jrosbag I think I can write out the bag messages as long as I am able to convert the MATLAB version of the messages into properly serialized binary.

My questions are as follows...

  • How are are the various ros messages serialized? the rosbag format documentation doesn't give this information, and I haven't been able to find any documentation on the wiki.
  • Does this seem reasonable, are there any reasons this approach wouldn't allow me to add new topics to a rosbag?


~ John

edit retag flag offensive close merge delete