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](http://www.mathworks.com/hardware-support/robot-operating-system.html?requestedDomain=www.mathworks.com).
I'm considering writing my own ros bag writer and I've found the following that I believe will help.
1. [Rosbag format documentation](http://wiki.ros.org/Bags/Format/2.0)
2. [Java library for rosbags](https://bitbucket.org/aaron_sims/jrosbag/src/9af69489db72fa785eaa11834322075ef87c6d78?at=master) (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?
Thanks,
~ John
↧