npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gov.nasa.jpl.honeycomb/rosbag-loader

v0.0.6

Published

Loader and parser for processing rosbag files.

Readme

rosbag-loader

Loader for loading and parsing ROS Bag files using the rosbag package.

!> Note that only lz4 decompression is implemented when reading compressed Rosbags.

!> Note that for the moment RosbagLoader always uses the browser implementation of rosbag.js. See #439

Use

Functions

load

load( url : String, options : ReaderOptions | null = null ) : Map | Array | RosbagReader

Loads and parses the ROS bag file. The promise resolves with the returned data from the parse function.

parse

parse( data : Blob, options : ReaderOptions | null = null ) : Map | Array | RosbagReader

Takes a file handle blob to read and a set of options to read the messages with. If readAllData is false a RosbagReader instance is returned otherwise all frames are read and returned. See the #RosbagReader#read for a description of the returned data.

ReaderOptions

flattenState

flattenState : Boolean = false

If true the hierarchy of objects is flattened into a single object with the flattenDelimiter separating object children.

flattenDelimiter

flattenDelimiter : String = '_'

The character to use to separate nested object names when flattening the object state.

indexTransform

indexTransform : Boolean = true

If true the transform object in the "/tf" and "/tf_static" messages are converted from an array in to an object indexed by child_frame_id:

{
     transforms: [
         { child_frame_id: 'base_link', transform: { ... } },
         { child_frame_id: 'world', transform: { ... } }
     ]
}

// into

{
     transforms: {
         'base_link': { child_frame_id: 'base_link', transform: { ... } },
         'world': { child_frame_id: 'world', transform: { ... } }
     }
}

readAllData

readAllData : Boolean = true

If true the full list of Rosbag data will be returned from the reader in the callback. Otherwise a RosbagReader handle will be returned so data can be read as needed.

normalizeTopicNames

normalizeTopicNames : Boolean = true

If true all topic names are normalized to be prefixed with a / the way roslibjs registers them over websocket. If false some topic name may not be prefixed with slashes.

separateTopicArrays

separateTopicArrays : Boolean = false

If true all topics are broken out into separate arrays of data in a map. Otherwise a single array of data is returned.

RosbagReader

Class for reading data from the rosbag file.

start

start : Number

The start time in ms of the rosbag file.

end

end : Number

The end time in ms of the rosbag file.

messageTypes

messageTypes : Object

A map from topic name to ROS topic message type.

topics

topics : Array<String>

The list of topics available in the given Rosbag.

constructor

constructor( handle : RosbagHandle, options : ReaderOptions ) : void

Takes a handle to the Rosbag.js Bag Instance to read messages from an a set of options to use when reading messages.

read

read( from : Number, to : Number, options : ReaderOptions ) : Promise<Object | Array>

Takes a from time and and to time in milliseconds and returns the set of data between those times. A set of options can be provided to override the set of options originally passed into the reader. Options from rosbag.js cannot be overriden here.

The shape of the returned data depends on the separateTopicArrays. If true then a map of topic name to array of frames of data is returned:

{
     '/tf' : [ ... ],
     '/tf_static' : [ ... ],
     '/markers' : [ ... ],
}

Otherwise an array of frames is returned. A frame consists of a time field in ms and state field which contains the ros topic message contents:

{
     time: number,
     state: {
         //...
     }
}