ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Announcing rosbag.js - read rosbags with JavaScript in node.js & the browser

Hi! I’m an engineer working at Cruise Automation and wanted to announce we’ve released a rosbag parsing library for node.js and the browser. rosbag.js. This library has been indispensable for several internal projects and we wanted to share it with the community.

rosbag.js uses an eval-based parser generator based on ROS message definitions for each topic. The generator allows rosbog.js to take advantage of the V8 JIT, providing high-speed parsing. It also uses FileReader for fast random access to bag data.

If you need help getting rosbag.js up-and-running or want to suggest features you’d like to see, please stop by the GitHub page and open an issue. Enjoy!

1 Like

This looks great!

Does this mean we could do a web version of rqt_bag? Did you do that?
It would be very useful as this would allow to read rosbag files easily on Windows, which is a recurrent request I have from my clients.

1 Like

Yeah this would definitely let you do something like rqt_bag directly in google chrome or with an electron app. One caveat is currently rosbag.js doesn’t support writing to bags, only reading them…so the publishing new messages functionality from rqt_bag wouldn’t be doable yet. For reading & displaying data in bag a it works well.

I wanted to ask if it is possible to show a sample run. As I am trying to use it in Vue js Electron app, but getting errors such as (Expected file to be a File or Blob. Make sure you are correctly importing the node or web version of Bag.)