[ros-users] A rosbag implementation in Java

Aaron Schiffman aarondsc at yahoo.com
Fri Nov 7 07:48:44 UTC 2014


Dear ROS-Users,
I've created a rosbag writer implementation for Java, and posted it to a new BitBucket repository. It should be functional for writing a rosbag format 2.0 none compression rosbag in Android or Java ROS implementations (Client or Server). If your interested the source repository is located at:aaron_sims / jrosbag / source / — Bitbucket 
|   |
|   |   |   |   |   |
| aaron_sims / jrosbag / source / — BitbucketSource Branch master Check out branch jrosbag /  |
|  |
| View on bitbucket.org | Preview by Yahoo |
|  |
|   |

  How to use the Bag class:   
   - Initialize the org.happy.artist.rmdmia.utilities.ros.bag.Bag class.
   - Call bag.start(OutputStream os, Bag.CHUNK_COMPRESSION_NONE)); // Where os is the OutputStream you intend to write the file. Examples could be a FileOutputStream, or a network output stream that writes the file to Google Drive, or Dropbox (just examples).
   - Call bag.addConnectionHeader(char[] topic, int conn, char[] connection_header_hex); for each new connection header on connection handshake. int conn is a unique int connection id chosen for the connection (might be a good idea to iterate through topic ids to create an int array, or other mechanism to chose a unique int. connection_header_hex will be the ROS Serialized Message in the connection header. 
   - Call bag.addMessage(long time, int conn, char[] message_data_hex); Pass in the long time, associated connection header int conn id, and the ROS serialized message to add to the rosbag file.
This Java code is poorly documented, however, I wanted to share it with ROS Community for Java/Android ROS clients that want to record rosbag files. Good luck using it. Releasing under Apache 2.0 license. 
I wish I had more time to clean up the code better, and if you have questions or want to contribute send me a message.
Thanks,

Aaron  

     On Wednesday, October 29, 2014 11:51 PM, Aaron Schiffman <aarondsc at yahoo.com> wrote:
   

 Dear ROS-Users,
I am strongly considering implementing rosbag in Java. I'd want to implement the latest rosbag version (2.0 is the version I found documented by Tully). I was going through a list of TODO's for a project I am working on from 2 years ago, and one of the tasks was to create a proxy framework for monitoring data communications. rosbag already seems to cover the requirements well. I'd be happy to share the code with OSRF if it hasn't been done yet. Any input on rosbag in Java will be appreciated. I'd appreciate some back and forth Q&A support on this if any rosbag experts are willing to support the effort. I'd like to get it done in short order.
Please let me know if you want to help.
Thanks,

Aaron

   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20141107/4ee814d3/attachment.html>


More information about the ros-users mailing list