Iterators and random access over chronological sensor data for offline analysis.
DataStream(incore/data_stream.py) — Abstract chronological API:timestamps,get_instance, nearest-by-time queries, optional interpolation flags, etc.impl/ros2.py—Ros2DataStream— Backs a stream from a ROS 2 bag (directory or.mcap) and a single topic; deserializes withrosbagsand calls adecode_fn(msg, index, timestamp)that returns aBaseInstance.impl/ros2_ffmpeg.py—Ros2FfmpegPacketStream— Same bag/topic wiring, but decodesffmpeg_image_transport/FFMPEGPacket(e.g. H.264/HEVC) to BGR frames and returnsImageInstanceby index.ros2_common/camera_streams.py—make_rgb_image_streampicksRos2FfmpegPacketStreamwhen the topic type isFFMPEGPacket, otherwise plainRos2DataStreamwith RGB/compressed image decoding.make_depth_image_streamwires depthsensor_msgs/Image→ float depth grids viaros-python-conversions.collection_streams/— Higher-level streams that combine multiple bag topics (e.g. TF-derived poses).
Implementing a new source: subclass DataStream, supply ordered timestamps, and implement make_instance (and any metadata helpers your base class expects).