Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

No version for distro github showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.5.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-11-15
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Offline RawDataSource from rosbag2 datasets

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional 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.005            # [s] to pair depth and intensity frames
    #is_optional: false                # skip the sensor if a topic is missing
    #max_range: 10.0                   # [m]
    #fixed_sensor_pose: "x y z yaw_deg pitch_deg roll_deg"  # depth camera, +X forward

Depth and intensity keep their own resolution and intrinsics (cameraParams, cameraParamsIntensity), and relativePoseIntensityWRTDepth comes from /tf. 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 the image that completed its pair.

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

Changelog for package mola_input_rosbag2

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 Two per-frame savings in toCompressedImage():

    - The temporary sensor_msgs::msg::CompressedImage only needs to live for the duration of this call; a stack-local avoids a heap allocation cv_bridge::toCvCopy() doesn't require (it takes the message by const reference, unlike the raw-Image path's toCvShare(), which needs a shared_ptr).

    - cv_ptr (and the cv::Mat it owns) is likewise local to this call, so copying it into the CObservationImage with mrpt::img::SHALLOW_COPY (ref-counted) instead of DEEP_COPY avoids duplicating the decoded pixel buffer a second time. Re-verified end-to-end against the Oxford Spires dataset: no errors. (CodeRabbit finding on PR #178)

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_input_rosbag2 at Robotics Stack Exchange