|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_rgbd_slam |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_rgbd_slam |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange
|
mola_input_rosbag2 package from mola repomola mola_bridge_ros2 mola_demos mola_input_lidar_bin_dataset mola_input_rawlog mola_input_rosbag2 mola_input_video mola_kernel mola_launcher mola_metric_maps mola_msgs mola_pose_list mola_relocalization mola_traj_tools mola_viz mola_viz_imgui mola_yaml |
ROS Distro
|
Package Summary
| Version | 3.7.0 |
| License | GPLv3 |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/MOLAorg/mola.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-12-04 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
mola_input_rosbag2
Offline RawDataSource from ROS 2 bags
Provided MOLA modules:
-
Rosbag2Dataset, type RawDataSourceBase.
CLI tools:
-
mola-sm-attach-from-rosbag2: Adds observations from a bag (e.g. camera images, for visual place recognition) to the keyframes of an existing.simplemap. Each observation goes to the keyframe closest in time (--max-age, default 0.5 s), and each keyframe keeps the closest one per topic, so none is stored twice. Images are written as jpg/png files to<output>_Images/(the external files of the input map are hard-linked there too); observations already in the map are not added again.
mola-sm-attach-from-rosbag2 -i map.simplemap -o map_cam.simplemap \
--rosbag2 dataset_dir --topic /camera/image_raw:camera_left
--topic is repeatable (TOPIC or TOPIC:LABEL), one label per topic: each
keyframe gets one observation per label. Use --fixed-sensor-pose
"x y z yaw pitch roll" for bags without /tf, and --image-format png or
inline to change how images are stored.
The ROS 1 version is mola-sm-attach-from-rosbag1 (package mola_input_rosbag1).
ROS 2 bags may also need --tf-topic / --tf-static-topic (e.g. namespaced robots).
RGB-D cameras
A sensors entry of type: CObservation3DRangeScan combines the topics of an
RGB-D camera into mrpt::obs::CObservation3DRangeScan observations:
sensors:
- topic: /camera/camera/depth/image_rect_raw # 16UC1 (mm) or 32FC1 (m)
type: CObservation3DRangeScan
sensorLabel: rgbd
intensity_topic: /camera/camera/color/image_raw # optional
#camera_info_topic: ... # default: sibling "camera_info" topic
#intensity_camera_info_topic: ... # default: sibling "camera_info" topic
#max_time_offset: 0.010 # [s] to pair depth and intensity frames
#is_optional: false # skip the sensor if a topic is missing
#max_range: 10.0 # [m]
#intensity_16bit_scale: 1.0 # mono16 intensity (e.g. infrared) into 8 bits
#intensity_channel: visible # or "ir"
#max_queue_length: 10 # frames waiting for their counterpart, per stream
#rectified: ... # depth without lens distortion (default: topic has "image_rect")
#intensity_rectified: ... # the same, for the intensity image
#fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg" # depth camera, +X forward
Depth and intensity topics may also be sensor_msgs/CompressedImage, as recorded by
image_transport: compressedDepth (PNG or RVL, 16UC1 or 32FC1) for the depth and
JPEG/PNG for the intensity. For example, a ZED camera, whose depth (32FC1) is
registered to the left color image and may have a lower resolution:
- topic: /zed/zed_node/depth/depth_registered/compressedDepth
type: CObservation3DRangeScan
sensorLabel: zed
intensity_topic: /zed/zed_node/rgb/image_rect_color/compressed
max_range: 20.0
Note that the compressedDepth publisher of image_transport discards depth beyond its
depth_max parameter (default: 10 m) when recording.
Compressed topics and the intensity_channel, intensity_16bit_scale, max_queue_length,
rectified and intensity_rectified options need a mrpt_libros_bridge newer than 4.2.0
(with older versions, compressed topics are rejected and those options ignored with a
warning), which builds the observations
(mrpt::ros2bridge::RgbdAssembler, shared with rosbag2rawlog, BridgeROS2 and
mola_input_rosbag1). Points take their color from an intensity image of another
resolution than the depth image, and through its lens distortion, with MRPT
versions that define MRPT_HAS_3DSCAN_INTENSITY_PROJECTION.
Depth and intensity keep their own resolution and intrinsics
(cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth
comes from /tf (fixed_sensor_pose only replaces the depth camera pose on the robot).
Depth already registered to the intensity camera (e.g. an
aligned_depth_to_color topic) shares its optical frame, so both cameras then
coincide. Depth and intensity frames whose stamps differ by more than
max_time_offset are dropped, with a periodic warning: raise it for cameras
whose streams are not hardware-synchronized. With
use_bag_recv_time_as_timestamp, an observation takes the receive time of its
depth image.
Build and install
Refer to the root MOLA repository.
Docs and examples
See this package page in the documentation.
License
This package is released under the GNU GPL v3 license. Other options available upon request.
Changelog for package mola_input_rosbag2
3.7.0 (2026-12-01)
- RGB-D cameras through the mrpt_libros_bridge assembler: compressed topics (compressedDepth, JPEG/PNG intensity), 16-bit infrared scaling, intensity_channel; default max_time_offset is now 10 ms (#303)
- Dropped the cv_bridge (OpenCV) dependency: compressed images are decoded by MRPT, and grayscale ones now stay single-channel; requires MRPT >= 3.3.0 and mrpt_libros_bridge >= 4.1.0 (#298)
- Contributors: Jose Luis Blanco-Claraco
3.6.0 (2026-11-20)
3.5.0 (2026-11-15)
- RGB-D cameras (color + depth + camera_info) as CObservation3DRangeScan.
- Deserialize bag messages without copying their payload.
- New CLI mola-sm-attach-from-rosbag2: attach observations (e.g. camera images) from bags to simplemap keyframes.
- Static transforms survive a partial replay, and skipping is cheap.
- Optional dataset ground-truth trajectory, shown in mola_viz_imgui.
- Contributors: Jose Luis Blanco-Claraco
3.4.0 (2026-11-01)
- Rosbag2Dataset: read only the topics that have a handler (#259)
- Contributors: Jose Luis Blanco-Claraco
3.3.2 (2026-10-09)
3.3.1 (2026-10-05)
3.3.0 (2026-09-23)
- Port to MRPT 3.x (#220)
- Contributors: Jose Luis Blanco-Claraco
3.2.1 (2026-09-15)
- Merge pull request #209 from MOLAorg/feat/rosbag2-se3-odometry-as-robot-pose rosbag2: allow reading a 3D odometry source as CObservationRobotPose
- mola_viz_imgui: show dataset playback time in the dataset UI panel (#202)
- Contributors: Jose Luis Blanco-Claraco
3.2.0 (2026-08-21)
- Merge remote-tracking branch 'origin/feat/map-frame-gauge-change' into feat/map-frame-gauge-change
- Merge branch 'develop' into feat/map-frame-gauge-change
- Contributors: Jose Luis Blanco-Claraco
3.1.1 (2026-08-10)
- fix build in ros rolling (newer gcc)
- Contributors: Jose Luis Blanco Claraco
3.1.0 (2026-08-06)
-
Add mola::TransformTreeSource: expose the /tf tree to other MOLA modules (#188)
* Add mola::TransformTreeSource: expose the /tf tree to other modules New mola_kernel interface letting a data source publish its tree of coordinate frames, so consumers (e.g. a LiDAR-odometry viewer) can draw a robot's joints as it moves. transform_tree(root) returns the subtree below 'root' with poses already resolved against it. The filtering is done in the source, which is what owns the transform buffer, so a consumer never receives nor walks unrelated subtrees. The interface carries no ROS/tf2 type, keeping mola_kernel ROS-independent. Implemented by Rosbag1Dataset (separate repo), Rosbag2Dataset and BridgeROS2. No locking is added around the subtree walk: tf2::BufferCore guards its own internals, which is also what lets BridgeROS2's TransformListener feed the buffer from its own thread.
- Address review: depth-first comment, cycle guard in the tf walk
- No need for include guards inside this same git repo
-
Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)
-
changelog
-
Merge pull request #178 from MOLAorg/feat/rosbag2-compressed-image feat: decode sensor_msgs/msg/CompressedImage topics in Rosbag2Dataset
-
perf: avoid a redundant image-buffer copy and heap alloc per frame
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| gps_msgs | |
| mola_kernel | |
| mrpt_obs | |
| mrpt_libros_bridge | |
| rclcpp | |
| rosbag2_cpp | |
| sensor_msgs | |
| tf2_geometry_msgs | |
| tf2_msgs | |
| tf2_ros |
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| mola | |
| mola_lidar_odometry | |
| mola_mapper | |
| mola_mapper_2d |