Skip to content

Commit

Permalink
Imported upstream version '1.1.2' of 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 26, 2024
1 parent 79d6629 commit 234b13e
Show file tree
Hide file tree
Showing 49 changed files with 174 additions and 36 deletions.
38 changes: 36 additions & 2 deletions docs/source/dataset-conversions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Each robotic framework or library has defined its own formats over time:

|
.. _rosbag2rawlog:

2. rosbag ⇒ rawlog
----------------------------
To convert a ROS bag into a RawLog, you need two items:
Expand Down Expand Up @@ -219,8 +221,40 @@ Write me!
|

.. _ros1_to_ros2:

4. ROS1 ⇒ ROS2
----------------------------
One way to use rosbags from ROS 1 with MOLA is to port them to ROS 2 bags.

You can use the Python package ``rosbags`` to `perform the conversion <https://ternaris.gitlab.io/rosbags/topics/convert.html>`_.

An alternative is to use :ref:`rosbag2rawlog <rosbag2rawlog>` (the ROS 1 version!) to convert them to RawLogs, then use them as input to MOLA.

|
.. _mola-dataset-to-ros:

4. MOLA data set module ⇒ ROS
5. MOLA data set module ⇒ ROS
------------------------------
Write me!

All you need is to put together a :ref:`MOLA launch YAML file <yaml_slam_cfg_file>` with:

- A dataset source module.
- The ros2bridge module.

and launch it using `mola-cli`. See existing ROS launch examples
under `ros2-launch (mola_demos package) <https://github.com/MOLAorg/mola/tree/develop/mola_demos/ros2-launchs>`_,
with corresponding MOLA cli launch files in the `mola-cli-launchs <https://github.com/MOLAorg/mola/tree/develop/mola_demos/mola-cli-launchs>`_ directory.

.. dropdown:: Example: play back a KITTI dataset sequence to ROS 2
:open:

.. code-block:: bash
ros2 launch mola_demos ros-kitti-play.launch.py kitti_sequence:=01
Result: the mola_viz GUI + RViz.

.. figure:: https://mrpt.github.io/imgs/screenshot_mola_demo_kitti_replay_to_ros.jpg
:width: 600
7 changes: 7 additions & 0 deletions docs/source/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
Tutorials
=============

.. note::

This page refers to core MOLA packages. For higher-level SLAM tutorials,
refer to: :ref:`building-maps`.


These pages gives use-case examples of how to make the existing MOLA modules
work, how to extend them to create new ones, and how to use the auxiliary MOLA
tools.
Expand All @@ -15,3 +21,4 @@ tools.

tutorial-mola-main-cli-tools
tutorial-mola-cmake-commands

3 changes: 3 additions & 0 deletions kitti_metrics_eval/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog for package kitti_metrics_eval
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion kitti_metrics_eval/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>kitti_metrics_eval</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>CLI tool to evaluate the KITTI odometry bechmark metrics to trajectory files</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>mola</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Metapackage with all core open-sourced MOLA packages.</description>

<maintainer email="jlblanco@ual.es">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_bridge_ros2/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog for package mola_bridge_ros2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_bridge_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_bridge_ros2</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Bidirectional bridge ROS2-MOLA</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_demos/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_demos
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_demos</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Demo and example launch files for MOLA</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_imu_preintegration/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_imu_preintegration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_imu_preintegration/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_imu_preintegration</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Integrator of IMU angular velocity readings</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_euroc_dataset/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_input_euroc_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_euroc_dataset/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_euroc_dataset</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from EUROC SLAM datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_kitti360_dataset/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_input_kitti_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_kitti360_dataset/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_kitti360_dataset</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from Kitti-360 datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_kitti_dataset/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_input_kitti_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_kitti_dataset/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_kitti_dataset</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from Kitti odometry/SLAM datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_mulran_dataset/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog for package mola_input_mulran_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_mulran_dataset/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_mulran_dataset</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from MulRan datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_paris_luco_dataset/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog for package mola_input_paris_luco_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_paris_luco_dataset/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_paris_luco_dataset</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from Paris LUCO (CT-ICP) odometry/SLAM datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_input_rawlog/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_input_rawlog
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_rawlog/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_rawlog</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from MRPT rawlog datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions mola_input_rosbag2/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Changelog for package mola_input_rosbag2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


1.1.2 (2024-08-26)
------------------
* rosbag2 input: support for input directories for split bag datasets
* Contributors: Jose Luis Blanco-Claraco

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_input_rosbag2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_input_rosbag2</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Offline RawDataSource from rosbag2 datasets</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
48 changes: 37 additions & 11 deletions mola_input_rosbag2/src/Rosbag2Dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,50 @@ void Rosbag2Dataset::initialize_rds(const Yaml& c)
YAML_LOAD_MEMBER_OPT(read_ahead_length, size_t);
paused_ = cfg.getOrDefault<bool>("start_paused", paused_);

ASSERT_FILE_EXISTS_(rosbag_filename_);
const bool isDir = mrpt::system::directoryExists(rosbag_filename_);
const bool isFile = !isDir && mrpt::system::fileExists(rosbag_filename_);

ASSERTMSG_(
isFile || isDir, "'"s + rosbag_filename_ +
"' is nether an existing directory or file."s);

// auto guess rosbag_storage_id from rosbag2 extension:
if (rosbag_storage_id_.empty())
{
auto ext = mrpt::system::extractFileExtension(rosbag_filename_);
if (ext == "mcap")
rosbag_storage_id_ = "mcap";
else if (ext == "db3")
rosbag_storage_id_ = "sqlite3";
if (isFile)
{
auto ext = mrpt::system::extractFileExtension(rosbag_filename_);
if (ext == "mcap")
rosbag_storage_id_ = "mcap";
else if (ext == "db3")
rosbag_storage_id_ = "sqlite3";
else
{
THROW_EXCEPTION_FMT(
"Argument 'rosbag_storage_id' was not provided and could "
"not "
"determine the rosbag2 format from unknown extension of "
"file "
"'%s'",
rosbag_filename_.c_str());
}
}
else
{
THROW_EXCEPTION_FMT(
"Argument 'rosbag_storage_id' was not provided and could not "
"determine the rosbag2 format from unknown extension of file "
"'%s'",
rosbag_filename_.c_str());
const std::string metadata_yaml =
mrpt::system::pathJoin({rosbag_filename_, "metadata.yaml"});
ASSERT_FILE_EXISTS_(metadata_yaml);
const auto metadata =
mrpt::containers::yaml::FromFile(metadata_yaml);
ASSERT_(metadata.has("rosbag2_bagfile_information"));
ASSERT_(metadata["rosbag2_bagfile_information"].has(
"storage_identifier"));
rosbag_storage_id_ =
metadata["rosbag2_bagfile_information"]["storage_identifier"]
.as<std::string>();
}
MRPT_LOG_INFO_STREAM(
"Storage identifier auto-detected: " << rosbag_storage_id_);
}

// Open input ros bag:
Expand Down
3 changes: 3 additions & 0 deletions mola_kernel/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_kernel
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_kernel/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_kernel</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Fundamental C++ virtual interfaces and data types for the rest of MOLA modules</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions mola_launcher/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package mola_launcher
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.2 (2024-08-26)
------------------

1.1.1 (2024-08-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion mola_launcher/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<package format="3">
<name>mola_launcher</name>
<version>1.1.1</version>
<version>1.1.2</version>
<description>Launcher app for MOLA systems</description>

<maintainer email="joseluisblancoc@gmail.com">Jose-Luis Blanco-Claraco</maintainer>
Expand Down
Loading

0 comments on commit 234b13e

Please sign in to comment.