├── docs ├── COLCON_IGNORE ├── source │ ├── .gitignore │ ├── bibliography.rst │ ├── imgs │ │ ├── mola-slam-logo.png │ │ ├── mola-architecture.png │ │ ├── odometry_inputs_outputs.png │ │ ├── mola_tutorial_building_maps_warehouse_rawlog.png │ │ └── mola_tutorial_building_maps_warehouse_keyframes.png │ ├── demo-pose-graph-g2o-file.png │ ├── demo-rawlog-velodyne-slam.png │ ├── mola-slam-representations.png │ ├── templ.rst.in │ ├── app_sm2mm.rst │ ├── module-mp2p-icp.rst │ ├── app_mm2txt.rst │ ├── app_sm-cli.rst │ ├── app_txt2mm.rst │ ├── app_icp-run.rst │ ├── app_kitti2mm.rst │ ├── app_mm-info.rst │ ├── app_mm-filter.rst │ ├── app_mm-georef.rst │ ├── app_mm-viewer.rst │ ├── mola_lo_apps.rst │ ├── mp2p_icp_basics.rst │ ├── module-mola-common.rst │ ├── module-mola-kernel.rst │ ├── app_icp-log-viewer.rst │ ├── module-mola-fe-lidar.rst │ ├── mola_lo_pipelines.rst │ ├── module-mola-input-ros1.rst │ ├── mola_lidar_odometry.rst │ ├── mp2p_icp_applications.rst │ ├── module-mola-slam-gtsam.rst │ ├── mola_state_estimators.rst │ ├── module-mola-input-rawlog.rst │ ├── module-mola-fe-g2o-dataset.rst │ ├── module-mola-input-hwdrivers.rst │ ├── mp2p_icp_optimal-transformations.rst │ ├── module-mola-input-euroc-dataset.rst │ ├── module-mola-input-kaist-dataset.rst │ ├── module-mola-input-kitti-dataset.rst │ ├── module-mola-imu-preintegration.rst │ ├── mp2p_icp_filters.rst │ ├── module-mola-yaml.rst │ ├── mola_architecture.rst │ ├── tutorials.rst │ ├── concept-module-directories-paths.rst │ ├── tutorial-mola-main-cli-tools.rst │ ├── _templates │ │ ├── sourcelink.html │ │ └── layout.html │ ├── doxyrest-frames │ │ ├── cfamily │ │ │ ├── crefdb.py.in │ │ │ ├── index.rst.in │ │ │ ├── details_events.rst.in │ │ │ ├── details_defines.rst.in │ │ │ ├── details_typedefs.rst.in │ │ │ ├── overview_events.rst.in │ │ │ ├── details_properties.rst.in │ │ │ ├── overview_typedefs.rst.in │ │ │ ├── overview_defines.rst.in │ │ │ ├── overview_properties.rst.in │ │ │ ├── details_functions.rst.in │ │ │ ├── overview_functions.rst.in │ │ │ ├── scope_namespace.rst.in │ │ │ ├── overview_aliases.rst.in │ │ │ ├── example.rst.in │ │ │ ├── global.rst.in │ │ │ ├── crefdb_items.py.in │ │ │ ├── namespace.rst.in │ │ │ ├── overview_namespaces.rst.in │ │ │ ├── overview_construction.rst.in │ │ │ ├── class.rst.in │ │ │ ├── crefdb_enums.py.in │ │ │ ├── details_construction.rst.in │ │ │ ├── overview_common.rst.in │ │ │ ├── overview_classes.rst.in │ │ │ ├── details_aliases.rst.in │ │ │ ├── details_unnamed_enum_values.rst.in │ │ │ └── crefdb_members.py.in │ │ └── common │ │ │ ├── crefdb_items.py.in │ │ │ ├── crefdb_groups.py.in │ │ │ ├── group.rst.in │ │ │ ├── footnotes.rst.in │ │ │ ├── table.lua │ │ │ ├── page.rst.in │ │ │ └── details.rst.in │ ├── demo-kitti-lidar-slam.rst │ ├── concept-state-vector.rst │ ├── demo-rawlog-velodyne-slam.rst │ ├── concept-simulation-real-time.rst │ ├── changelog.rst │ ├── demo-pose-graph-g2o-file.rst │ ├── modules.rst │ └── concept-mola-architecture.rst ├── .gitignore ├── README.md ├── remote-static-files.sh └── requirements.txt ├── mola_yaml ├── tests │ ├── d1 │ │ ├── test3.yaml │ │ ├── d2 │ │ │ └── test4.yaml │ │ └── test3b.yaml │ ├── test1.yaml │ ├── test2.yaml │ ├── test_include1.yaml │ ├── test_include2.yaml │ ├── test_include3.yaml │ └── CMakeLists.txt ├── README.md ├── package.xml ├── include │ └── mola_yaml │ │ └── macro_helpers.h ├── CMakeLists.txt └── LICENSE ├── mola_metric_maps ├── 3rdparty │ ├── .clang-format │ └── CMakeLists.txt ├── tests │ ├── CMakeLists.txt │ └── test-occgrid.cpp ├── README.md ├── package.xml └── src │ └── register.cpp ├── scripts ├── clang_git_format │ ├── clang_git_format │ │ ├── config.py │ │ ├── __init__.py │ │ └── custom_exceptions.py │ └── .gitignore └── clang-formatter.sh ├── .github ├── python_clang_format_reqs.txt └── workflows │ └── check-clang-format.yml ├── .gitmodules ├── colcon_defaults.yaml ├── mola_pose_list ├── tests │ ├── CMakeLists.txt │ └── test-searchable-pose-list.cpp ├── README.md ├── package.xml └── CMakeLists.txt ├── mola ├── README.rst ├── CMakeLists.txt ├── package.xml └── LICENSE ├── mola_launcher ├── scripts │ └── mola-cli-completion.bash ├── README.md ├── apps │ ├── CMakeLists.txt │ └── mola-dir.cpp ├── src │ └── MolaDLL_Loader.h └── package.xml ├── mola_msgs ├── srv │ ├── RelocalizeNearPose.srv │ ├── RelocalizeFromStateEstimator.srv │ ├── MolaRuntimeParamGet.srv │ ├── MapLoad.srv │ ├── MapSave.srv │ └── MolaRuntimeParamSet.srv ├── package.xml └── CMakeLists.txt ├── LICENSE ├── mola_input_kitti360_dataset ├── README.md ├── package.xml └── CMakeLists.txt ├── docker ├── docker-build-and-run.sh ├── all_mola.repos └── docker-compose.yml ├── mola_kernel ├── README.md ├── include │ └── mola_kernel │ │ ├── Yaml.h │ │ ├── pretty_print_exception.h │ │ ├── variant_helper.h │ │ ├── version.h │ │ ├── id.h │ │ ├── FastAllocator.h │ │ ├── interfaces │ │ ├── RawDataConsumer.h │ │ ├── Relocalization.h │ │ └── Dataset_UI.h │ │ └── Georeferencing.h ├── src │ ├── register.cpp │ └── MinimalModuleContainer.cpp └── package.xml ├── mola_viz ├── README.md ├── package.xml └── CMakeLists.txt ├── mola_input_rawlog ├── README.md ├── package.xml └── CMakeLists.txt ├── mola_input_rosbag2 ├── README.md └── package.xml ├── mola_input_video ├── README.md ├── package.xml ├── CMakeLists.txt └── CHANGELOG.rst ├── mola_input_mulran_dataset ├── README.md ├── package.xml └── CMakeLists.txt ├── mola_relocalization ├── tests │ └── CMakeLists.txt ├── package.xml └── CMakeLists.txt ├── .clang-tidy ├── mola_input_kitti_dataset ├── README.md ├── package.xml ├── CMakeLists.txt └── matlab │ └── reproject_kitti_scan_txt.m ├── mola_input_paris_luco_dataset ├── README.md ├── package.xml └── CMakeLists.txt ├── mola_input_lidar_bin_dataset ├── README.md ├── CHANGELOG.rst ├── package.xml └── CMakeLists.txt ├── mola_input_euroc_dataset ├── README.md ├── package.xml └── CMakeLists.txt ├── mola_demos ├── README.md ├── mola-cli-launchs │ ├── lidar_bin_directory_just_replay.yaml │ ├── paris_luco_just_replay.yaml │ ├── rawlog_just_replay.yaml │ ├── euroc_stereo_just_replay.yaml │ ├── kitti360_just_replay.yaml │ ├── kitti_just_replay.yaml │ ├── mulran_just_replay.yaml │ └── ros2_ouster_just_view.yaml ├── package.xml ├── ros2-launchs │ ├── ros-kitti-play.launch.py │ └── ros-mulran-play.launch.py ├── LICENSE └── CMakeLists.txt ├── .gitignore ├── .clang-format ├── mola_traj_tools ├── package.xml ├── src │ ├── traj_tum2ypr.cpp │ ├── traj_ypr2tum.cpp │ ├── traj_tf_right.cpp │ ├── traj_tf_left.cpp │ └── traj_rebase.cpp ├── python │ └── ncd-csv2tum ├── LICENSE └── CMakeLists.txt ├── kitti_metrics_eval ├── package.xml ├── CMakeLists.txt └── LICENSE ├── mola_bridge_ros2 ├── README.md ├── LICENSE └── package.xml └── .vscode └── settings.json /docs/COLCON_IGNORE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/.gitignore: -------------------------------------------------------------------------------- 1 | citelist* 2 | bib*.aux 3 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | source/_generated_changelogs/ 3 | -------------------------------------------------------------------------------- /mola_yaml/tests/d1/test3.yaml: -------------------------------------------------------------------------------- 1 | # test3 2 | --- 3 | p3: true 4 | -------------------------------------------------------------------------------- /mola_yaml/tests/d1/d2/test4.yaml: -------------------------------------------------------------------------------- 1 | # test4 2 | --- 3 | p4: true 4 | -------------------------------------------------------------------------------- /mola_yaml/tests/test1.yaml: -------------------------------------------------------------------------------- 1 | # test1 2 | --- 3 | a: 10 4 | b: 20 5 | -------------------------------------------------------------------------------- /mola_yaml/tests/test2.yaml: -------------------------------------------------------------------------------- 1 | # test2 2 | --- 3 | c: 30 4 | d: 40 5 | -------------------------------------------------------------------------------- /mola_metric_maps/3rdparty/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: Never 3 | -------------------------------------------------------------------------------- /scripts/clang_git_format/clang_git_format/config.py: -------------------------------------------------------------------------------- 1 | 2 | PROGNAME = "clang-format-14" 3 | -------------------------------------------------------------------------------- /docs/source/bibliography.rst: -------------------------------------------------------------------------------- 1 | Bibliography 2 | ================= 3 | 4 | .. bibliography:: 5 | -------------------------------------------------------------------------------- /mola_yaml/tests/test_include1.yaml: -------------------------------------------------------------------------------- 1 | # test 2 | --- 3 | params: 4 | $include{test1.yaml} 5 | -------------------------------------------------------------------------------- /.github/python_clang_format_reqs.txt: -------------------------------------------------------------------------------- 1 | # Requisites for the clang-format linter script 2 | argparse 3 | colorlog 4 | -------------------------------------------------------------------------------- /docs/source/imgs/mola-slam-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/imgs/mola-slam-logo.png -------------------------------------------------------------------------------- /docs/source/demo-pose-graph-g2o-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/demo-pose-graph-g2o-file.png -------------------------------------------------------------------------------- /docs/source/imgs/mola-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/imgs/mola-architecture.png -------------------------------------------------------------------------------- /docs/source/demo-rawlog-velodyne-slam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/demo-rawlog-velodyne-slam.png -------------------------------------------------------------------------------- /docs/source/mola-slam-representations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/mola-slam-representations.png -------------------------------------------------------------------------------- /docs/source/templ.rst.in: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/$f 2 | 3 | .. include:: $i 4 | -------------------------------------------------------------------------------- /mola_yaml/tests/test_include2.yaml: -------------------------------------------------------------------------------- 1 | # test 2 | --- 3 | map1: 4 | $include{test1.yaml} 5 | map2: 6 | $include{test2.yaml} 7 | -------------------------------------------------------------------------------- /docs/source/imgs/odometry_inputs_outputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/imgs/odometry_inputs_outputs.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "3rdparty/robin-map"] 2 | path = mola_metric_maps/3rdparty/robin-map 3 | url = https://github.com/Tessil/robin-map.git 4 | -------------------------------------------------------------------------------- /mola_yaml/tests/d1/test3b.yaml: -------------------------------------------------------------------------------- 1 | # test3b 2 | --- 3 | foo: "bar" 4 | config4: 5 | $include{d2/test4.yaml} 6 | config2: 7 | $include{../test2.yaml} 8 | -------------------------------------------------------------------------------- /colcon_defaults.yaml: -------------------------------------------------------------------------------- 1 | build: 2 | symlink-install: true 3 | cmake-args: 4 | - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" 5 | - "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" 6 | -------------------------------------------------------------------------------- /docs/source/imgs/mola_tutorial_building_maps_warehouse_rawlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/imgs/mola_tutorial_building_maps_warehouse_rawlog.png -------------------------------------------------------------------------------- /mola_yaml/tests/test_include3.yaml: -------------------------------------------------------------------------------- 1 | # test 2 | --- 3 | map1: 4 | $include{d1/test3.yaml} 5 | map2: 6 | $include{test1.yaml} 7 | map3: 8 | $include{d1/test3b.yaml} 9 | -------------------------------------------------------------------------------- /docs/source/app_sm2mm.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_sm2mm.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_sm2mm.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mp2p-icp.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/index.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/index.rst 4 | -------------------------------------------------------------------------------- /mola_yaml/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #Unit tests: 2 | mola_add_test( 3 | TARGET test-mola_yaml-parser 4 | SOURCES test-yaml-parser.cpp 5 | LINK_LIBRARIES 6 | mola_yaml 7 | ) 8 | -------------------------------------------------------------------------------- /docs/source/app_mm2txt.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_mm2txt.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_mm2txt.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_sm-cli.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_sm-cli.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_sm-cli.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_txt2mm.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_txt2mm.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_txt2mm.rst 4 | -------------------------------------------------------------------------------- /docs/source/imgs/mola_tutorial_building_maps_warehouse_keyframes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOLAorg/mola/HEAD/docs/source/imgs/mola_tutorial_building_maps_warehouse_keyframes.png -------------------------------------------------------------------------------- /scripts/clang-formatter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find kitti*/ mola*/ -iname *.h -o -iname *.hpp -o -iname *.cpp -o -iname *.c | xargs -I FIL bash -c "echo FIL && clang-format-14 -i FIL" 4 | -------------------------------------------------------------------------------- /docs/source/app_icp-run.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_icp-run.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_icp-run.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_kitti2mm.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_kitti2mm.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_kitti2mm.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_mm-info.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_mm-info.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_mm-info.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_mm-filter.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_mm-filter.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_mm-filter.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_mm-georef.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_mm-georef.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_mm-georef.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_mm-viewer.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_mm-viewer.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_mm-viewer.rst 4 | -------------------------------------------------------------------------------- /docs/source/mola_lo_apps.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola_lidar_odometry/blob/develop/docs/mola_lo_apps.rst 2 | 3 | .. include:: ../../../mola_lidar_odometry/docs/mola_lo_apps.rst 4 | -------------------------------------------------------------------------------- /docs/source/mp2p_icp_basics.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/mp2p_icp_basics.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/mp2p_icp_basics.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-common.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola_common/blob/develop/docs/module-mola-common.rst 2 | 3 | .. include:: ../../modules/mola_common/docs/module-mola-common.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-kernel.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-kernel/blob/develop/docs/module-mola-kernel.rst 2 | 3 | .. include:: ../../modules/mola-kernel/docs/module-mola-kernel.rst 4 | -------------------------------------------------------------------------------- /docs/source/app_icp-log-viewer.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/app_icp-log-viewer.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/app_icp-log-viewer.rst 4 | -------------------------------------------------------------------------------- /mola_pose_list/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Unit tests: 2 | mola_add_test( 3 | TARGET test-searchable-pose-list 4 | SOURCES test-searchable-pose-list.cpp 5 | LINK_LIBRARIES 6 | mola::mola_pose_list 7 | ) 8 | -------------------------------------------------------------------------------- /docs/source/module-mola-fe-lidar.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-fe-lidar/blob/develop/docs/module-mola-fe-lidar.rst 2 | 3 | .. include:: ../../modules/mola-fe-lidar/docs/module-mola-fe-lidar.rst 4 | -------------------------------------------------------------------------------- /docs/source/mola_lo_pipelines.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola_lidar_odometry/blob/develop/docs/mola_lo_pipelines.rst 2 | 3 | .. include:: ../../../mola_lidar_odometry/docs/mola_lo_pipelines.rst 4 | -------------------------------------------------------------------------------- /mola/README.rst: -------------------------------------------------------------------------------- 1 | MRPT 2 | -------------------- 3 | 4 | ROS wrappers for Mobile Robot Programming Toolkit (MRPT) classes and apps. 5 | Refer to http://wiki.ros.org/mrpt_navigation for further documentation. 6 | 7 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-ros1.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-ros1/blob/develop/docs/mola-input-ros1.rst 2 | 3 | .. include:: ../../modules/mola-input-ros1/docs/module-mola-input-ros1.rst 4 | -------------------------------------------------------------------------------- /docs/source/mola_lidar_odometry.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola_lidar_odometry/blob/develop/docs/mola_lidar_odometry.rst 2 | 3 | .. include:: ../../../mola_lidar_odometry/docs/mola_lidar_odometry.rst 4 | -------------------------------------------------------------------------------- /docs/source/mp2p_icp_applications.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/mp2p_icp_applications.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/mp2p_icp_applications.rst 4 | -------------------------------------------------------------------------------- /mola_launcher/scripts/mola-cli-completion.bash: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | complete -W "--list-modules --rtti-children-of --rtti-list-all --profiler-whole --profiler -p -v -c --config --help -h --version" mola-cli 4 | 5 | -------------------------------------------------------------------------------- /docs/source/module-mola-slam-gtsam.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-slam-gtsam/blob/develop/docs/module-mola-slam-gtsam.rst 2 | 3 | .. include:: ../../modules/mola-slam-gtsam/docs/module-mola-slam-gtsam.rst 4 | -------------------------------------------------------------------------------- /docs/source/mola_state_estimators.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola_state_estimation/blob/develop/docs/mola_state_estimators.rst 2 | 3 | .. include:: ../../../mola_state_estimation/docs/mola_state_estimators.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-rawlog.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-rawlog/blob/develop/docs/module-mola-input-rawlog.rst 2 | 3 | .. include:: ../../modules/mola-input-rawlog/docs/module-mola-input-rawlog.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-fe-g2o-dataset.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-fe-g2o-dataset/blob/develop/docs/module-mola-fe-g2o-dataset.rst 2 | 3 | .. include:: ../../modules/mola-fe-g2o-dataset/docs/module-mola-fe-g2o-dataset.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-hwdrivers.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-hwdrivers/blob/develop/docs/module-mola-input-hwdrivers.rst 2 | 3 | .. include:: ../../modules/mola-input-hwdrivers/docs/module-mola-input-hwdrivers.rst 4 | -------------------------------------------------------------------------------- /docs/source/mp2p_icp_optimal-transformations.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/mp2p_icp_optimal-transformations.rst 2 | 3 | .. include:: ../../../mp2p_icp/docs/source/mp2p_icp_optimal-transformations.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-euroc-dataset.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-euroc-dataset/blob/develop/docs/module-mola-input-euroc-dataset.rst 2 | 3 | .. include:: ../../modules/mola-input-euroc-dataset/docs/module-mola-input-euroc-dataset.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-kaist-dataset.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-kaist-dataset/blob/develop/docs/module-mola-input-kaist-dataset.rst 2 | 3 | .. include:: ../../modules/mola-input-kaist-dataset/docs/module-mola-input-kaist-dataset.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-input-kitti-dataset.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mola-input-kitti-dataset/blob/develop/docs/module-mola-input-kitti-dataset.rst 2 | 3 | .. include:: ../../modules/mola-input-kitti-dataset/docs/module-mola-input-kitti-dataset.rst 4 | -------------------------------------------------------------------------------- /docs/source/module-mola-imu-preintegration.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/module-mola-imu-preintegration/blob/develop/docs/module-mola-imu-preintegration.rst 2 | 3 | .. include:: ../../modules/mola-imu-preintegration/docs/module-mola-imu-preintegration.rst 4 | -------------------------------------------------------------------------------- /scripts/clang_git_format/clang_git_format/__init__.py: -------------------------------------------------------------------------------- 1 | from .clang_format import ClangFormat 2 | from .repo import Repo 3 | from .custom_exceptions import CommitIDTooShort 4 | 5 | 6 | __all__ = [ 7 | ClangFormat, 8 | Repo, 9 | CommitIDTooShort, 10 | ] 11 | -------------------------------------------------------------------------------- /docs/source/mp2p_icp_filters.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/MOLAorg/mp2p_icp/blob/develop/docs/source/mp2p_icp_filters.rst 2 | 3 | ==================== 4 | Point Cloud Filters 5 | ==================== 6 | 7 | .. include:: ../../../mp2p_icp/docs/source/mp2p_icp_filters.rst 8 | -------------------------------------------------------------------------------- /mola_msgs/srv/RelocalizeNearPose.srv: -------------------------------------------------------------------------------- 1 | # This service requests re-localization around a given pose. 2 | 3 | # Request 4 | geometry_msgs/PoseWithCovarianceStamped pose 5 | --- 6 | # Result. False if there was no MOLA localization module 7 | # accepting this request. 8 | bool accepted 9 | -------------------------------------------------------------------------------- /docs/source/module-mola-yaml.rst: -------------------------------------------------------------------------------- 1 | .. _mola-yaml: 2 | 3 | ==================== 4 | Module: mola-yaml 5 | ==================== 6 | 7 | YAML helper C++ library common to all MOLA modules, released under BSD-3-Clause. 8 | 9 | This module implements the YAML extensions explained in: :ref:`yaml_slam_cfg_file`. 10 | -------------------------------------------------------------------------------- /mola_msgs/srv/RelocalizeFromStateEstimator.srv: -------------------------------------------------------------------------------- 1 | # This service requests re-localization using the output of the MOLA system 2 | # state estimator, for example, from GNSS, odometry, and IMU data fusion. 3 | 4 | # Request. 5 | # No data needed. 6 | --- 7 | # Result. False if there was no MOLA localization module 8 | # accepting this request. 9 | bool accepted 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Each subdirectory of this project contains a package.xml file specifying 2 | the license under which it is released. Used licenses include: 3 | 4 | SPDX-ID: 5 | * GPL-3.0-only 6 | * BSD-3-Clause 7 | 8 | Contributions to existing files should be made under the license of that file. 9 | New files should be made under the first license listed in the appropriate 10 | package.xml file 11 | -------------------------------------------------------------------------------- /mola_msgs/srv/MolaRuntimeParamGet.srv: -------------------------------------------------------------------------------- 1 | # This service requests all known runtime configurable parameters of running mola::ExecutableBase modules. 2 | 3 | # Request. 4 | # No data needed. 5 | --- 6 | # Result: a multiline string in YAML format with all parameters, in this format: 7 | # --- 8 | # module1: 9 | # var: value 10 | # module2: 11 | # var: value 12 | # ... 13 | # --- 14 | string parameters 15 | -------------------------------------------------------------------------------- /mola_launcher/README.md: -------------------------------------------------------------------------------- 1 | # mola_launcher 2 | Launcher app for MOLA systems 3 | 4 | ## Build and install 5 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 6 | 7 | ## Docs and examples 8 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 9 | 10 | ## License 11 | This package is released under the GNU GPL v3 license. Other options available upon request. 12 | -------------------------------------------------------------------------------- /mola_pose_list/README.md: -------------------------------------------------------------------------------- 1 | # mola_pose_list 2 | Data structures and algorithms related to SE(3) poses. 3 | 4 | This repository provides the C++ classes: 5 | - `SearchablePoseList` 6 | - `HashedSetSE3` 7 | 8 | ## Build and install 9 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 10 | 11 | ## License 12 | This package is released under the GNU GPL v3 license. Other options available upon request. 13 | -------------------------------------------------------------------------------- /mola_input_kitti360_dataset/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_kitti360_dataset 2 | Offline RawDataSource from Kitti-360 SLAM datasets 3 | 4 | Provided MOLA modules: 5 | * `Kitti360Dataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## License 11 | This package is released under the GNU GPL v3 license. Other options available upon request. 12 | -------------------------------------------------------------------------------- /mola/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(mola) 4 | 5 | # MOLA CMake scripts: "mola_xxx()" 6 | find_package(mola_common REQUIRED) 7 | 8 | # This is a meta package, there are no targets. 9 | # Install files: 10 | install(DIRECTORY 11 | #rviz2 12 | DESTINATION 13 | share/${PROJECT_NAME} 14 | ) 15 | 16 | # Silent warning on unused variable: 17 | set(ignored ${CMAKE_EXPORT_COMPILE_COMMANDS}) 18 | unset(ignored) 19 | -------------------------------------------------------------------------------- /docs/source/mola_architecture.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | MOLA architecture 3 | =================== 4 | 5 | These pages explain the theory underlying the MOLA architecture, as well as 6 | the key elements of a MOLA SLAM system. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | concept-mola-architecture 12 | concept-slam-configuration-file 13 | concept-module-directories-paths 14 | concept-simulation-real-time 15 | 16 | .. concept-state-vector 17 | -------------------------------------------------------------------------------- /docker/docker-build-and-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #export UID=$(id -u) 4 | export GID=$(id -g) 5 | xhost +local:docker 6 | 7 | export MOLA_DATASETS_HOST=${MOLA_DATASETS:-./my_datasets} 8 | export MOLA_DATASETS_CONTAINER=${MOLA_DATASETS:-/home/rosuser/data} 9 | 10 | export BUILDKIT_PROGRESS=plain 11 | 12 | # use this to force re-download the latest version of all git repositories: 13 | # docker compose build --no-cache 14 | 15 | docker compose up --build -d $1 16 | 17 | -------------------------------------------------------------------------------- /mola_kernel/README.md: -------------------------------------------------------------------------------- 1 | # mola_kernel 2 | MOLA kernel library, providing the definition of essential virtual interfaces and data types. 3 | 4 | ## Build and install 5 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 6 | 7 | ## Docs and examples 8 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 9 | 10 | ## License 11 | This package is released under the GNU GPL v3 license. Other options available upon request. 12 | -------------------------------------------------------------------------------- /docs/source/tutorials.rst: -------------------------------------------------------------------------------- 1 | .. _tutorials: 2 | 3 | ============= 4 | Tutorials 5 | ============= 6 | 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | :caption: SLAM, mapping, localization 11 | 12 | building-maps 13 | tutorial-ouster-lio 14 | tutorial-mola-lo-map-and-localize 15 | 16 | 17 | .. toctree:: 18 | :maxdepth: 2 19 | :caption: Core MOLA functionalities 20 | 21 | tutorial-mola-main-cli-tools 22 | tutorial-mola-cmake-commands 23 | tutorial-mulran-replay-to-ros2 24 | 25 | -------------------------------------------------------------------------------- /docs/source/concept-module-directories-paths.rst: -------------------------------------------------------------------------------- 1 | .. _concepts_mola_paths: 2 | 3 | ============================================= 4 | MOLA module paths 5 | ============================================= 6 | 7 | 8 | .. _concepts_module_lib_dir: 9 | 10 | Module binary library paths 11 | ------------------------------ 12 | 13 | Write me! 14 | 15 | 16 | 17 | ---- 18 | 19 | .. _concepts_module_shared_dir: 20 | 21 | Module shared files paths 22 | ------------------------------ 23 | 24 | Write me! 25 | -------------------------------------------------------------------------------- /mola_yaml/README.md: -------------------------------------------------------------------------------- 1 | # mola_yaml 2 | YAML helper library common to MOLA modules. A C++ library to parse YAML files with extended syntax allowing variable replacing, recursive `include`s of other YAML files, etc. 3 | 4 | ## Build and install 5 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 6 | 7 | ## Docs and examples 8 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 9 | 10 | ## License 11 | This package is released under the BSD-3 license. 12 | -------------------------------------------------------------------------------- /mola_msgs/srv/MapLoad.srv: -------------------------------------------------------------------------------- 1 | # This service requests loading a map from a given map file(s). 2 | 3 | # Request. 4 | # File relative or absolute path. Do not add any file extension, since maps 5 | # may be loaded/saved to several files depending on implementation. 6 | string map_path 7 | --- 8 | # Result. False if there was no MOLA map module accepting this request, or 9 | # there was an error loading the map. 10 | bool success 11 | # In case of no success, here is a human-readable error reason. 12 | string error_message 13 | -------------------------------------------------------------------------------- /mola_msgs/srv/MapSave.srv: -------------------------------------------------------------------------------- 1 | # This service requests saving the current map to a given map file(s). 2 | 3 | # Request. 4 | # File relative or absolute path. Do not add any file extension, since maps 5 | # may be loaded/saved to several files depending on implementation. 6 | string map_path 7 | --- 8 | # Result. False if there was no MOLA map module accepting this request, or 9 | # there was an error saving the map. 10 | bool success 11 | # In case of no success, here is a human-readable error reason. 12 | string error_message 13 | -------------------------------------------------------------------------------- /mola_viz/README.md: -------------------------------------------------------------------------------- 1 | # mola_viz 2 | GUI for MOLA 3 | 4 | Provides the C++ library `libmola-viz` with a flexible API for any other module 5 | to display windows, controls, etc. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /docs/source/tutorial-mola-main-cli-tools.rst: -------------------------------------------------------------------------------- 1 | .. _mola_main_cli_tools: 2 | 3 | ===================== 4 | MOLA main CLI tools 5 | ===================== 6 | 7 | - ``mola-cli``: This is the most-common entry point to the MOLA system for users. See: :ref:`mola_cli`. 8 | - ``mola-dir``: It finds the shared directory (see :ref:`concepts_module_shared_dir`) of a module. See: :ref:`mola_dir`. 9 | - ``mola-yaml-parser``: It parses YAML files using MOLA-specific extensions (see :ref:`yaml_extensions`). See: :ref:`mola_yaml_parser`. 10 | -------------------------------------------------------------------------------- /mola_input_rawlog/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_rawlog 2 | Offline RawDataSource from MRPT rawlog datasets 3 | 4 | Provided MOLA modules: 5 | * `RawlogDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_input_rosbag2/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_rawlog 2 | Offline RawDataSource from MRPT rawlog datasets 3 | 4 | Provided MOLA modules: 5 | * `RawlogDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_input_video/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_video 2 | RawDataSource from live or offline video sources. 3 | 4 | Provided MOLA modules: 5 | * `VideoDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Root directory for MOLA Sphinx documentation. 2 | 3 | # Requisites 4 | 5 | ``` 6 | # Install Sphinx & dependencies: 7 | sudo -H pip install sphinx_rtd_theme 8 | ``` 9 | 10 | Install doxyrest: [instructions](https://github.com/vovkos/doxyrest_b/blob/master/README.rst). 11 | 12 | 13 | # How to generate docs 14 | 15 | From the MOLA source tree: 16 | 17 | ``` 18 | cd docs 19 | make 20 | ``` 21 | 22 | You may need to either modify PATH and PYTHONPATH in your env, or edit the hard-coded paths in mola/docs/Makefile 23 | 24 | -------------------------------------------------------------------------------- /mola_input_mulran_dataset/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_mulran_dataset 2 | Offline RawDataSource from Mulran datasets 3 | 4 | Provided MOLA modules: 5 | * `MulranDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_relocalization/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Unit tests: 2 | 3 | if(mola_test_datasets_FOUND) 4 | #message(STATUS "mola_test_datasets: ${mola_test_datasets_DIR}") 5 | 6 | set(TEST_DATASETS_ROOT "${mola_test_datasets_DIR}/../datasets/") 7 | 8 | mola_add_test( 9 | TARGET test-relocalization-se2-kitti 10 | SOURCES test-relocalization-se2-kitti.cpp 11 | LINK_LIBRARIES 12 | mola::mola_relocalization 13 | ) 14 | target_compile_definitions(test-relocalization-se2-kitti PRIVATE TEST_DATASETS_ROOT=\"${TEST_DATASETS_ROOT}\") 15 | endif() 16 | 17 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: > 2 | -*, 3 | bugprone-*, 4 | -bugprone-easily-swappable-parameters, 5 | performance-*, 6 | readability-braces-around-statements, 7 | readability-else-after-return, 8 | cppcoreguidelines-interfaces-global-init, 9 | cppcoreguidelines-pro-type-member-init, 10 | cppcoreguidelines-pro-type-static-cast-downcast, 11 | cppcoreguidelines-pro-type-union-access, 12 | cppcoreguidelines-slicing, 13 | cppcoreguidelines-special-member-functions 14 | WarningsAsErrors: '' 15 | HeaderFilterRegex: '.*' 16 | FormatStyle: file 17 | -------------------------------------------------------------------------------- /docs/remote-static-files.sh: -------------------------------------------------------------------------------- 1 | set -x 2 | set -e 3 | 4 | # Better to hot-link? 5 | # if [ ! -d html/videos/ ]; then 6 | # mkdir html/videos 7 | # (cd html/videos/ && wget https://mrpt.github.io/videos/mp2p_icp-log-viewer-demo.mp4) 8 | # (cd html/videos/ && wget https://mrpt.github.io/videos/mola_main_page_video.mp4); 9 | # (cd html/videos/ && wget https://mrpt.github.io/videos/mola-lo-gui-kitti_demo_00.mp4); 10 | # fi 11 | 12 | cp -v ../../mola_lidar_odometry/docs/imgs/* html/imgs/ 13 | cp -v ../../mola_state_estimation/docs/imgs/* html/imgs/ 14 | -------------------------------------------------------------------------------- /mola_input_kitti_dataset/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_kitti_dataset 2 | Offline RawDataSource from Kitti odometry/SLAM datasets 3 | 4 | Provided MOLA modules: 5 | * `KittiOdometryDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_input_paris_luco_dataset/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_paris_luco_dataset 2 | Offline RawDataSource from Paris LUCO (CT-ICP) odometry/SLAM datasets 3 | 4 | Provided MOLA modules: 5 | * `ParisLucoDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_msgs/srv/MolaRuntimeParamSet.srv: -------------------------------------------------------------------------------- 1 | # This service requests changing one or more runtime configurable parameters of running mola::ExecutableBase modules. 2 | 3 | # Request: a multiline string in YAML format with all parameters that need to be changed, in this format: 4 | # --- 5 | # module1: 6 | # var: value 7 | # module2: 8 | # var: value 9 | # ... 10 | # --- 11 | string parameters 12 | --- 13 | # Result. False if there was some problem changing the parameters. 14 | bool success 15 | # In case of no success, here is a human-readable error reason. 16 | string error_message 17 | -------------------------------------------------------------------------------- /mola_input_lidar_bin_dataset/README.md: -------------------------------------------------------------------------------- 1 | # Changelog for package mola_input_lidar_bin_dataset 2 | Offline RawDataSource from LiDAR datasets stored as `.bin` files in the Kitti binary format 3 | 4 | Provided MOLA modules: 5 | * `BinFileDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_input_euroc_dataset/README.md: -------------------------------------------------------------------------------- 1 | # mola_input_euroc_dataset 2 | Offline RawDataSource from [EUROC SLAM datasets](https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets). 3 | 4 | Provided MOLA modules: 5 | * `EurocDataset`, type RawDataSourceBase. 6 | 7 | ## Build and install 8 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 9 | 10 | ## Docs and examples 11 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 12 | 13 | ## License 14 | This package is released under the GNU GPL v3 license. Other options available upon request. 15 | -------------------------------------------------------------------------------- /mola_demos/README.md: -------------------------------------------------------------------------------- 1 | # mola_demos 2 | Demo and example launch files for MOLA 3 | 4 | Note that there are launch files for both, ROS 2 and standalone builds of MOLA. 5 | 6 | ## Examples and demos 7 | 8 | ### Read an external Ouster lidar into MOLA 9 | 10 | ```bash 11 | # In one terminal 12 | mola-cli $(ros2 pkg prefix --share mola_demos)/launch/ros2_ouster_just_view.yaml 13 | 14 | # In another terminal: 15 | ros2 bag play my_lidar_dataset.mcap 16 | ``` 17 | 18 | ## Build and install 19 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 20 | 21 | ## License 22 | This package is released under the BSD-3 license. 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | build 3 | build-* 4 | *~ 5 | install* 6 | log 7 | cmake_install.cmake 8 | CMakeCache.txt 9 | CMakeFiles 10 | CMakeLists.txt.user* 11 | CMakeScripts 12 | compile_commands.json 13 | CTestTestfile.cmake 14 | docs/html 15 | docs/source/class*.rst 16 | docs/source/doxygen-index.rst 17 | docs/source/enum*.rst 18 | docs/source/global.rst 19 | docs/source/group*.rst 20 | docs/source/namespace*.rst 21 | docs/source/page*.rst 22 | docs/source/struct*.rst 23 | docs/source/xml-dir/ 24 | install_manifest.txt 25 | Makefile 26 | Testing 27 | 28 | #visual studio 29 | .vs/* 30 | .vscode/* 31 | !.vscode/settings.json 32 | **/.vscode 33 | .cache 34 | -------------------------------------------------------------------------------- /docs/source/_templates/sourcelink.html: -------------------------------------------------------------------------------- 1 | {%- if show_source and has_source and sourcename %} 2 |

{{ _('This Page') }}

3 | 15 | {%- endif %} 16 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/crefdb.py.in: -------------------------------------------------------------------------------- 1 | #............................................................................... 2 | # 3 | # This file is part of the Doxyrest toolkit. 4 | # 5 | # Doxyrest is distributed under the MIT license. 6 | # For details see accompanying license.txt file, 7 | # the public copy of which is also available at: 8 | # http://tibbo.com/downloads/archive/doxyrest/license.txt 9 | # 10 | #............................................................................... 11 | 12 | crefdb = { 13 | %{ 14 | includeFile("crefdb_groups.py.in", g_groupArray) 15 | includeFile("crefdb_members.py.in", g_globalNamespace) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs/source/demo-kitti-lidar-slam.rst: -------------------------------------------------------------------------------- 1 | .. _demos_kitti_lidar: 2 | 3 | ====================================== 4 | Demo: KITTI dataset, 3D-LiDAR SLAM 5 | ====================================== 6 | 7 | 8 | Usage 9 | -------- 10 | 11 | .. code-block:: bash 12 | 13 | export KITTI_SEQ=00 # Select KITTI odometry sequence: 00- 14 | export KITTI_BASE_DIR=$HOME/dataset-kitti/ # set to your local copy! 15 | 16 | cd mola/demos 17 | mola-cli kitti_lidar_slam.yml -p 18 | 19 | 20 | Configuration file, explained 21 | -------------------------------- 22 | 23 | .. literalinclude:: ../../demos/kitti_lidar_slam.yml 24 | :language: yaml 25 | :linenos: 26 | -------------------------------------------------------------------------------- /scripts/clang_git_format/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | *.pyc 10 | 11 | # Packages # 12 | ############ 13 | # it's better to unpack these files and commit the raw source 14 | # git has its own built in compression methods 15 | *.7z 16 | *.dmg 17 | *.gz 18 | *.iso 19 | *.jar 20 | *.rar 21 | *.tar 22 | *.zip 23 | 24 | # Logs and databases # 25 | ###################### 26 | *.log 27 | *.sql 28 | *.sqlite 29 | 30 | # OS generated files # 31 | ###################### 32 | .DS_Store 33 | .DS_Store? 34 | ._* 35 | .Spotlight-V100 36 | .Trashes 37 | ehthumbs.db 38 | Thumbs.db 39 | 40 | build/ 41 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/index.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | dofile(g_frameDir .. "/utils.lua") 14 | includeFile("index_main.rst.in") 15 | 16 | if CREF_DB then 17 | generateFile("crefdb.py", "crefdb.py.in") 18 | end 19 | } 20 | -------------------------------------------------------------------------------- /docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {% block footer %} 4 | {{ super() }} 5 | 7 | 12 | 15 | 20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /docs/source/concept-state-vector.rst: -------------------------------------------------------------------------------- 1 | .. _concept_state_vector: 2 | 3 | ============================================= 4 | SLAM state vector 5 | ============================================= 6 | 7 | SLAM approaches can be classified by many criteria. Refer, for example, 8 | to `cadena2016ppf`_ for a recent survey. 9 | 10 | Regarding the state space representation, we find two fundamental approaches: 11 | continuous-time SLAM (which was relatively recent), and the omnipresent 12 | discrete-time SLAM based on only mapping some selected *Keyframes* from 13 | the continuous stream of sensory data. 14 | 15 | 16 | .. image:: mola-slam-representations.png 17 | 18 | 19 | 20 | 21 | 22 | .. _cadena2016ppf: https://arxiv.org/pdf/1606.05830.pdf 23 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_events.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "details.rst.in", 18 | compound, 19 | compound.eventArray, 20 | getEventDeclString, 21 | "Events" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_defines.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "details.rst.in", 18 | compound, 19 | compound.defineArray, 20 | getDefineDeclString, 21 | "Macros" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_typedefs.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "details.rst.in", 18 | compound, 19 | compound.typedefArray, 20 | getTypedefDeclString, 21 | "Typedefs" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_events.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "overview_common.rst.in", 18 | compound, 19 | compound.eventArray, 20 | getEventDeclString, 21 | "events" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_properties.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "details.rst.in", 18 | compound, 19 | compound.propertyArray, 20 | getPropertyDeclString, 21 | "Properties" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_typedefs.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "overview_common.rst.in", 18 | compound, 19 | compound.typedefArray, 20 | getTypedefDeclString, 21 | "typedefs" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | # --- 5 | AlignAfterOpenBracket: AlwaysBreak # Values: Align, DontAlign, AlwaysBreak 6 | AlignConsecutiveAssignments: true 7 | AlignConsecutiveDeclarations: true 8 | AlignTrailingComments: false # Should be off, causes many dummy problems!! 9 | AllowShortBlocksOnASingleLine: false 10 | BreakBeforeBraces: Allman 11 | ColumnLimit: 100 12 | IndentCaseLabels: true 13 | IndentWidth: 2 14 | IndentWrappedFunctionNames: true 15 | MaxEmptyLinesToKeep: 1 16 | NamespaceIndentation: None 17 | DerivePointerAlignment: false 18 | ReflowComments: true 19 | SortIncludes: true 20 | SpaceBeforeAssignmentOperators: true 21 | Standard: Cpp11 22 | TabWidth: 2 23 | UseTab: Never # Available options are Never, Always, ForIndentation 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_defines.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "overview_common.rst.in", 18 | compound, 19 | compound.defineArray, 20 | getDefineDeclString, 21 | "macros", 22 | true 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_properties.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "overview_common.rst.in", 18 | compound, 19 | compound.propertyArray, 20 | getPropertyDeclString, 21 | "properties" 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /mola_input_lidar_bin_dataset/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package mola_input_lidar_bin_dataset 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 2.3.0 (2025-12-15) 6 | ------------------ 7 | 8 | 2.2.1 (2025-11-08) 9 | ------------------ 10 | 11 | 2.2.0 (2025-10-28) 12 | ------------------ 13 | 14 | 2.1.0 (2025-10-20) 15 | ------------------ 16 | 17 | 2.0.0 (2025-10-13) 18 | ------------------ 19 | * Merge pull request `#93 `_ from MOLAorg/feature/better-lio 20 | Changes for new LIO 21 | * Add new module to replay LiDAR datasets from a directory with .bin files 22 | * Contributors: Jose Luis Blanco-Claraco 23 | 24 | 1.9.1 (2025-07-07) 25 | ------------------ 26 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster==0.7.16 2 | Babel==2.14.0 3 | certifi==2024.7.4 4 | charset-normalizer==3.3.2 5 | docutils==0.20.1 6 | idna==3.7 7 | imagesize==1.4.1 8 | Jinja2==3.1.4 9 | latexcodec==3.0.0 10 | MarkupSafe==2.1.5 11 | packaging==24.0 12 | pybtex-docutils==1.0.3 13 | pybtex==0.24.0 14 | Pygments==2.17.2 15 | PyYAML==6.0.1 16 | requests==2.32.2 17 | six==1.16.0 18 | snowballstemmer==2.2.0 19 | sphinx_design==0.5.0 20 | sphinx-copybutton==0.5.2 21 | sphinx-rtd-theme==2.0.0 22 | Sphinx==7.2.6 23 | sphinxcontrib-applehelp==1.0.8 24 | sphinxcontrib-bibtex==2.6.2 25 | sphinxcontrib-devhelp==1.0.6 26 | sphinxcontrib-htmlhelp==2.0.5 27 | sphinxcontrib-jquery==4.1 28 | sphinxcontrib-jsmath==1.0.1 29 | sphinxcontrib-qthelp==1.0.7 30 | sphinxcontrib-serializinghtml==1.1.10 31 | urllib3==2.6.0 -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/crefdb_items.py.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local itemArray = argArray[1] 15 | local namePrefix = argArray[2] 16 | 17 | for i = 1, #itemArray do 18 | local item = itemArray[i] 19 | } 20 | '$namePrefix$(item.name)' : 'doxid-$(item.id)', 21 | %{ 22 | end -- for 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_functions.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | local sectionName = argArray[2] 16 | 17 | includeFile( 18 | "details.rst.in", 19 | compound, 20 | compound.functionArray, 21 | getFunctionDeclString, 22 | sectionName 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_functions.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | local sectionName = argArray[2] 16 | 17 | includeFile( 18 | "overview_common.rst.in", 19 | compound, 20 | compound.functionArray, 21 | getFunctionDeclString, 22 | sectionName 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/scope_namespace.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local namespace = argArray[1] 15 | local isOpen = argArray[2] 16 | 17 | if isOpen then 18 | } 19 | namespace $(namespace.name) { 20 | 21 | %{ 22 | else 23 | } 24 | 25 | } // namespace $(namespace.name) 26 | %{ 27 | end -- if 28 | } 29 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/crefdb_groups.py.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local groupArray = argArray[1] 15 | 16 | for i = 1, #groupArray do 17 | local group = groupArray[i] 18 | } 19 | '$(group.title)' : 'doxid-$(group.id)', 20 | %{ 21 | includeFile("crefdb_groups.py.in", group.groupArray) 22 | end -- for 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_aliases.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | // aliases 17 | 18 | %{ 19 | for i = 1, #compound.aliasArray do 20 | local item = compound.aliasArray[i] 21 | } 22 | alias $(getItemNameForOverview(item)) $(getLinkedTextString(item.initializer, true)); 23 | %{ 24 | end -- for 25 | } 26 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/example.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local example = argArray[1] 15 | 16 | if FORCE_INCLUDE_FILE then 17 | } 18 | .. include:: $FORCE_INCLUDE_FILE 19 | %{ 20 | end -- if 21 | } 22 | .. index:: pair: example; $(example.name) 23 | .. _doxid-$(example.id): 24 | 25 | $(getTitle(example.name, 1)) 26 | 27 | $(getItemDetailedDocumentation(example)) 28 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/group.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local group = argArray[1] 15 | 16 | if FORCE_INCLUDE_FILE then 17 | } 18 | .. include:: $FORCE_INCLUDE_FILE 19 | %{ 20 | end -- if 21 | } 22 | .. index:: pair: group; $(getGroupName(group)) 23 | .. _doxid-$(group.id): 24 | 25 | $(getTitle(group.title, 1)) 26 | 27 | %{ 28 | includeFile("compound.rst.in", group) 29 | } 30 | -------------------------------------------------------------------------------- /mola_metric_maps/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Unit tests: 2 | mola_add_test( 3 | TARGET test-mola_metric_maps_occgrid 4 | SOURCES test-occgrid.cpp 5 | LINK_LIBRARIES 6 | mola_metric_maps 7 | ) 8 | 9 | mola_add_test( 10 | TARGET test-mola_metric_maps_sparsevoxelpointcloud 11 | SOURCES test-sparsevoxelpointcloud.cpp 12 | LINK_LIBRARIES 13 | mola_metric_maps 14 | ) 15 | 16 | mola_add_test( 17 | TARGET test-mola_metric_maps_hashedvoxels 18 | SOURCES test-mola_metric_maps_hashedvoxels.cpp 19 | LINK_LIBRARIES 20 | mola_metric_maps 21 | ) 22 | 23 | mola_add_test( 24 | TARGET test-mola_metric_maps_ndt 25 | SOURCES test-mola_metric_maps_ndt.cpp 26 | LINK_LIBRARIES 27 | mola_metric_maps 28 | ) 29 | 30 | mola_add_test( 31 | TARGET test-mola_metric_maps_serialization 32 | SOURCES test-serialization.cpp 33 | LINK_LIBRARIES 34 | mola_metric_maps 35 | ) 36 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/global.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | if not g_cfamilyUtilsIncluded then 14 | dofile(g_frameDir .. "/utils.lua") 15 | end 16 | 17 | if FORCE_INCLUDE_FILE then 18 | } 19 | .. include:: $FORCE_INCLUDE_FILE 20 | %{ 21 | end -- if 22 | } 23 | .. _global: 24 | .. index:: pair: namespace; global 25 | 26 | $(getTitle(g_globalNamespace.title, 1)) 27 | 28 | %{ 29 | includeFile("compound.rst.in", g_globalNamespace) 30 | } 31 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/crefdb_items.py.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local itemArray = argArray[1] 15 | 16 | for i = 1, #itemArray do 17 | local item = itemArray[i] 18 | if not isUnnamedItem(item) then 19 | } 20 | '$(getItemQualifiedName(item))' : 'doxid-$(item.id)', 21 | %{ 22 | end 23 | 24 | if item.compoundKind then 25 | includeFile("crefdb_members.py.in", item) 26 | end 27 | end -- for 28 | } 29 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/Yaml.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file Yaml.h 15 | * @brief Tiny header to provide a shortcut in NS `mola::` to MRPT yaml class. 16 | * @author Jose Luis Blanco Claraco 17 | * @date Sep 19, 2021 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace mola 24 | { 25 | /** Convenient typedef to save typing in the MOLA project. */ 26 | using Yaml = mrpt::containers::yaml; 27 | 28 | }; // namespace mola 29 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/namespace.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local namespace = argArray[1] 15 | 16 | if FORCE_INCLUDE_FILE then 17 | } 18 | .. include:: $FORCE_INCLUDE_FILE 19 | %{ 20 | end -- if 21 | 22 | local name = getItemQualifiedName(namespace) 23 | } 24 | .. index:: pair: namespace; $name 25 | .. _doxid-$(namespace.id): 26 | 27 | $(getTitle("namespace " .. name, 1)) 28 | 29 | %{ 30 | includeFile("compound.rst.in", namespace) 31 | } 32 | -------------------------------------------------------------------------------- /mola_metric_maps/tests/test-occgrid.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file test-occgrid.cpp 15 | * @brief Test the OccGrid class 16 | * @author Jose Luis Blanco Claraco 17 | * @date Feb 21, 2021 18 | */ 19 | 20 | #include 21 | 22 | int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) 23 | { 24 | try 25 | { 26 | // xx(); 27 | } 28 | catch (std::exception& e) 29 | { 30 | std::cerr << e.what() << "\n"; 31 | return 1; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/footnotes.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | 17 | --------------------- 18 | 19 | .. rubric:: Footnotes 20 | 21 | %{ 22 | for i = 1, #compound.footnoteArray do 23 | local item = compound.footnoteArray[i] 24 | local text = getItemDetailedDocumentation(item) 25 | text = replaceCommonSpacePrefix(text, "\t") 26 | } 27 | .. [#$(item.name)] 28 | 29 | $text 30 | 31 | %{ 32 | end -- for 33 | } 34 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_namespaces.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | // namespaces 17 | 18 | %{ 19 | for i = 1, #compound.namespaceArray do 20 | local item = compound.namespaceArray[i] 21 | local targetFileName = getItemFileName(item) 22 | 23 | if compound.compoundKind ~= "group" then 24 | generateFile(targetFileName, "namespace.rst.in", item) 25 | end 26 | 27 | emit(getNamespaceTree(item)) 28 | end -- for 29 | } 30 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/pretty_print_exception.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file pretty_print_exception.h 15 | * @brief Helper function to print an exception with colors 16 | * @author Jose Luis Blanco Claraco 17 | * @date Aug 13, 2021 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace mola 25 | { 26 | void pretty_print_exception( 27 | const std::exception& e, const std::string& headerLine, const bool use_std_cerr = true); 28 | 29 | } // namespace mola 30 | -------------------------------------------------------------------------------- /mola_kernel/src/register.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file register.cpp 15 | * @brief RTTI & CSerializable registry 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jun 22, 2019 18 | */ 19 | 20 | #include 21 | 22 | // To be run at .so/.dll load: 23 | MRPT_INITIALIZER(do_register_mola_kernel) 24 | { 25 | // using namespace mola; 26 | 27 | // Register module: 28 | // MOLA_REGISTER_MODULE(WorldModel); 29 | 30 | // Register serializable classes: 31 | // mrpt::rtti::registerClass(CLASS_ID(mola::WorldModelData)); 32 | } 33 | -------------------------------------------------------------------------------- /docker/all_mola.repos: -------------------------------------------------------------------------------- 1 | repositories: 2 | mola: 3 | type: git 4 | url: https://github.com/MOLAorg/mola.git 5 | version: develop 6 | mola_common: 7 | type: git 8 | url: https://github.com/MOLAorg/mola_common.git 9 | version: develop 10 | mola_gnss_to_markers: 11 | type: git 12 | url: https://github.com/MOLAorg/mola_gnss_to_markers.git 13 | version: develop 14 | mola_imu_preintegration: 15 | type: git 16 | url: https://github.com/MOLAorg/mola_imu_preintegration.git 17 | version: develop 18 | mola_lidar_odometry: 19 | type: git 20 | url: https://github.com/MOLAorg/mola_lidar_odometry.git 21 | version: develop 22 | mola_sm_loop_closure: 23 | type: git 24 | url: https://github.com/MOLAorg/mola_sm_loop_closure.git 25 | version: develop 26 | mola_state_estimation: 27 | type: git 28 | url: https://github.com/MOLAorg/mola_state_estimation.git 29 | version: develop 30 | mp2p_icp: 31 | type: git 32 | url: https://github.com/MOLAorg/mp2p_icp.git 33 | version: develop 34 | -------------------------------------------------------------------------------- /mola_metric_maps/README.md: -------------------------------------------------------------------------------- 1 | # `mola_metric_maps` 2 | Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, 3 | for use in other MOLA odometry and SLAM modules. 4 | 5 | ## Contents 6 | This repository provides a pure C++ library `mola_metric_maps` that extends 7 | `mrpt-maps` with additional metric map classes: 8 | 9 | - `mola::OccGrid`: Extends MRPT's occupancy grid with super-resolution likelihood field. 10 | - `mola::SparseVoxelPointCloud`: a pointcloud stored in two dual hash'ed voxel maps, 11 | one for decimation purposes only, and another for nearest-neighbor search. 12 | 13 | ## Build and install 14 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 15 | 16 | ## License 17 | Copyright (C) 2018-2025 Jose Luis Blanco , University of Almeria 18 | 19 | This package is released under the GNU GPL v3 license as open source for research 20 | and evaluation purposes only. Commercial licenses available upon request, for this 21 | package alone or in combination with the complete SLAM system. 22 | -------------------------------------------------------------------------------- /mola_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mola_msgs 5 | 2.3.0 6 | ROS message, services, and actions used in other MOLA packages. 7 | 8 | Jose Luis Blanco-Claraco 9 | GPLv3 10 | 11 | https://github.com/MOLAorg/mola/tree/develop/mola_msgs 12 | 13 | 14 | ament_cmake 15 | 16 | rosidl_default_generators 17 | 18 | action_msgs 19 | mrpt_msgs 20 | nav_msgs 21 | 22 | rosidl_default_runtime 23 | 24 | rosidl_interface_packages 25 | 26 | 27 | ament_cmake 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/source/demo-rawlog-velodyne-slam.rst: -------------------------------------------------------------------------------- 1 | .. _demos_rawlog_velodyne_slam: 2 | 3 | ======================================================== 4 | Demo: Velodyne dataset in Rawlog format, 3D-LiDAR SLAM 5 | ======================================================== 6 | 7 | This demo shows how to launch a 3D LiDAR SLAM system reading Velodyne scans 8 | from an MRPT .rawlog file. 9 | 10 | To run this demo, download the example dataset: `sample_rawlog1`_ (part of `sample_dataset`_). 11 | 12 | .. image:: demo-rawlog-velodyne-slam.png 13 | 14 | Usage 15 | -------- 16 | 17 | .. code-block:: bash 18 | 19 | cd mola/demos 20 | MOLA_INPUT_RAWLOG=map1_test1.rawlog mola-cli rawlog_odom_and_lidar.yml -p 21 | 22 | 23 | .. _sample_rawlog1: https://ingmec.ual.es/datasets/lidar3d-pf-benchmark/map1_test1_cut.rawlog 24 | .. _sample_dataset: https://ingmec.ual.es/datasets/lidar3d-pf-benchmark/ 25 | 26 | 27 | Configuration file, explained 28 | -------------------------------- 29 | 30 | .. literalinclude:: ../../demos/rawlog_odom_and_lidar.yml 31 | :language: yaml 32 | :linenos: 33 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_construction.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile( 17 | "overview_common.rst.in", 18 | compound, 19 | compound.constructorArray, 20 | getVoidFunctionDeclString, 21 | "construction" 22 | ) 23 | 24 | if not EXCLUDE_DESTRUCTORS and compound.destructor then 25 | local item = compound.destructor 26 | local extraSep = "" 27 | if isPrevMl then 28 | extraSep = "\n" 29 | end 30 | } 31 | $extraSep $(getVoidFunctionDeclString(item, getItemNameTemplate(item), "\t")); 32 | %{ 33 | end -- if 34 | } 35 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/table.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- 3 | -- This file is part of the Doxyrest toolkit. 4 | -- 5 | -- Doxyrest is distributed under the MIT license. 6 | -- For details see accompanying license.txt file, 7 | -- the public copy of which is also available at: 8 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 9 | -- 10 | -------------------------------------------------------------------------------- 11 | 12 | function printTable(t) 13 | for key, value in pairs(t) do 14 | print(key, " -> ", value) 15 | end 16 | end 17 | 18 | function concatenateTables(t1, t2) 19 | local j = #t1 + 1 20 | for i = 1, #t2 do 21 | t1 [j] = t2 [i] 22 | j = j + 1 23 | end 24 | end 25 | 26 | function filterArray(a, filter) 27 | if next(a) == nil then 28 | return 29 | end 30 | 31 | for i = #a, 1, -1 do 32 | if not filter(a[i]) then 33 | table.remove(a, i) 34 | end 35 | end 36 | end 37 | 38 | -------------------------------------------------------------------------------- 39 | -------------------------------------------------------------------------------- /mola_yaml/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_yaml 8 | 2.3.0 9 | YAML helper library common to MOLA modules 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_yaml 15 | 16 | 17 | mola_common 18 | 19 | mrpt_libbase 20 | 21 | doxygen 22 | 23 | 24 | cmake 25 | 26 | cmake 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/variant_helper.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file variant_helper.h 15 | * @brief Helper types for std::variant 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jan 09, 2019 18 | */ 19 | #pragma once 20 | 21 | namespace mola 22 | { 23 | /** Based on https://en.cppreference.com/w/cpp/utility/variant/visit */ 24 | template 25 | struct overloaded : Ts... 26 | { 27 | using Ts::operator()...; 28 | }; 29 | 30 | /** Based on https://en.cppreference.com/w/cpp/utility/variant/visit */ 31 | template 32 | overloaded(Ts...) -> overloaded; 33 | 34 | } // namespace mola 35 | -------------------------------------------------------------------------------- /mola_input_rawlog/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_rawlog 8 | 2.3.0 9 | Offline RawDataSource from MRPT rawlog datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_rawlog 15 | 16 | 17 | mola_kernel 18 | 19 | mrpt_libobs 20 | 21 | doxygen 22 | 23 | 24 | cmake 25 | 26 | cmake 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/version.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file version.h 15 | * @brief Provides macros for checking MOLA version 16 | * @author Jose Luis Blanco Claraco 17 | * @date Aug 18, 2024 18 | */ 19 | #pragma once 20 | 21 | /// To be used in #if() checks for >= minimum MOLA versions 22 | #define MOLA_VERSION_CHECK(major, minor, patch) \ 23 | ((MOLA_MAJOR_VERSION > (major)) || \ 24 | (MOLA_MAJOR_VERSION == (major) && MOLA_MINOR_VERSION > (minor)) || \ 25 | (MOLA_MAJOR_VERSION == (major) && MOLA_MINOR_VERSION == (minor) && \ 26 | MOLA_PATCH_VERSION >= (patch))) 27 | -------------------------------------------------------------------------------- /mola_viz/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_viz 8 | 2.3.0 9 | GUI for MOLA 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_viz 15 | 16 | 17 | mola_kernel 18 | 19 | mrpt_libmaps 20 | mrpt_libgui 21 | mrpt_libopengl 22 | 23 | doxygen 24 | 25 | 26 | cmake 27 | 28 | cmake 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /mola_pose_list/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_pose_list 8 | 2.3.0 9 | C++ library for searchable pose lists 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_pose_list 15 | 16 | 17 | mola_common 18 | 19 | mrpt_libmaps 20 | mrpt_libposes 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/source/concept-simulation-real-time.rst: -------------------------------------------------------------------------------- 1 | .. _concept_simulation_real_time: 2 | 3 | ============================================= 4 | Simulation vs. real time 5 | ============================================= 6 | 7 | Goal 8 | ------ 9 | 10 | MOLA modules should be agnostic to whether sensory inputs come from live sensors 11 | or offline datasets, including potential actions like pause/resume and changing 12 | the playback rate. 13 | 14 | This enables easy debugging of sensor front-end modules and SLAM back-ends, as 15 | well as unit testing of complex SLAM algorithms on slow machines, e.g. in build farms. 16 | 17 | 18 | Rules to follow 19 | ----------------- 20 | 21 | - **Never** use the system clock for anything related to SLAM, determining key-frame selection, etc. 22 | 23 | - **Only** rely on the timestamp associated to input observation objects. In 24 | particular, since any input sensory piece of data should be represented as a 25 | class derived from `mrpt::obs::CObservation`, use its field 26 | `mrpt::obs::CObservation::timestamp` as the actual time at which the data was 27 | grabbed by the robot. 28 | -------------------------------------------------------------------------------- /mola_input_video/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_video 8 | 2.3.0 9 | RawDataSource from live or offline video sources 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_video 15 | 16 | mola_kernel 17 | 18 | mrpt_libobs 19 | mrpt_libhwdrivers 20 | 21 | doxygen 22 | 23 | 24 | cmake 25 | 26 | cmake 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /mola_traj_tools/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_traj_tools 8 | 2.3.0 9 | CLI tools to manipulate trajectory files as a complement to the evo package 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_traj_tools 15 | 16 | 17 | mola_common 18 | 19 | mrpt_libposes 20 | 21 | doxygen 22 | 23 | 24 | cmake 25 | 26 | cmake 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/class.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local class = argArray[1] 15 | 16 | local templatePrefix = "" 17 | if #class.templateParamArray > 0 or #class.templateSpecParamArray > 0 then 18 | templatePrefix = "template " 19 | end 20 | 21 | local titleName = getItemQualifiedName(class) 22 | 23 | if FORCE_INCLUDE_FILE then 24 | } 25 | .. include:: $FORCE_INCLUDE_FILE 26 | %{ 27 | end -- if 28 | } 29 | .. index:: pair: $(class.compoundKind); $titleName 30 | .. _doxid-$(class.id): 31 | 32 | $(getTitle(templatePrefix .. class.compoundKind .. " " .. titleName, 1)) 33 | 34 | %{ 35 | includeFile("compound.rst.in", class) 36 | } 37 | -------------------------------------------------------------------------------- /mola_input_video/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | cmake_minimum_required(VERSION 3.5) 11 | 12 | # Tell CMake we'll use C++ for use in its tests/flags 13 | project(mola_input_video LANGUAGES CXX) 14 | 15 | find_package(mola_common REQUIRED) 16 | find_package(mrpt-hwdrivers REQUIRED) 17 | find_package(mrpt-obs REQUIRED) 18 | 19 | find_mola_package(mola_kernel) 20 | 21 | set(LIB_SRCS 22 | src/VideoDataset.cpp 23 | ) 24 | 25 | set(LIB_PUBLIC_HDRS 26 | include/mola_input_video/VideoDataset.h 27 | ) 28 | 29 | mola_add_library( 30 | TARGET ${PROJECT_NAME} 31 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 32 | PRIVATE_LINK_LIBRARIES 33 | mola::mola_kernel 34 | mrpt::hwdrivers 35 | mrpt::obs 36 | ) 37 | -------------------------------------------------------------------------------- /mola_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(mola_msgs) 4 | 5 | # Default to C++17 6 | if(NOT CMAKE_CXX_STANDARD) 7 | set(CMAKE_CXX_STANDARD 17) 8 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 9 | endif() 10 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") 11 | add_compile_options(-Wall -Wextra -Wpedantic) 12 | endif() 13 | 14 | # Find for these packages, and skip the package if we are not using ROS 2: 15 | find_package(ament_cmake QUIET) 16 | if(NOT ament_cmake_FOUND) 17 | message(STATUS "Skipping mola_msgs: ament_cmake not found, it seems we are not using ROS 2.") 18 | return() 19 | endif() 20 | 21 | find_package(rosidl_default_generators REQUIRED) 22 | find_package(geometry_msgs REQUIRED) 23 | 24 | rosidl_generate_interfaces(${PROJECT_NAME} 25 | "srv/MapLoad.srv" 26 | "srv/MapSave.srv" 27 | "srv/MolaRuntimeParamGet.srv" 28 | "srv/MolaRuntimeParamSet.srv" 29 | "srv/RelocalizeFromStateEstimator.srv" 30 | "srv/RelocalizeNearPose.srv" 31 | DEPENDENCIES 32 | std_msgs 33 | geometry_msgs 34 | ) 35 | 36 | ament_export_dependencies(rosidl_default_runtime) 37 | ament_package() 38 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/lidar_bin_directory_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # 4 | # This file just replays (no SLAM) the raw data of a directory with .bin LiDAR 5 | # files, stored in the "KITTI" binary format. 6 | # ----------------------------------------------------------------------------- 7 | 8 | modules: 9 | # ===================== 10 | # BinFileDataset 11 | # ===================== 12 | - type: mola::BinFileDataset 13 | name: dataset_input 14 | execution_rate: 20 # Hz 15 | #export_to_rawlog: lidar.rawlog 16 | #verbosity_level: INFO 17 | gui_preview_sensors: 18 | - raw_sensor_label: lidar 19 | decimation: 1 20 | win_pos: 5 70 400 400 21 | params: 22 | bin_dir: ${LIDAR_BIN_DIR} 23 | rate_hz: ${LIDAR_BIN_RATE_HZ|10.0} 24 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 25 | 26 | # ===================== 27 | # MolaViz 28 | # ===================== 29 | - name: viz 30 | type: mola::MolaViz 31 | #verbosity_level: DEBUG 32 | params: ~ # none 33 | -------------------------------------------------------------------------------- /mola_input_kitti360_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_kitti360_dataset 8 | 2.3.0 9 | Offline RawDataSource from Kitti-360 datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_kitti360_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libmaps 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /mola_input_kitti_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_kitti_dataset 8 | 2.3.0 9 | Offline RawDataSource from Kitti odometry/SLAM datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_kitti_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libmaps 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/crefdb_enums.py.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local itemArray = argArray[1] 15 | 16 | for i = 1, #itemArray do 17 | local item = itemArray[i] 18 | if not isUnnamedItem(item) then 19 | } 20 | '$(getItemQualifiedName(item))' : 'doxid-$(item.id)', 21 | %{ 22 | end 23 | 24 | for j = 1, #item.enumValueArray do 25 | local enumValue = item.enumValueArray[j] 26 | local enumValueName = getItemQualifiedName(enumValue) 27 | 28 | -- remove parent enum name (C++ only) 29 | enumValueName = string.gsub(enumValueName, "([%w_]+)::([%w_]+)$", "%2") 30 | } 31 | '$enumValueName' : 'doxid-$(enumValue.id)', 32 | %{ 33 | end -- for 34 | end -- for 35 | } 36 | -------------------------------------------------------------------------------- /.github/workflows/check-clang-format.yml: -------------------------------------------------------------------------------- 1 | name: CI clang-format 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | name: ${{ matrix.name }} 8 | runs-on: ${{ matrix.os }} 9 | 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | # Github Actions requires a single row to be added to the build matrix. 14 | # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. 15 | name: [ 16 | clang-format-check 17 | ] 18 | 19 | include: 20 | - name: clang-format-check 21 | os: ubuntu-latest 22 | 23 | steps: 24 | - name: Checkout 25 | uses: actions/checkout@master 26 | 27 | - name: Git submodule 28 | run: | 29 | git submodule sync 30 | git submodule update --init --recursive 31 | 32 | - name: Install Dependencies 33 | run: | 34 | sudo apt install clang-format-14 -yq 35 | pip3 install --user -r .github/python_clang_format_reqs.txt 36 | 37 | - name: Check code style 38 | run: | 39 | echo "TASK=lint_all" >> $GITHUB_ENV 40 | bash .github/check_style.sh 41 | -------------------------------------------------------------------------------- /docs/source/changelog.rst: -------------------------------------------------------------------------------- 1 | .. _changelog: 2 | 3 | ====================== 4 | Changelog 5 | ====================== 6 | 7 | This page aggregates the changelogs from the most relevant MOLA repositories: 8 | 9 | .. tab-set:: 10 | 11 | .. tab-item:: mola_bridge_ros2 12 | 13 | .. include:: _generated_changelogs/mola_bridge_ros2.rst 14 | 15 | .. tab-item:: mola_kernel 16 | :selected: 17 | 18 | .. include:: _generated_changelogs/mola_kernel.rst 19 | 20 | .. tab-item:: mola_lidar_odometry 21 | 22 | .. include:: _generated_changelogs/mola_lidar_odometry.rst 23 | 24 | .. tab-item:: mola_metric_maps 25 | 26 | .. include:: _generated_changelogs/mola_metric_maps.rst 27 | 28 | .. tab-item:: mola_state_estimation_simple 29 | 30 | .. include:: _generated_changelogs/mola_state_estimation_simple.rst 31 | 32 | .. tab-item:: mola_state_estimation_smoother 33 | 34 | .. include:: _generated_changelogs/mola_state_estimation_smoother.rst 35 | 36 | .. tab-item:: mola_viz 37 | 38 | .. include:: _generated_changelogs/mola_viz.rst 39 | 40 | .. tab-item:: mp2p_icp 41 | 42 | .. include:: _generated_changelogs/mp2p_icp.rst 43 | -------------------------------------------------------------------------------- /mola_launcher/apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | find_package(mrpt-core) 11 | find_package(mrpt-tclap) # tclap wrapper, useful for Windows, etc. 12 | find_package(mrpt-containers) 13 | 14 | mola_add_executable( 15 | TARGET mola-cli 16 | SOURCES mola-cli.cpp 17 | LINK_LIBRARIES 18 | mola::mola_launcher 19 | mola::mola_kernel 20 | mrpt::core 21 | mrpt::tclap 22 | ) 23 | 24 | mola_add_executable( 25 | TARGET mola-dir 26 | SOURCES mola-dir.cpp 27 | LINK_LIBRARIES 28 | mola::mola_launcher 29 | mola::mola_kernel 30 | ) 31 | 32 | mola_add_executable( 33 | TARGET mola-yaml-parser 34 | SOURCES mola-yaml-parser.cpp 35 | LINK_LIBRARIES 36 | mola::mola_kernel 37 | mrpt::tclap 38 | mrpt::containers 39 | ) 40 | -------------------------------------------------------------------------------- /mola_input_mulran_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_mulran_dataset 8 | 2.3.0 9 | Offline RawDataSource from MulRan datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_mulran_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libmaps 21 | mrpt_libposes 22 | 23 | doxygen 24 | 25 | 26 | cmake 27 | 28 | cmake 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /mola_input_paris_luco_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_paris_luco_dataset 8 | 2.3.0 9 | Offline RawDataSource from Paris LUCO (CT-ICP) odometry/SLAM datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_paris_luco_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libmaps 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_construction.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | Construction 17 | ------------ 18 | 19 | %{ 20 | includeFile( 21 | "details.rst.in", 22 | compound, 23 | compound.constructorArray, 24 | getVoidFunctionDeclString 25 | ) 26 | 27 | if not EXCLUDE_DESTRUCTORS and compound.destructor and compound.destructor.hasDocumentation then 28 | item = compound.destructor 29 | } 30 | .. _doxid-$(item.id): 31 | .. ref-code-block:: $LANGUAGE 32 | :class: doxyrest-title-code-block 33 | 34 | $(getVoidFunctionDeclString(item, g_simpleItemNameTemplate, "\t")) 35 | 36 | $(getItemDetailedDocumentation(item)) 37 | 38 | %{ 39 | end -- if 40 | } 41 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/paris_luco_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # 4 | # This file just plays (no SLAM) the raw data of the Paris Luco dataset (CT-ICP) paper 5 | # -------------------------------------------------------------------------------------- 6 | 7 | modules: 8 | # ===================== 9 | # ParisLucoDataset 10 | # ===================== 11 | - type: mola::ParisLucoDataset 12 | name: dataset_input 13 | execution_rate: 20 # Hz 14 | #export_to_rawlog: paris_luco.rawlog 15 | #verbosity_level: INFO 16 | gui_preview_sensors: 17 | - raw_sensor_label: lidar 18 | decimation: 1 19 | win_pos: 5 70 400 400 20 | params: 21 | base_dir: ${PARIS_LUCO_BASE_DIR} 22 | sequence: '00' # There is only one sequence in this dataset 23 | time_warp_scale: 1.0 24 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 25 | 26 | # ===================== 27 | # MolaViz 28 | # ===================== 29 | - name: viz 30 | type: mola::MolaViz 31 | #verbosity_level: DEBUG 32 | params: ~ # none 33 | -------------------------------------------------------------------------------- /mola_input_euroc_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_euroc_dataset 8 | 2.3.0 9 | Offline RawDataSource from EUROC SLAM datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_euroc_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libobs 21 | mrpt_libmath 22 | 23 | doxygen 24 | 25 | 26 | cmake 27 | 28 | cmake 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /kitti_metrics_eval/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | kitti_metrics_eval 8 | 2.3.0 9 | CLI tool to evaluate the KITTI odometry bechmark metrics to trajectory files 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/kitti_metrics_eval 15 | 16 | 17 | mola_common 18 | mrpt_libmath 19 | mrpt_libposes 20 | mrpt_libtclap 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/source/demo-pose-graph-g2o-file.rst: -------------------------------------------------------------------------------- 1 | ========================================================= 2 | Demo: Graph SLAM from a dataset in g2o plain text format 3 | ========================================================= 4 | 5 | This demo shows how to launch a 2D or 3D Graph SLAM (pose graph) system 6 | reading pose-to-pose constraints from a `.g2o` text file, which are processed 7 | sequentially. 8 | By manipulating the execution rate of the G2O publisher (`mola::G2ODataset`) 9 | and that of the SLAM back-end (`mola::ASLAM_gtsam`) we can move between processing edges one by one, 10 | up to optimize the entire dataset at once. 11 | 12 | Note that the SLAM solver can be also switched between sequential (iSAM2) and 13 | batch (Levenberg-Marquardt); this is independent of how fast new edges are 14 | appended to the SLAM problem. 15 | 16 | .. image:: demo-pose-graph-g2o-file.png 17 | 18 | Usage 19 | -------- 20 | 21 | .. code-block:: bash 22 | 23 | cd mola/demos 24 | mola-cli pose_graph_g2o_file.yml 25 | 26 | 27 | 28 | 29 | Configuration file, commented 30 | -------------------------------- 31 | 32 | .. literalinclude:: ../../demos/pose_graph_g2o_file.yml 33 | :language: yaml 34 | :linenos: 35 | -------------------------------------------------------------------------------- /mola_input_lidar_bin_dataset/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_lidar_bin_dataset 8 | 2.3.0 9 | Offline RawDataSource from LiDAR datasets stored as `.bin` files in the Kitti binary format 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_lidar_bin_dataset 15 | 16 | 17 | mola_common 18 | mola_kernel 19 | 20 | mrpt_libmaps 21 | 22 | doxygen 23 | 24 | 25 | cmake 26 | 27 | cmake 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /mola_kernel/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_kernel 8 | 2.3.0 9 | Fundamental C++ virtual interfaces and data types for the rest of MOLA modules 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_kernel 15 | 16 | 17 | mola_common 18 | mola_yaml 19 | 20 | mrpt_libobs 21 | mrpt_libmaps 22 | mrpt_libgui 23 | 24 | doxygen 25 | 26 | 27 | cmake 28 | 29 | cmake 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /mola_traj_tools/src/traj_tum2ypr.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | int main(int argc, char** argv) 19 | { 20 | try 21 | { 22 | if (argc != 3) 23 | { 24 | std::cerr << "Usage: " << argv[0] << " INPUT.tum OUTPUT.ypr" << std::endl; 25 | return 1; 26 | } 27 | 28 | const std::string sIn = argv[1]; 29 | const std::string sOut = argv[2]; 30 | 31 | mrpt::poses::CPose3DInterpolator p; 32 | p.loadFromTextFile_TUM(sIn); 33 | p.saveToTextFile(sOut); 34 | 35 | return 0; 36 | } 37 | catch (const std::exception& e) 38 | { 39 | std::cerr << "Exception: " << e.what() << std::endl; 40 | return 1; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /mola_traj_tools/src/traj_ypr2tum.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | int main(int argc, char** argv) 19 | { 20 | try 21 | { 22 | if (argc != 3) 23 | { 24 | std::cerr << "Usage: " << argv[0] << " INPUT.ypr OUTPUT.tum" << std::endl; 25 | return 1; 26 | } 27 | 28 | const std::string sIn = argv[1]; 29 | const std::string sOut = argv[2]; 30 | 31 | mrpt::poses::CPose3DInterpolator p; 32 | p.loadFromTextFile(sIn); 33 | p.saveToTextFile_TUM(sOut); 34 | 35 | return 0; 36 | } 37 | catch (const std::exception& e) 38 | { 39 | std::cerr << "Exception: " << e.what() << std::endl; 40 | return 1; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /mola_input_video/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package mola_input_video 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 2.3.0 (2025-12-15) 6 | ------------------ 7 | 8 | 2.2.1 (2025-11-08) 9 | ------------------ 10 | 11 | 2.2.0 (2025-10-28) 12 | ------------------ 13 | 14 | 2.1.0 (2025-10-20) 15 | ------------------ 16 | 17 | 2.0.0 (2025-10-13) 18 | ------------------ 19 | * Modernize copyright notice 20 | * Contributors: Jose Luis Blanco-Claraco 21 | 22 | 1.9.1 (2025-07-07) 23 | ------------------ 24 | 25 | 1.9.0 (2025-06-06) 26 | ------------------ 27 | 28 | 1.8.1 (2025-05-28) 29 | ------------------ 30 | 31 | 1.8.0 (2025-05-25) 32 | ------------------ 33 | * Update copyright year 34 | * Contributors: Jose Luis Blanco-Claraco 35 | 36 | 1.7.0 (2025-05-06) 37 | ------------------ 38 | * Implement live camera mode too 39 | * video input from video files also implemented now 40 | * Merge pull request `#85 `_ from MOLAorg/feat/video-input-module 41 | Feature: new video input MOLA module 42 | * Feature: new video input MOLA module. For now, implements "image directory" input. 43 | * Contributors: Jose Luis Blanco-Claraco 44 | 45 | 1.6.4 (2025-04-23) 46 | ------------------ 47 | -------------------------------------------------------------------------------- /docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | ros2-jazzy-mola: 3 | build: 4 | context: . 5 | args: 6 | - USER_UID=${UID:-1000} 7 | - USER_GID=${GID:-1000} 8 | image: ros2-jazzy-custom 9 | container_name: mola_container 10 | network_mode: "host" 11 | stdin_open: true 12 | tty: true 13 | command: bash # This ensures the entrypoint executes 'bash' at the end 14 | environment: 15 | - DISPLAY=${DISPLAY} 16 | # this needs "sudo apt install nvidia-container-toolkit" in the host!! 17 | - NVIDIA_VISIBLE_DEVICES=all 18 | - NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility,display 19 | - QT_X11_NO_MITSHM=1 20 | - ROS_DOMAIN_ID=0 21 | # Optional: specify the DDS middleware if needed 22 | #- RMW_IMPLEMENTATION=rmw_fastrtps_cpp 23 | volumes: 24 | - /tmp/.X11-unix:/tmp/.X11-unix:rw 25 | 26 | # Map your local MCAP folder to /data inside the container 27 | - ${MOLA_DATASETS:-/tmp}:${MOLA_DATASETS_CONTAINER:-/tmp4}:rw 28 | 29 | # --- GPU Resource Reservation (Modern Compose V2 Syntax) --- 30 | deploy: 31 | resources: 32 | reservations: 33 | devices: 34 | - driver: nvidia 35 | count: all 36 | capabilities: [gpu] 37 | -------------------------------------------------------------------------------- /mola_input_rawlog/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_rawlog LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | # find dependencies: 19 | find_package(mrpt-obs REQUIRED) 20 | 21 | find_mola_package(mola_kernel) 22 | 23 | # ----------------------- 24 | # define lib: 25 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 26 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 27 | 28 | mola_add_library( 29 | TARGET ${PROJECT_NAME} 30 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 31 | PRIVATE_LINK_LIBRARIES 32 | mola::mola_kernel 33 | mrpt::obs 34 | CMAKE_DEPENDENCIES 35 | mola_kernel 36 | mrpt-obs 37 | ) 38 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/rawlog_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # This file defines: 4 | # an input of type MRPT .rawlog file. No SLAM, just shows the raw data. 5 | # ----------------------------------------------------------------------------- 6 | 7 | modules: 8 | # Offline or online sensory data sources ===================== 9 | # ===================== 10 | # RawlogDataset 11 | # ===================== 12 | - name: dataset_input 13 | type: mola::RawlogDataset 14 | execution_rate: 150 # Hz 15 | #verbosity_level: INFO 16 | gui_preview_sensors: 17 | - raw_sensor_label: lidar 18 | decimation: 1 19 | win_pos: 5 40 600 200 # [x,y,width,height] 20 | params: 21 | rawlog_filename: ${MOLA_INPUT_RAWLOG} 22 | time_warp_scale: ${MOLA_TIME_WARP|1.0} 23 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 24 | # Set to true to enable the offlinedataset API, UI fast-forwarding, etc. 25 | read_all_first: ${MOLA_RAWLOG_READ_ALL|false} 26 | # ===================== 27 | # MolaViz 28 | # ===================== 29 | - name: viz 30 | type: mola::MolaViz 31 | #verbosity_level: DEBUG 32 | params: ~ # none 33 | -------------------------------------------------------------------------------- /mola_launcher/src/MolaDLL_Loader.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file MolaDLL_Loader.h 15 | * @brief Manager of dynamically loaded modules (.dll/.so) 16 | * @author Jose Luis Blanco Claraco 17 | * @date Nov 29, 2018 18 | */ 19 | 20 | #pragma once 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | 27 | /** Used in internal_load_lib_modules() */ 28 | struct LoadedModules 29 | { 30 | std::string lib_path; 31 | void* handle{nullptr}; 32 | }; 33 | 34 | /** Loads all libs under lib_search_paths_. \sa setup() */ 35 | void internal_load_lib_modules( 36 | mrpt::system::COutputLogger& app, const std::vector& lib_search_paths); 37 | 38 | /** Returns the current list of loaded module dyanmic libraries. */ 39 | const std::map& get_loaded_modules(); 40 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/id.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file id.h 15 | * @brief Defines world entities ID types and values. 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jan 08, 2019 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace mola 25 | { 26 | /** Unique ID for each Entity in a WorldModel. \ingroup mola_kernel_grp */ 27 | using id_t = std::uint64_t; 28 | 29 | /** Unique ID for each Factor in a WorldModel. \ingroup mola_kernel_grp */ 30 | using fid_t = std::uint64_t; 31 | 32 | /** A numeric value for invalid IDs. \ingroup mola_kernel_grp */ 33 | constexpr id_t INVALID_ID = std::numeric_limits::max(); 34 | 35 | /** A numeric value for invalid IDs. \ingroup mola_kernel_grp */ 36 | constexpr fid_t INVALID_FID = std::numeric_limits::max(); 37 | 38 | } // namespace mola 39 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_common.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | local itemArray = argArray[2] 16 | local getDeclString = argArray[3] 17 | local sectionName = argArray[4] 18 | local omitSemicolon = argArray[5] 19 | 20 | local semicolon = ";" 21 | 22 | if omitSemicolon then 23 | semicolon = "" 24 | end 25 | } 26 | // $sectionName 27 | 28 | %{ 29 | local isPrevMl = false 30 | 31 | for i = 1, #itemArray do 32 | local item = itemArray[i] 33 | local linkage 34 | local decl = getDeclString(item, getItemNameTemplate(item), "\t") 35 | local isMl = string.find(decl, "\n") 36 | local extraSep = "" 37 | 38 | if i > 1 and isMl or isPrevMl then 39 | extraSep = "\n" 40 | end 41 | 42 | isPrevMl = isMl 43 | } 44 | $extraSep $decl$semicolon 45 | %{ 46 | end -- for 47 | } 48 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/overview_classes.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | local itemArray = argArray[2] 16 | local sectionName = argArray[3] 17 | } 18 | // $sectionName 19 | 20 | %{ 21 | local isPrevMl = false 22 | 23 | for i = 1, #itemArray do 24 | local item = itemArray[i] 25 | local targetFileName = getItemFileName(item) 26 | 27 | if compound.compoundKind ~= "group" and not compound.isBaseCompound then 28 | generateFile(targetFileName, "class.rst.in", item) 29 | end 30 | 31 | local decl = getClassDeclString(item, g_refItemNameTemplate, "\t") 32 | local isMl = string.find(decl, "\n") 33 | local extraSep = "" 34 | 35 | if i > 1 and isMl or isPrevMl then 36 | extraSep = "\n" 37 | end 38 | 39 | isPrevMl = isMl 40 | } 41 | $extraSep $decl; 42 | %{ 43 | end -- for 44 | } 45 | -------------------------------------------------------------------------------- /docs/source/modules.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | Core MOLA modules 3 | =================== 4 | 5 | MOLA modular design means that SLAM or localization problems must be 6 | split into their smallest possible reusable pieces. 7 | We call these *core MOLA modules* and they are kept as colcon packages 8 | in the `MOLAorg/mola `_ repository. 9 | 10 | Actual SLAM solutions, which make use of these core modules, 11 | are listed in the :ref:`solutions ` page. 12 | 13 | Recall that each module has its own License, please refer to its 14 | source code or the `` tag of its `package.xml` file. 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | module_mola_bridge_ros2 20 | module_mola_demos 21 | module_mola_imu_preintegration 22 | module_mola_input_euroc_dataset 23 | module_mola_input_kitti360_dataset 24 | module_mola_input_kitti_dataset 25 | module_mola_input_mulran_dataset 26 | module_mola_input_paris_luco_dataset 27 | module_mola_input_rawlog 28 | module_mola_input_rosbag2 29 | module_mola_kernel 30 | module_mola_launcher 31 | module_mola_metric_maps 32 | module_mola_navstate_fg 33 | module_mola_navstate_fuse 34 | module_mola_pose_list 35 | module_mola_relocalization 36 | module_mola_traj_tools 37 | module_mola_viz 38 | module_mola_yaml 39 | -------------------------------------------------------------------------------- /mola_yaml/include/mola_yaml/macro_helpers.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file macro_helpers.h 15 | * @brief C preprocessor helpers 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jan 11, 2019 18 | */ 19 | #pragma once 20 | 21 | // The following is taken from a great answer here: 22 | // https://stackoverflow.com/a/26408195/1631514 23 | 24 | // get number of arguments with MOLA_NARG 25 | #define MOLA_NARG(...) MOLA_NARG_I_(__VA_ARGS__, MOLA_RSEQ_N()) 26 | #define MOLA_NARG_I_(...) MOLA_ARG_N(__VA_ARGS__) 27 | #define MOLA_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N 28 | #define MOLA_RSEQ_N() 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 29 | 30 | // general definition for any function name 31 | #define MOLA_VFUNC_(name, n) name##n 32 | #define MOLA_VFUNC(name, n) MOLA_VFUNC_(name, n) 33 | #define VFUNC(func, ...) MOLA_VFUNC(func, MOLA_NARG(__VA_ARGS__))(__VA_ARGS__) 34 | -------------------------------------------------------------------------------- /mola_input_rosbag2/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_input_rosbag2 8 | 2.3.0 9 | Offline RawDataSource from rosbag2 datasets 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_input_rosbag2 15 | 16 | cv_bridge 17 | mola_kernel 18 | mrpt_libobs 19 | mrpt_libros_bridge 20 | rosbag2_cpp 21 | sensor_msgs 22 | tf2_geometry_msgs 23 | tf2_msgs 24 | tf2_ros 25 | 26 | doxygen 27 | 28 | 29 | cmake 30 | 31 | cmake 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/source/concept-mola-architecture.rst: -------------------------------------------------------------------------------- 1 | .. _concept_mola_arquitecture: 2 | 3 | ============================================= 4 | Overview of the MOLA arquitecture 5 | ============================================= 6 | 7 | An overview of the MOLA architecture is given in the next figure: 8 | 9 | .. image:: imgs/mola-architecture.png 10 | 11 | 12 | Firstly, we define the MOLA system as a set of **modules**, each module being 13 | the instantiation of a particular C++ class 14 | (implementing the `ExecutableBase` interface). 15 | Based on the differentiated role of each module 16 | in the SLAM system, a number of prototypical virtual base 17 | classes are provided for users to define their own modules of 18 | each type, ensuring the existence of a common API as the key 19 | for compatibility, easy reusability and interchangeability. The 20 | system loader is in charge of interpreting a SLAM-problem 21 | configuration file, loading the required libraries, finding and 22 | creating the required modules and launching their life cycle 23 | routine. It also allows running modules to find each other (either by name or by service type) for peer-to-peer connections 24 | to be established and allow the information and signals to flow 25 | forth and back throughout the system. 26 | 27 | 28 | (Expand me!) 29 | 30 | TODO: Add ExecutableBase life cycle figures. 31 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_aliases.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | Aliases 17 | ------- 18 | 19 | %{ 20 | for i = 1, #compound.aliasArray do 21 | local item = compound.aliasArray[i] 22 | if isItemInCompoundDetails(item, compound) then 23 | } 24 | $(getItemRefTargetString(item)) 25 | .. ref-code-block:: $LANGUAGE 26 | :class: doxyrest-title-code-block 27 | 28 | alias $(getItemName(item)) $(getLinkedTextString(item.initializer, true)) 29 | %{ 30 | if item.isSubGroupHead then 31 | for j = 1, #item.subGroupSlaveArray do 32 | slaveItem = item.subGroupSlaveArray[j] 33 | } 34 | alias $(getItemName(slaveItem)) $(getLinkedTextString(slaveItem.initializer, true)) 35 | %{ 36 | end -- for 37 | end -- if 38 | } 39 | 40 | $(getItemDetailedDocumentation(item)) 41 | 42 | %{ 43 | end -- if 44 | end -- for 45 | } 46 | -------------------------------------------------------------------------------- /scripts/clang_git_format/clang_git_format/custom_exceptions.py: -------------------------------------------------------------------------------- 1 | # Copied from python 2.7 version of subprocess.py 2 | # Exception classes used by this module. 3 | 4 | 5 | class CalledProcessError(Exception): 6 | """This exception is raised when a process run by check_call() or 7 | check_output() returns a non-zero exit status. The exit status will be 8 | stored in the returncode attribute; check_output() will also store the 9 | output in the output attribute. 10 | 11 | """ 12 | 13 | def __init__(self, returncode, cmd, output=None): 14 | self.returncode = returncode 15 | self.cmd = cmd 16 | self.output = output 17 | 18 | def __str__(self): 19 | return ("Command '%s' returned non-zero exit status %d with output %s" 20 | % (self.cmd, self.returncode, self.output)) 21 | 22 | 23 | class CustomError(BaseException): 24 | """Class for implementing custom exceptions""" 25 | pass 26 | 27 | 28 | class CommitIDTooShort(CustomError): 29 | def __init__(self, commit_id, min_len): 30 | self.commit_id = commit_id 31 | self.min_len = min_len 32 | 33 | 34 | def __str__(self): 35 | return ("At least %d characters of the commit ID " 36 | "hash should be provided. Current commit ID: %s" 37 | % (self.min_len, self.commit_id)) 38 | 39 | -------------------------------------------------------------------------------- /mola_relocalization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_relocalization 8 | 2.3.0 9 | C++ library with algorithms for relocalization, global localization, or pose estimation given a large initial uncertainty 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_relocalization 15 | 16 | 17 | mola_common 18 | mp2p_icp 19 | mola_pose_list 20 | 21 | mrpt_libobs 22 | mrpt_libslam 23 | mrpt_libmaps 24 | 25 | mola_test_datasets 26 | 27 | doxygen 28 | 29 | 30 | cmake 31 | 32 | cmake 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /mola_input_kitti_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_kitti_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-math) # for MRPT Eigen utilities 21 | find_package(mrpt-maps) 22 | 23 | find_mola_package(mola_kernel) 24 | 25 | # ----------------------- 26 | # define lib: 27 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 28 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 29 | 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 33 | PUBLIC_LINK_LIBRARIES 34 | mola::mola_kernel 35 | PRIVATE_LINK_LIBRARIES 36 | mrpt::maps 37 | mrpt::math 38 | CMAKE_DEPENDENCIES 39 | mola_kernel 40 | ) 41 | -------------------------------------------------------------------------------- /mola_demos/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_demos 8 | 2.3.0 9 | Demo and example launch files for MOLA 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/ 15 | 16 | 17 | 18 | 19 | doxygen 20 | 21 | ros_environment 22 | 23 | cmake 24 | ament_cmake_gtest 25 | ament_cmake 26 | 27 | ament_lint_auto 28 | ament_cmake_lint_cmake 29 | ament_cmake_pep257 30 | ament_cmake_uncrustify 31 | ament_cmake_xmllint 32 | 33 | 34 | ament_cmake 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /mola_input_euroc_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_euroc_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | find_mola_package(mola_kernel) 20 | 21 | # find dependencies: 22 | find_package(mrpt-obs) 23 | find_package(mrpt-math) # for MRPT Eigen utilities 24 | 25 | # ----------------------- 26 | # define lib: 27 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 28 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 29 | 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 33 | PRIVATE_LINK_LIBRARIES 34 | mola::mola_kernel 35 | mrpt::obs 36 | mrpt::math 37 | CMAKE_DEPENDENCIES 38 | mola_kernel 39 | mrpt-obs 40 | mrpt-math 41 | ) 42 | -------------------------------------------------------------------------------- /mola_input_kitti360_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_kitti360_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-math) # for MRPT Eigen utilities 21 | find_package(mrpt-maps) 22 | 23 | find_mola_package(mola_kernel) 24 | 25 | # ----------------------- 26 | # define lib: 27 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 28 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 29 | 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 33 | PUBLIC_LINK_LIBRARIES 34 | mola::mola_kernel 35 | PRIVATE_LINK_LIBRARIES 36 | mrpt::maps 37 | mrpt::math 38 | CMAKE_DEPENDENCIES 39 | mola_kernel 40 | ) 41 | -------------------------------------------------------------------------------- /mola_input_kitti_dataset/matlab/reproject_kitti_scan_txt.m: -------------------------------------------------------------------------------- 1 | function [proj_y] = reproject_kitti_scan_txt(inputTxtFile) 2 | D=load(inputTxtFile); 3 | 4 | % Based on: 5 | % https://github.com/TixiaoShan/LIO-SAM/blob/develop/config/doc/kitti2bag/kitti2bag.py 6 | 7 | % (JLBC) Note that this code assumes scan deskew has not been already 8 | % applied! 9 | 10 | % depth = np.linalg.norm(scan, 2, axis=1) 11 | % pitch = np.arcsin(scan[:, 2] / depth) # arcsin(z, depth) 12 | % fov_down = -24.8 / 180.0 * np.pi 13 | % fov = (abs(-24.8) + abs(2.0)) / 180.0 * np.pi 14 | % proj_y = (pitch + abs(fov_down)) / fov # in [0.0, 1.0] 15 | % proj_y *= 64 # in [0.0, H] 16 | % proj_y = np.floor(proj_y) 17 | % proj_y = np.minimum(64 - 1, proj_y) 18 | % proj_y = np.maximum(0, proj_y).astype(np.int32) # in [0,H-1] 19 | % proj_y = proj_y.reshape(-1, 1) 20 | % scan = np.concatenate((scan,proj_y), axis=1) 21 | % scan = scan.tolist() 22 | % for i in range(len(scan)): 23 | % scan[i][-1] = int(scan[i][-1]) 24 | 25 | depth = sqrt(D(:,1).^2 + D(:,2).^2); % (x,y) only 26 | pitch = asin(D(:,3) ./ depth); 27 | 28 | fov_down = -24.8 / 180.0 * pi; 29 | fov = (abs(-24.8) + abs(2.0)) / 180.0 * pi; 30 | proj_y = (pitch + abs(fov_down)) / fov; % in [0.0, 1.0] 31 | proj_y = proj_y * 64; % in [0.0, H] 32 | proj_y = floor(proj_y); 33 | proj_y = min(proj_y,63); 34 | proj_y = max(proj_y,0); 35 | 36 | %plot(proj_y,'.'); 37 | 38 | end 39 | 40 | -------------------------------------------------------------------------------- /mola_input_paris_luco_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_paris_luco_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-math) # for MRPT Eigen utilities 21 | find_package(mrpt-maps) 22 | 23 | find_mola_package(mola_kernel) 24 | 25 | # ----------------------- 26 | # define lib: 27 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 28 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 29 | 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 33 | PUBLIC_LINK_LIBRARIES 34 | mola::mola_kernel 35 | PRIVATE_LINK_LIBRARIES 36 | mrpt::maps 37 | mrpt::math 38 | CMAKE_DEPENDENCIES 39 | mola_kernel 40 | ) 41 | -------------------------------------------------------------------------------- /mola_pose_list/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_pose_list LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find CMake dependencies: 20 | find_package(mrpt-maps) 21 | find_package(mrpt-poses) 22 | 23 | # ----------------------- 24 | # define lib: 25 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 26 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 27 | 28 | mola_add_library( 29 | TARGET ${PROJECT_NAME} 30 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 31 | PUBLIC_LINK_LIBRARIES 32 | mrpt::maps 33 | mrpt::poses 34 | CMAKE_DEPENDENCIES 35 | mola_common 36 | mrpt-maps 37 | mrpt-poses 38 | ) 39 | 40 | # ----------------------- 41 | # define tests: 42 | enable_testing() 43 | add_subdirectory(tests) 44 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/euroc_stereo_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # This file defines: 4 | # an EUROC dataset reader. No actual SLAM or localization with this file! 5 | # Invoke setting EUROC_SEQ to the desired sequence, e.g: 6 | # EUROC_SEQ=machine_hall/MH_04_difficult mola-cli xxx.yaml 7 | # ----------------------------------------------------------------------------- 8 | 9 | modules: 10 | # ===================== 11 | # EurocDataset 12 | # ===================== 13 | - name: euroc_input 14 | type: mola::EurocDataset 15 | execution_rate: 50 # Hz 16 | # (The following requires creating a MolaViz instance) 17 | gui_preview_sensors: 18 | - raw_sensor_label: cam0 19 | decimation: 1 20 | win_pos: 5 80 500 200 # [x,y,width,height] 21 | - raw_sensor_label: cam1 22 | decimation: 1 23 | win_pos: 5 360 500 200 # [x,y,width,height] 24 | params: 25 | base_dir: ${EUROC_BASE_DIR} 26 | sequence: ${EUROC_SEQ|vicon_room1/V1_01_easy/} 27 | time_warp_scale: 1.0 28 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 29 | # ===================== 30 | # MolaViz 31 | # ===================== 32 | - name: viz 33 | type: mola::MolaViz 34 | #verbosity_level: DEBUG 35 | params: ~ # none 36 | -------------------------------------------------------------------------------- /mola_viz/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_viz LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | # find dependencies: 19 | find_package(mrpt-gui REQUIRED) 20 | find_package(mrpt-maps REQUIRED) 21 | find_package(mrpt-opengl REQUIRED) 22 | find_mola_package(mola_kernel) 23 | 24 | # ----------------------- 25 | # define lib: 26 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 27 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 28 | 29 | mola_add_library( 30 | TARGET ${PROJECT_NAME} 31 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 32 | PUBLIC_LINK_LIBRARIES 33 | mola::mola_kernel 34 | mrpt::gui 35 | mrpt::opengl 36 | mrpt::maps 37 | CMAKE_DEPENDENCIES 38 | mola_kernel 39 | mrpt-gui 40 | mrpt-opengl 41 | ) 42 | -------------------------------------------------------------------------------- /mola_input_mulran_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_mulran_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-math) # for MRPT Eigen utilities 21 | find_package(mrpt-maps) 22 | find_package(mrpt-poses) 23 | 24 | find_mola_package(mola_kernel) 25 | 26 | # ----------------------- 27 | # define lib: 28 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 29 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 30 | 31 | mola_add_library( 32 | TARGET ${PROJECT_NAME} 33 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 34 | PUBLIC_LINK_LIBRARIES 35 | mola::mola_kernel 36 | PRIVATE_LINK_LIBRARIES 37 | mrpt::maps 38 | mrpt::math 39 | CMAKE_DEPENDENCIES 40 | mola_kernel 41 | ) 42 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/FastAllocator.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file FastAllocator.h 15 | * @brief Provides alternative STL allocators, if available, per CMake config 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jan 07, 2019 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include // std::allocator 23 | #include 24 | #if MOLA_KERNEL_HAS_TBB 25 | #include 26 | #endif 27 | 28 | namespace mola 29 | { 30 | #if MOLA_KERNEL_HAS_TBB 31 | template 32 | using FastAllocator = tbb::tbb_allocator; 33 | #else 34 | template 35 | using FastAllocator = std::allocator; 36 | #endif 37 | 38 | template > 39 | using fast_set = std::set>; 40 | 41 | template > 42 | using fast_map = std::map>>; 43 | 44 | } // namespace mola 45 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/details_unnamed_enum_values.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | } 16 | Enum Values 17 | ----------- 18 | 19 | %{ 20 | for i = 1, #compound.enumArray do 21 | local item = compound.enumArray[i] 22 | 23 | if isUnnamedItem(item) then 24 | for j = 1, #item.enumValueArray do 25 | local subItem = item.enumValueArray[j] 26 | if subItem.hasDocumentation then 27 | } 28 | $(getItemRefTargetString(subItem)) 29 | .. ref-code-block:: $LANGUAGE 30 | :class: doxyrest-title-code-block 31 | 32 | $(subItem.name) 33 | %{ 34 | if subItem.isSubGroupHead then 35 | for j = 1, #subItem.subGroupSlaveArray do 36 | slaveItem = subItem.subGroupSlaveArray[j] 37 | } 38 | $(slaveItem.name) 39 | %{ 40 | end -- for 41 | end -- if 42 | } 43 | 44 | $(getItemDetailedDocumentation(subItem)) 45 | 46 | %{ 47 | end -- if 48 | end -- for 49 | end -- if 50 | end -- for 51 | } 52 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/interfaces/RawDataConsumer.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file RawDataConsumer.h 15 | * @brief Virtual interface for raw data consumers, typically, SLAM front-ends 16 | * @author Jose Luis Blanco Claraco 17 | * @date Nov 21, 2018 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace mola 24 | { 25 | using CObservation = mrpt::obs::CObservation; 26 | 27 | /** Virtual base for raw-observation consumers 28 | * \ingroup mola_kernel_interfaces_grp */ 29 | class RawDataConsumer 30 | { 31 | public: 32 | RawDataConsumer() = default; 33 | 34 | /** @name Virtual interface of any RawDataConsumer 35 | *{ */ 36 | 37 | /** To be called whenever a new observation arrives. It should return as 38 | * fast as possible, enqueuing the data for processing in another thread. 39 | */ 40 | virtual void onNewObservation(const CObservation::ConstPtr& o) = 0; 41 | /** @} */ 42 | }; 43 | 44 | } // namespace mola 45 | -------------------------------------------------------------------------------- /mola_launcher/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_launcher 8 | 2.3.0 9 | Launcher app for MOLA systems 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_launcher 15 | 16 | 17 | mola_kernel 18 | 19 | mrpt_libbase 20 | mrpt_libtclap 21 | 22 | doxygen 23 | 24 | ros_environment 25 | 26 | cmake 27 | ament_cmake_gtest 28 | ament_cmake 29 | 30 | ament_lint_auto 31 | 32 | ament_cmake_pep257 33 | ament_cmake_xmllint 34 | 35 | 36 | ament_cmake 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /mola_traj_tools/python/ncd-csv2tum: -------------------------------------------------------------------------------- 1 | #!/bin/env python3 2 | 3 | # Convert NewerCollegeDataset "tum" ground truth files to 4 | # a format compatible with evo, i.e. merging the two first time columns into one. 5 | # 6 | # Usage: ncd-csv2tum /path/to/traj.csv # Generates: traj.tum 7 | 8 | import sys 9 | 10 | 11 | def merge_columns(input_file): 12 | # Replace the file extension with .tum 13 | output_file = input_file[:-4] + ".tum" 14 | 15 | with open(input_file, 'r') as f: 16 | lines = f.readlines() 17 | 18 | with open(output_file, 'w') as f: 19 | for line in lines: 20 | columns = [token.strip() 21 | for token in line.replace(',', ' ').split()] 22 | 23 | if len(columns) == 9: 24 | result = float(columns[0]) + 1e-9 * float(columns[1]) 25 | f.write(' '.join(['%.8f' % result] + columns[2:]) + '\n') 26 | elif len(columns) == 8: 27 | f.write(' '.join(columns[:]) + '\n') 28 | else: 29 | raise ValueError( 30 | "Input file must have either 8 or 9 columns, but it has " + str(len(columns))) 31 | 32 | print(f"File saved as {output_file}") 33 | 34 | 35 | if __name__ == "__main__": 36 | if len(sys.argv) != 2: 37 | print("Usage: " + sys.argv[0] + " ") 38 | sys.exit(1) 39 | 40 | input_file = sys.argv[1] 41 | merge_columns(input_file) 42 | -------------------------------------------------------------------------------- /kitti_metrics_eval/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(kitti_metrics_eval LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-math) # for MRPT Eigen utilities 21 | find_package(mrpt-poses) 22 | find_package(mrpt-tclap) 23 | 24 | # ---------------------- 25 | # define app target: 26 | mola_add_executable( 27 | TARGET kitti-metrics-eval 28 | SOURCES apps/kitti-metrics-eval.cpp 29 | LINK_LIBRARIES 30 | mrpt::tclap 31 | mrpt::poses 32 | mrpt::math 33 | ) 34 | 35 | # Silent tons of warnings from kitti-eval original code: 36 | if(CMAKE_COMPILER_IS_GNUCXX) 37 | target_compile_options(kitti-metrics-eval PRIVATE "-Wno-unused-result" "-Wno-shadow" "-Wno-sign-compare") 38 | endif() 39 | 40 | # Silent cmake warnings: 41 | set(unused ${BUILD_TESTING}) 42 | unset(unused) 43 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/kitti360_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # 4 | # This file just plays the raw data of a sequence of the KITTI-360 dataset 5 | # ----------------------------------------------------------------------------- 6 | 7 | modules: 8 | # ===================== 9 | # Kitti360Dataset 10 | # ===================== 11 | - type: mola::Kitti360Dataset 12 | name: dataset_input 13 | execution_rate: 20 # Hz 14 | #export_to_rawlog: kitti_${KITTI360_SEQ}.rawlog 15 | #verbosity_level: INFO 16 | gui_preview_sensors: 17 | - raw_sensor_label: lidar 18 | decimation: 1 19 | win_pos: 5 70 400 400 20 | - raw_sensor_label: image_0 21 | decimation: 1 22 | win_pos: 5 370 600 200 23 | - raw_sensor_label: image_1 24 | decimation: 1 25 | win_pos: 5 500 600 200 26 | params: 27 | base_dir: ${KITTI360_DATASET} 28 | sequence: ${KITTI360_SEQ} 29 | time_warp_scale: 1.0 30 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 31 | publish_lidar: true 32 | publish_image_0: true 33 | publish_image_1: true 34 | publish_ground_truth: true 35 | 36 | # ===================== 37 | # MolaViz 38 | # ===================== 39 | - name: viz 40 | type: mola::MolaViz 41 | #verbosity_level: DEBUG 42 | params: ~ # none 43 | -------------------------------------------------------------------------------- /mola/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mola 5 | 2.3.0 6 | Metapackage with all core open-sourced MOLA packages. 7 | 8 | Jose-Luis Blanco-Claraco 9 | BSD-3-Clause 10 | 11 | kitti_metrics_eval 12 | mola_bridge_ros2 13 | mola_demos 14 | mola_input_euroc_dataset 15 | mola_input_kitti360_dataset 16 | mola_input_kitti_dataset 17 | mola_input_mulran_dataset 18 | mola_input_paris_luco_dataset 19 | mola_input_rawlog 20 | mola_input_video 21 | mola_input_rosbag2 22 | mola_kernel 23 | mola_launcher 24 | mola_metric_maps 25 | mola_pose_list 26 | mola_relocalization 27 | mola_traj_tools 28 | mola_viz 29 | mola_yaml 30 | 31 | 32 | cmake 33 | 34 | cmake 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/kitti_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # 4 | # This file just replays (no SLAM) the raw data of a sequence of the KITTI dataset 5 | # ----------------------------------------------------------------------------- 6 | 7 | modules: 8 | # ===================== 9 | # KittiOdometryDataset 10 | # ===================== 11 | - type: mola::KittiOdometryDataset 12 | name: dataset_input 13 | execution_rate: 20 # Hz 14 | #export_to_rawlog: kitti_${KITTI_SEQ}.rawlog 15 | #verbosity_level: INFO 16 | gui_preview_sensors: 17 | - raw_sensor_label: lidar 18 | decimation: 1 19 | win_pos: 5 70 400 400 20 | - raw_sensor_label: image_0 21 | decimation: 1 22 | win_pos: 5 370 600 200 23 | - raw_sensor_label: image_1 24 | decimation: 1 25 | win_pos: 5 500 600 200 26 | params: 27 | base_dir: ${KITTI_BASE_DIR} 28 | sequence: ${KITTI_SEQ} 29 | time_warp_scale: 1.0 30 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 31 | publish_lidar: true 32 | publish_image_0: true 33 | publish_image_1: true 34 | publish_ground_truth: true 35 | 36 | # ===================== 37 | # MolaViz 38 | # ===================== 39 | - name: viz 40 | type: mola::MolaViz 41 | #verbosity_level: DEBUG 42 | params: ~ # none 43 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/page.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local page = argArray[1] 15 | 16 | if FORCE_INCLUDE_FILE then 17 | } 18 | .. include:: $FORCE_INCLUDE_FILE 19 | %{ 20 | end -- if 21 | } 22 | .. index:: pair: page; $(page.title) 23 | .. _doxid-$(page.id): 24 | 25 | $(getTitle(page.title, 1)) 26 | 27 | $(getItemDetailedDocumentation(page)) 28 | 29 | %{ 30 | if #page.subPageArray > 0 then 31 | } 32 | .. toctree:: 33 | :hidden: 34 | 35 | %{ 36 | table.sort(page.subPageArray, cmpTitles) 37 | local pageTree = "" 38 | 39 | for i = 1, #page.subPageArray do 40 | local page = page.subPageArray[i] 41 | local targetFileName = getItemFileName(page) 42 | 43 | generateFile(targetFileName, "page.rst.in", page) 44 | 45 | if targetFileName ~= INTRO_FILE then 46 | pageTree = pageTree .. getPageTree(page, targetFileName) 47 | } 48 | $(targetFileName) 49 | %{ 50 | end -- if 51 | end -- for 52 | } 53 | 54 | .. rubric:: Related Pages: 55 | 56 | $pageTree 57 | 58 | %{ 59 | end -- if 60 | } 61 | -------------------------------------------------------------------------------- /mola_demos/ros2-launchs/ros-kitti-play.launch.py: -------------------------------------------------------------------------------- 1 | 2 | # ROS 2 launch file 3 | 4 | from launch import LaunchDescription 5 | from launch.substitutions import TextSubstitution 6 | from launch.substitutions import LaunchConfiguration 7 | from launch_ros.actions import Node 8 | from launch.actions import DeclareLaunchArgument 9 | from launch.actions import SetEnvironmentVariable 10 | from ament_index_python import get_package_share_directory 11 | import os 12 | 13 | 14 | def generate_launch_description(): 15 | myDir = get_package_share_directory("mola_demos") 16 | 17 | # args that can be set from the command line or a default will be used 18 | kitti_sequence_arg = DeclareLaunchArgument( 19 | "kitti_sequence", default_value="00") 20 | 21 | set_seq_env_var = SetEnvironmentVariable( 22 | name='KITTI_SEQ', value=LaunchConfiguration('kitti_sequence')) 23 | 24 | mola_cli_node = Node( 25 | package='mola_launcher', 26 | executable='mola-cli', 27 | output='screen', 28 | arguments=[ 29 | os.path.join(myDir, 'mola-cli-launchs', 'kitti_just_replay_to_ros2.yaml')] 30 | ) 31 | 32 | rviz2_node = Node( 33 | package='rviz2', 34 | executable='rviz2', 35 | name='rviz2', 36 | arguments=[ 37 | '-d', [os.path.join(myDir, 'rviz2', 'kitti.rviz')]] 38 | ) 39 | 40 | return LaunchDescription([ 41 | kitti_sequence_arg, 42 | set_seq_env_var, 43 | mola_cli_node, 44 | rviz2_node 45 | ]) 46 | -------------------------------------------------------------------------------- /mola_demos/ros2-launchs/ros-mulran-play.launch.py: -------------------------------------------------------------------------------- 1 | 2 | # ROS 2 launch file 3 | 4 | from launch import LaunchDescription 5 | from launch.substitutions import TextSubstitution 6 | from launch.substitutions import LaunchConfiguration 7 | from launch_ros.actions import Node 8 | from launch.actions import DeclareLaunchArgument 9 | from launch.actions import SetEnvironmentVariable 10 | from ament_index_python import get_package_share_directory 11 | import os 12 | 13 | 14 | def generate_launch_description(): 15 | myDir = get_package_share_directory("mola_demos") 16 | 17 | # args that can be set from the command line or a default will be used 18 | mulran_sequence_arg = DeclareLaunchArgument( 19 | "mulran_sequence", default_value="KAIST01") 20 | 21 | set_seq_env_var = SetEnvironmentVariable( 22 | name='MULRAN_SEQ', value=LaunchConfiguration('mulran_sequence')) 23 | 24 | mola_cli_node = Node( 25 | package='mola_launcher', 26 | executable='mola-cli', 27 | output='screen', 28 | arguments=[ 29 | os.path.join(myDir, 'mola-cli-launchs', 'mulran_just_replay_to_ros2.yaml')] 30 | ) 31 | 32 | rviz2_node = Node( 33 | package='rviz2', 34 | executable='rviz2', 35 | name='rviz2', 36 | arguments=[ 37 | '-d', [os.path.join(myDir, 'rviz2', 'mulran.rviz')]] 38 | ) 39 | 40 | return LaunchDescription([ 41 | mulran_sequence_arg, 42 | set_seq_env_var, 43 | mola_cli_node, 44 | rviz2_node 45 | ]) 46 | -------------------------------------------------------------------------------- /mola_metric_maps/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_metric_maps 8 | 2.3.0 9 | Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules. 10 | 11 | Jose-Luis Blanco-Claraco 12 | GPLv3 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_metric_maps 15 | 16 | 17 | mola_common 18 | 19 | mrpt_libmaps 20 | mp2p_icp 21 | 22 | tbb 23 | 24 | doxygen 25 | 26 | ros_environment 27 | 28 | cmake 29 | ament_cmake_gtest 30 | ament_cmake 31 | 32 | ament_lint_auto 33 | ament_lint_common 34 | ament_cmake_xmllint 35 | 36 | 37 | ament_cmake 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /mola_yaml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_yaml LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(MRPT 2.1.0 REQUIRED COMPONENTS containers system) 21 | 22 | # define lib: 23 | file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h) 24 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h) 25 | 26 | # Use C++17 filesystem lib: 27 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 28 | find_package(Filesystem REQUIRED) 29 | 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 33 | PUBLIC_LINK_LIBRARIES 34 | mrpt::containers 35 | PRIVATE_LINK_LIBRARIES 36 | mrpt::system 37 | CXX::Filesystem # the C++>=17 std lib 38 | CMAKE_DEPENDENCIES 39 | mrpt-containers 40 | mrpt-system 41 | ) 42 | 43 | # ----------------------- 44 | # define tests: 45 | enable_testing() 46 | add_subdirectory(tests) 47 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/mulran_just_replay.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # 4 | # This file just replays (no SLAM) the raw data of a sequence of the Mulran dataset 5 | # ----------------------------------------------------------------------------- 6 | 7 | modules: 8 | # ===================== 9 | # MulranDataset 10 | # ===================== 11 | - type: mola::MulranDataset 12 | name: dataset_input 13 | execution_rate: 20 # Hz 14 | #export_to_rawlog: mulran_${MULRAN_SEQ}.rawlog 15 | #verbosity_level: INFO 16 | gui_preview_sensors: 17 | - raw_sensor_label: lidar 18 | decimation: 1 19 | win_pos: 5 70 400 400 20 | color_from_z: false 21 | - raw_sensor_label: gps 22 | decimation: 1 23 | win_pos: 5 400 400 400 24 | - raw_sensor_label: imu 25 | decimation: 10 26 | win_pos: 5 550 400 400 27 | params: 28 | base_dir: ${MULRAN_BASE_DIR} 29 | sequence: ${MULRAN_SEQ} 30 | time_warp_scale: 1.0 31 | start_paused: ${MOLA_DATASET_START_PAUSED|false} 32 | publish_lidar: true 33 | publish_ground_truth: true 34 | publish_imu: true 35 | publish_gps: true 36 | #normalize_intensity_channel_maximum: 6500 37 | #lidar_to_ground_truth_1to1: false 38 | 39 | # ===================== 40 | # MolaViz 41 | # ===================== 42 | - name: viz 43 | type: mola::MolaViz 44 | #verbosity_level: DEBUG 45 | params: ~ # none 46 | -------------------------------------------------------------------------------- /mola_bridge_ros2/README.md: -------------------------------------------------------------------------------- 1 | # mola_bridge_ros2 2 | RawDataSource acting as a bidirectional bridge between ROS2 and MOLA modules. 3 | 4 | Can be used to: 5 | * ROS2->MOLA: Interface a real sensor using a ROS driver node and run SLAM with it. See `mola_lidar_odometry` [demos](https://github.com/MOLAorg/mola_lidar_odometry/tree/develop/ros2-launchs). 6 | * MOLA->ROS2: Expose a dataset as ROS2 topics, from any of the datasets supported by MOLA. Example: [kitti](https://github.com/MOLAorg/mola/blob/develop/mola_demos/ros2-launchs/ros-kitti-play.launch.py) 7 | * ROS2<->MOLA: Run SLAM on a live sensor stream, then send back the reconstructed map and trajectory to ROS for further processing or visualization in RViz. See `mola_lidar_odometry` [demos](https://github.com/MOLAorg/mola_lidar_odometry/tree/develop/ros2-launchs). 8 | 9 | If you want to run SLAM on a rosbag, the module `mola_input_rosbag2` provides 10 | a more convenient interface, e.g. allows fast-forwarding or skipping parts of a bag. 11 | 12 | Building this module requires ROS 2 to be installed, and its `setup.bash` 13 | activation script being sourced **before** invoking CMake to configure and build MOLA. 14 | 15 | See package docs for instructions and options to install ROS prerequisites. 16 | 17 | Provided MOLA modules: 18 | * `BridgeROS2`, type RawDataSourceBase. 19 | 20 | ## Build and install 21 | Refer to the [root MOLA repository](https://github.com/MOLAorg/mola). 22 | 23 | ## Docs and examples 24 | See this package page [in the documentation](https://docs.mola-slam.org/latest/modules.html). 25 | 26 | ## License 27 | This package is released under the BSD 3-clause license. 28 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/interfaces/Relocalization.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file Relocalization.h 15 | * @brief Virtual interface for relocalization offered by MOLA modules 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jul 29, 2024 18 | */ 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace mola 25 | { 26 | /** Virtual interface for relocalization offered by MOLA modules 27 | * \ingroup mola_kernel_interfaces_grp */ 28 | class Relocalization 29 | { 30 | public: 31 | Relocalization() = default; 32 | 33 | /** @name Virtual interface of Relocalization 34 | *{ */ 35 | 36 | /** Re-localize near this pose, including uncertainty. 37 | * \param[in] pose The pose, in the local map frame. 38 | * There is no return value from this method. 39 | */ 40 | virtual void relocalize_near_pose_pdf(const mrpt::poses::CPose3DPDFGaussian& p) = 0; 41 | 42 | /** Re-localize with the next incoming GNSS message. 43 | * There is no return value from this method. 44 | */ 45 | virtual void relocalize_from_gnss() = 0; 46 | 47 | /** @} */ 48 | }; 49 | 50 | } // namespace mola 51 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/cfamily/crefdb_members.py.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | 16 | includeFile("crefdb_enums.py.in", compound.enumArray) 17 | includeFile("crefdb_items.py.in", compound.namespaceArray) 18 | includeFile("crefdb_items.py.in", compound.structArray) 19 | includeFile("crefdb_items.py.in", compound.unionArray) 20 | includeFile("crefdb_items.py.in", compound.classArray) 21 | includeFile("crefdb_items.py.in", compound.interfaceArray) 22 | includeFile("crefdb_items.py.in", compound.protocolArray) 23 | includeFile("crefdb_items.py.in", compound.exceptionArray) 24 | includeFile("crefdb_items.py.in", compound.singletonArray) 25 | includeFile("crefdb_items.py.in", compound.serviceArray) 26 | includeFile("crefdb_items.py.in", compound.typedefArray) 27 | includeFile("crefdb_items.py.in", compound.variableArray) 28 | includeFile("crefdb_items.py.in", compound.propertyArray) 29 | includeFile("crefdb_items.py.in", compound.eventArray) 30 | includeFile("crefdb_items.py.in", compound.functionArray) 31 | includeFile("crefdb_items.py.in", compound.aliasArray) 32 | includeFile("crefdb_items.py.in", compound.defineArray) 33 | } 34 | -------------------------------------------------------------------------------- /mola_yaml/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2021, The MOLA SLAM framework 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /mola/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /mola_bridge_ros2/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018-2024, The MOLA SLAM framework 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /mola_demos/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /kitti_metrics_eval/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /mola_traj_tools/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /mola_metric_maps/src/register.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file register.cpp 15 | * @brief Register MOLA modules in the factory 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jan 08, 2018 18 | */ 19 | 20 | /** \defgroup mola_metric_maps_grp mola_metric_maps 21 | * C++ library: Advanced metric map classes 22 | * 23 | */ 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | using namespace mola; 35 | 36 | MRPT_INITIALIZER(do_register_mola_metric_maps) 37 | { 38 | using mrpt::rtti::registerClass; 39 | 40 | // and register RTTI info: 41 | registerClass(CLASS_ID(mola::HashedVoxelPointCloud)); 42 | registerClass(CLASS_ID(mola::KeyframePointCloudMap)); 43 | registerClass(CLASS_ID(mola::NDT)); 44 | registerClass(CLASS_ID(mola::OccGrid)); 45 | registerClass(CLASS_ID(mola::SparseTreesPointCloud)); 46 | registerClass(CLASS_ID(mola::SparseVoxelPointCloud)); 47 | } 48 | -------------------------------------------------------------------------------- /mola_demos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | if("$ENV{ROS_VERSION}" STREQUAL "2") 14 | set(DETECTED_ROS2 TRUE) 15 | endif() 16 | 17 | # Tell CMake we'll use C++ for use in its tests/flags 18 | project(mola_demos LANGUAGES CXX) 19 | 20 | # MOLA CMake scripts: "mola_xxx()" 21 | #find_package(mola_common REQUIRED) 22 | 23 | # Instrumental lib: 24 | add_library(${PROJECT_NAME} INTERFACE) 25 | 26 | # Install files: 27 | install(DIRECTORY 28 | mola-cli-launchs 29 | ros2-launchs 30 | ros2-params 31 | rviz2 32 | DESTINATION 33 | share/${PROJECT_NAME} 34 | ) 35 | 36 | 37 | # ----------------------------------------------------------------------------- 38 | # ROS2 39 | # ----------------------------------------------------------------------------- 40 | if(DETECTED_ROS2) 41 | # find dependencies 42 | find_package(ament_cmake REQUIRED) 43 | 44 | if(BUILD_TESTING) 45 | find_package(ament_lint_auto REQUIRED) 46 | ament_lint_auto_find_test_dependencies() 47 | endif() 48 | 49 | ament_package() 50 | endif() 51 | 52 | # Silent warning on unused variable: 53 | set(ignored ${CMAKE_EXPORT_COMPILE_COMMANDS}) 54 | unset(ignored) 55 | -------------------------------------------------------------------------------- /mola_launcher/apps/mola-dir.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file mola-dir.cpp 15 | * @brief main() for mola-dir: finds modules shared paths 16 | * @author Jose Luis Blanco Claraco 17 | * @date Jun 24, 2019 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | int main(int argc, char** argv) 27 | { 28 | try 29 | { 30 | if (argc != 2) 31 | throw std::runtime_error( 32 | "Usage: mola-dir \n" 33 | "You can also use `mola-cli --list-module-shared-dirs` to list " 34 | "all known module shared-files directories."); 35 | 36 | mola::MolaLauncherApp app; 37 | 38 | const auto modName = std::string(argv[1]); 39 | const auto foundPath = app.findModuleSharedDir(modName); 40 | 41 | if (foundPath.empty()) 42 | { 43 | std::cerr << "Module `" << modName << "` was not found."; 44 | return 1; 45 | } 46 | 47 | std::cout << foundPath << "\n"; 48 | 49 | return 0; 50 | } 51 | catch (std::exception& e) 52 | { 53 | mola::pretty_print_exception(e, "[mola-dir] Exit due to exception:"); 54 | return 1; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/Georeferencing.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file Georeferencing.h 15 | * @brief Defines a common georeferencing data structure, similar to mp2p_icp 16 | * but independent 17 | * @author Jose Luis Blanco Claraco 18 | * @date Jan 31, 2025 19 | */ 20 | #pragma once 21 | 22 | #include 23 | #include 24 | 25 | namespace mola 26 | { 27 | /** Defines a common georeferencing data structure, similar to mp2p_icp but 28 | * independent of that library. 29 | * 30 | * \ingroup mola_kernel_grp */ 31 | struct Georeferencing 32 | { 33 | Georeferencing() = default; 34 | 35 | /** The geodetic coordinates (on WGS-84) of the metric map ENU frame of 36 | * reference. */ 37 | mrpt::topography::TGeodeticCoords geo_coord; 38 | 39 | /** The SE(3) transformation from the ENU (earth-north-up) frame 40 | * to the metric map local frame of reference. 41 | * If this is the identity (default) it means the map is already in 42 | * ENU coordinates (i.e. +X is East, +Y is North, +Z is up) and 43 | * the point (0,0,0) is the one having the geodetic coordinates 44 | * geo_coord 45 | */ 46 | mrpt::poses::CPose3DPDFGaussian T_enu_to_map; 47 | }; 48 | } // namespace mola 49 | -------------------------------------------------------------------------------- /mola_traj_tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_traj_tools LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-poses) 21 | 22 | # ---------------------- 23 | # define app targets: 24 | 25 | mola_add_executable( 26 | TARGET traj_ypr2tum 27 | SOURCES src/traj_ypr2tum.cpp 28 | LINK_LIBRARIES 29 | mrpt::poses 30 | ) 31 | 32 | mola_add_executable( 33 | TARGET traj_tum2ypr 34 | SOURCES src/traj_tum2ypr.cpp 35 | LINK_LIBRARIES 36 | mrpt::poses 37 | ) 38 | 39 | mola_add_executable( 40 | TARGET traj_tf_left 41 | SOURCES src/traj_tf_left.cpp 42 | LINK_LIBRARIES 43 | mrpt::poses 44 | ) 45 | 46 | mola_add_executable( 47 | TARGET traj_tf_right 48 | SOURCES src/traj_tf_right.cpp 49 | LINK_LIBRARIES 50 | mrpt::poses 51 | ) 52 | 53 | mola_add_executable( 54 | TARGET traj_rebase 55 | SOURCES src/traj_rebase.cpp 56 | LINK_LIBRARIES 57 | mrpt::poses 58 | ) 59 | 60 | # Install "executables" too: 61 | install(PROGRAMS 62 | python/ncd-csv2tum 63 | DESTINATION 64 | bin 65 | ) 66 | 67 | -------------------------------------------------------------------------------- /docs/source/doxyrest-frames/common/details.rst.in: -------------------------------------------------------------------------------- 1 | %{ 2 | -------------------------------------------------------------------------------- 3 | -- 4 | -- This file is part of the Doxyrest toolkit. 5 | -- 6 | -- Doxyrest is distributed under the MIT license. 7 | -- For details see accompanying license.txt file, 8 | -- the public copy of which is also available at: 9 | -- http://tibbo.com/downloads/archive/doxyrest/license.txt 10 | -- 11 | -------------------------------------------------------------------------------- 12 | 13 | local argArray = table.pack(...) 14 | local compound = argArray[1] 15 | local itemArray = argArray[2] 16 | local getDeclString = argArray[3] 17 | local sectionName = argArray[4] 18 | 19 | if sectionName then 20 | } 21 | $(getTitle(sectionName, 3)) 22 | 23 | %{ 24 | end -- if 25 | 26 | for i = 1, #itemArray do 27 | local item = itemArray[i] 28 | if isItemInCompoundDetails(item, compound) then 29 | local decl = getDeclString(item, g_simpleItemNameTemplate, "\t"); 30 | } 31 | $(getItemRefTargetString(item)) 32 | .. ref-code-block:: $LANGUAGE 33 | :class: doxyrest-title-code-block 34 | 35 | $decl 36 | %{ 37 | if item.isSubGroupHead then 38 | local isPrevMl = string.find(decl, "\n") 39 | 40 | for j = 1, #item.subGroupSlaveArray do 41 | slaveItem = item.subGroupSlaveArray[j] 42 | local decl = getDeclString(slaveItem, g_simpleItemNameTemplate, "\t") 43 | local isMl = string.find(decl, "\n") 44 | local extraSep = "" 45 | 46 | if isMl or isPrevMl then 47 | extraSep = "\n" 48 | end 49 | 50 | isPrevMl = isMl 51 | } 52 | $extraSep $decl 53 | %{ 54 | end -- for 55 | end -- if 56 | } 57 | 58 | $(getItemDetailedDocumentation(item)) 59 | 60 | %{ 61 | end -- if 62 | end -- for 63 | } 64 | -------------------------------------------------------------------------------- /mola_input_lidar_bin_dataset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_input_bin_dataset LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find dependencies: 20 | find_package(mrpt-maps REQUIRED) # For CGenericPointsMap 21 | find_package(mrpt-obs REQUIRED) # For CObservationPointCloud 22 | find_package(mrpt-system REQUIRED) # For file system utilities 23 | find_package(mrpt-core REQUIRED) # For mrpt::Clock 24 | 25 | find_mola_package(mola_kernel REQUIRED) 26 | find_mola_package(mola_yaml REQUIRED) # For parameter parsing 27 | 28 | # ----------------------- 29 | # define lib: 30 | file(GLOB_RECURSE LIB_SRCS src/BinFileDataset.cpp) 31 | file(GLOB_RECURSE LIB_PUBLIC_HDRS include/mola_input_bin_dataset/BinFileDataset.h) 32 | 33 | mola_add_library( 34 | TARGET ${PROJECT_NAME} 35 | SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS} 36 | PUBLIC_LINK_LIBRARIES 37 | mola::mola_kernel 38 | mola::mola_yaml 39 | PRIVATE_LINK_LIBRARIES 40 | mrpt::maps 41 | mrpt::obs 42 | mrpt::system 43 | mrpt::core 44 | CMAKE_DEPENDENCIES 45 | mola_kernel 46 | mola_yaml 47 | ) -------------------------------------------------------------------------------- /mola_kernel/include/mola_kernel/interfaces/Dataset_UI.h: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file Dataset_UI.h 15 | * @brief Virtual interface for offline dataset sources to have a GUI 16 | * @author Jose Luis Blanco Claraco 17 | * @date Feb 20, 2024 18 | */ 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace mola 24 | { 25 | /** Virtual base for offline dataset sources to have a GUI within MolaViz 26 | * \ingroup mola_kernel_interfaces_grp */ 27 | class Dataset_UI 28 | { 29 | public: 30 | Dataset_UI() = default; 31 | 32 | /** @name Virtual interface of Dataset_UI 33 | *{ */ 34 | 35 | /** Number of different time steps available to call getObservations() */ 36 | virtual size_t datasetUI_size() const = 0; 37 | 38 | /** Returns the latest requested observation, range [0, datasetSize()] */ 39 | virtual size_t datasetUI_lastQueriedTimestep() const = 0; 40 | 41 | virtual double datasetUI_playback_speed() const = 0; 42 | virtual void datasetUI_playback_speed(double speed) = 0; 43 | 44 | virtual bool datasetUI_paused() const = 0; 45 | virtual void datasetUI_paused(bool paused) = 0; 46 | 47 | /** Forces continue replaying in this moment in time */ 48 | virtual void datasetUI_teleport(size_t timestep) = 0; 49 | /** @} */ 50 | }; 51 | 52 | } // namespace mola 53 | -------------------------------------------------------------------------------- /mola_traj_tools/src/traj_tf_right.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | int main(int argc, char** argv) 20 | { 21 | try 22 | { 23 | if (argc != 4) 24 | { 25 | std::cerr << "Usage: " << argv[0] 26 | << " INPUT.tum OUTPUT.tum \"[x y z yaw_deg pitch_deg " 27 | "roll_deg]\"" 28 | << std::endl; 29 | return 1; 30 | } 31 | 32 | const std::string sIn = argv[1]; 33 | const std::string sOut = argv[2]; 34 | const std::string sTF = argv[3]; 35 | 36 | mrpt::poses::CPose3DInterpolator pIn; 37 | pIn.loadFromTextFile_TUM(sIn); 38 | 39 | std::cout << "Loaded: " << pIn.size() << " poses.\n"; 40 | ASSERT_(!pIn.empty()); 41 | 42 | // Apply tf: 43 | const auto tf = mrpt::poses::CPose3D::FromString(sTF); 44 | std::cout << "tf: " << tf << "\n"; 45 | 46 | for (auto& [t, pose] : pIn) // 47 | pose = (mrpt::poses::CPose3D(pose) + tf).asTPose(); 48 | 49 | // save: 50 | pIn.saveToTextFile_TUM(sOut); 51 | 52 | return 0; 53 | } 54 | catch (const std::exception& e) 55 | { 56 | std::cerr << "Exception: " << e.what() << std::endl; 57 | return 1; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /mola_relocalization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco, contributors (AUTHORS.md) 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 11 | cmake_minimum_required(VERSION 3.5) 12 | 13 | # Tell CMake we'll use C++ for use in its tests/flags 14 | project(mola_relocalization LANGUAGES CXX) 15 | 16 | # MOLA CMake scripts: "mola_xxx()" 17 | find_package(mola_common REQUIRED) 18 | 19 | # find CMake dependencies: 20 | find_package(mrpt-obs REQUIRED) 21 | find_package(mrpt-maps REQUIRED) 22 | find_package(mrpt-slam REQUIRED) 23 | find_package(mp2p_icp REQUIRED) 24 | find_package(mola_pose_list REQUIRED) 25 | 26 | find_package(mola_test_datasets QUIET) # optional (for testing builds only) 27 | 28 | # ----------------------- 29 | # define lib: 30 | mola_add_library( 31 | TARGET ${PROJECT_NAME} 32 | SOURCES 33 | src/find_best_poses_se2.cpp 34 | src/RelocalizationICP_SE2.cpp 35 | src/RelocalizationLikelihood_SE2.cpp 36 | include/mola_relocalization/relocalization.h 37 | PUBLIC_LINK_LIBRARIES 38 | mrpt::obs 39 | mrpt::maps 40 | mrpt::slam 41 | mola::mp2p_icp 42 | mola::mola_pose_list 43 | # PRIVATE_LINK_LIBRARIES 44 | # mrpt::obs 45 | CMAKE_DEPENDENCIES 46 | mola_common 47 | mp2p_icp 48 | mola_pose_list 49 | mrpt-slam 50 | ) 51 | 52 | # ----------------------- 53 | # define tests: 54 | enable_testing() 55 | add_subdirectory(tests) 56 | -------------------------------------------------------------------------------- /mola_bridge_ros2/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | mola_bridge_ros2 8 | 2.3.0 9 | Bidirectional bridge ROS2-MOLA 10 | 11 | Jose-Luis Blanco-Claraco 12 | BSD-3-Clause 13 | 14 | https://github.com/MOLAorg/mola/tree/develop/mola_bridge_ros2 15 | 16 | doxygen 17 | 18 | 19 | ros_environment 20 | 21 | 22 | cmake 23 | ament_cmake_gtest 24 | ament_cmake_gmock 25 | ament_cmake 26 | 27 | geometry_msgs 28 | mola_common 29 | mola_kernel 30 | mola_msgs 31 | mrpt_libmaps 32 | mrpt_libros_bridge 33 | mrpt_nav_interfaces 34 | nav_msgs 35 | rclcpp 36 | sensor_msgs 37 | tf2 38 | tf2_geometry_msgs 39 | 40 | ament_lint_auto 41 | ament_cmake_xmllint 42 | ament_lint_cmake 43 | 44 | 45 | ament_cmake 46 | 47 | 48 | -------------------------------------------------------------------------------- /mola_pose_list/tests/test-searchable-pose-list.cpp: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------- 2 | * A Modular Optimization framework for Localization and mApping (MOLA) 3 | * 4 | * Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria 5 | * Licensed under the GNU GPL v3 for non-commercial applications. 6 | * 7 | * This file is part of MOLA. 8 | * MOLA is free software: you can redistribute it and/or modify it under the 9 | * terms of the GNU General Public License as published by the Free Software 10 | * Foundation, either version 3 of the License, or (at your option) any later 11 | * version. 12 | * 13 | * MOLA is distributed in the hope that it will be useful, but WITHOUT ANY 14 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 15 | * A PARTICULAR PURPOSE. See the GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License along with 18 | * MOLA. If not, see . 19 | * ------------------------------------------------------------------------- */ 20 | 21 | /** 22 | * @file test-searchable-pose-list.cpp 23 | * @brief Unit tests for mola_pose_list 24 | * @author Jose Luis Blanco Claraco 25 | * @date Mar 5, 2024 26 | */ 27 | 28 | #include 29 | #include 30 | 31 | #include 32 | 33 | static void test1() 34 | { 35 | // write me! 36 | } 37 | 38 | int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) 39 | { 40 | try 41 | { 42 | test1(); 43 | 44 | std::cout << "Test successful." << std::endl; 45 | } 46 | catch (std::exception& e) 47 | { 48 | std::cerr << e.what() << std::endl; 49 | return 1; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /mola_traj_tools/src/traj_tf_left.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | int main(int argc, char** argv) 20 | { 21 | try 22 | { 23 | if (argc != 4) 24 | { 25 | std::cerr << "Usage: " << argv[0] 26 | << " INPUT.tum OUTPUT.tum \"[x y z yaw_deg pitch_deg " 27 | "roll_deg]\"" 28 | << std::endl; 29 | return 1; 30 | } 31 | 32 | const std::string sIn = argv[1]; 33 | const std::string sOut = argv[2]; 34 | const std::string sTF = argv[3]; 35 | 36 | mrpt::poses::CPose3DInterpolator pIn; 37 | pIn.loadFromTextFile_TUM(sIn); 38 | 39 | std::cout << "Loaded: " << pIn.size() << " poses.\n"; 40 | ASSERT_(!pIn.empty()); 41 | 42 | auto in0 = pIn.begin()->second; 43 | 44 | // Apply tf: 45 | const auto tf = mrpt::poses::CPose3D::FromString(sTF); 46 | std::cout << "tf: " << tf << "\n"; 47 | 48 | for (auto& [t, pose] : pIn) // 49 | pose = (tf + mrpt::poses::CPose3D(pose - in0)).asTPose(); 50 | 51 | // save: 52 | pIn.saveToTextFile_TUM(sOut); 53 | 54 | return 0; 55 | } 56 | catch (const std::exception& e) 57 | { 58 | std::cerr << "Exception: " << e.what() << std::endl; 59 | return 1; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /mola_metric_maps/3rdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # A Modular Optimization framework for Localization and mApping 3 | # (MOLA) 4 | # 5 | # Copyright (C) 2018-2025, Jose Luis Blanco-Claraco. 6 | # All rights reserved. 7 | # Released under GNU GPL v3. See LICENSE file 8 | # ------------------------------------------------------------------------------ 9 | 10 | # This defines the target "tsl::robin_map" 11 | add_subdirectory(robin-map) 12 | 13 | # Install lib: 14 | install(TARGETS robin_map EXPORT robin_map-targets 15 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 16 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 17 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 18 | ) 19 | # Install hdrs: 20 | install( 21 | DIRECTORY robin-map/include/ 22 | DESTINATION ${CMAKE_INSTALL_PREFIX}/include 23 | ) 24 | 25 | # make project importable from build_dir: 26 | export( 27 | TARGETS robin_map 28 | # export to ROOT cmake directory (when building MOLA as a superproject) 29 | FILE ${CMAKE_BINARY_DIR}/robin_map-targets.cmake 30 | NAMESPACE tsl:: 31 | ) 32 | 33 | # And generate the -config.cmake file: 34 | set(ALL_DEPS_LIST "") # used in xxx-config.cmake.in 35 | set(MOLA_MODULE_NAME robin_map) 36 | configure_file( 37 | "${_MOLACOMMON_MODULE_BASE_DIR}/mola-xxx-config.cmake.in" 38 | "${CMAKE_BINARY_DIR}/robin_map-config.cmake" IMMEDIATE @ONLY 39 | ) 40 | # Install cmake config module 41 | install( 42 | EXPORT 43 | robin_map-targets 44 | DESTINATION 45 | ${CMAKE_INSTALL_LIBDIR}/robin_map/cmake 46 | ) 47 | install( 48 | FILES 49 | ${CMAKE_BINARY_DIR}/robin_map-config.cmake 50 | #${CMAKE_BINARY_DIR}/robin_map-config-version.cmake 51 | DESTINATION 52 | ${CMAKE_INSTALL_LIBDIR}/robin_map/cmake 53 | ) 54 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "C_Cpp.autoAddFileAssociations": false, 3 | "C_Cpp.doxygen.generateOnType": false, 4 | "C_Cpp.files.exclude": { 5 | "**/.git": true, 6 | "**/.vscode": true, 7 | "**/docs": true, 8 | "**/install": true, 9 | "**/log": true 10 | }, 11 | "C_Cpp.intelliSenseEngine": "disabled", 12 | "clangd.arguments": [ 13 | "--background-index", 14 | "--compile-commands-dir=${workspaceFolder}/build", 15 | "--completion-style=detailed", 16 | "--header-insertion=never", 17 | "--pretty" 18 | ], 19 | // Ensure format-on-save uses clang-format 20 | "editor.formatOnSave": true, 21 | "C_Cpp.formatting": "clangFormat", 22 | "C_Cpp.clang_format_path": "/usr/bin/clang-format-14", 23 | // Optional: enforce a specific style 24 | "C_Cpp.clang_format_style": "file", 25 | "[cpp]": { 26 | "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" 27 | }, 28 | "cSpell.allowCompoundWords": true, 29 | "cSpell.ignorePaths": [ 30 | "**/.git/objects/**", 31 | "**/.vscode", 32 | "**/build/", 33 | "**/install/", 34 | "**/log/", 35 | ".clang-tidy" 36 | ], 37 | "search.exclude": { 38 | "**/build": true, 39 | "**/install": true, 40 | "**/log": true 41 | }, 42 | "ros.distro": "humble", 43 | "cSpell.words": [ 44 | "Boxf", 45 | "Colorf", 46 | "Copiable", 47 | "eigen", 48 | "ENTYPO", 49 | "gicp", 50 | "HDOP", 51 | "Luco", 52 | "NMEA", 53 | "recolorize", 54 | "rgbd", 55 | "Velodyne" 56 | ], 57 | "cSpell.ignoreWords": [ 58 | "CPointsMapXYZIRT", 59 | "JLBC", 60 | "Laux", 61 | "rclcpp", 62 | "rosmsg" 63 | ] 64 | } -------------------------------------------------------------------------------- /mola_kernel/src/MinimalModuleContainer.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | /** 14 | * @file MinimalModuleContainer.cpp 15 | * @brief A simple module container for use without mola_launcher 16 | * @author Jose Luis Blanco Claraco 17 | * @date Dec 26, 2024 18 | */ 19 | 20 | #include 21 | 22 | namespace mola 23 | { 24 | MinimalModuleContainer::~MinimalModuleContainer() = default; 25 | 26 | void MinimalModuleContainer::installNameServer(ExecutableBase& m) 27 | { 28 | m.nameServer_ = std::bind(&MinimalModuleContainer::nameServerImpl, this, std::placeholders::_1); 29 | } 30 | 31 | ExecutableBase::Ptr MinimalModuleContainer::nameServerImpl(const std::string& name) 32 | { 33 | // Special syntax to sequentially access all existing modules: 34 | // If the requested name has the format: "[" + , return the i-th 35 | // module, or nullptr if out of range. 36 | // This is used by ExecutableBase::findService() 37 | if (name.size() >= 2 && name[0] == '[') 38 | { 39 | const auto idx = std::stoul(name.substr(1)); 40 | if (idx >= modules_.size()) 41 | { 42 | return ExecutableBase::Ptr(); 43 | } 44 | else 45 | { 46 | auto it = modules_.begin(); 47 | std::advance(it, idx); 48 | return *it; 49 | } 50 | } 51 | // non numeric search not implemented in this minimal container 52 | return ExecutableBase::Ptr(); 53 | } 54 | 55 | } // namespace mola 56 | -------------------------------------------------------------------------------- /mola_traj_tools/src/traj_rebase.cpp: -------------------------------------------------------------------------------- 1 | /* _ 2 | _ __ ___ ___ | | __ _ 3 | | '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for 4 | | | | | | | (_) | | (_| | Localization and mApping (MOLA) 5 | |_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola 6 | 7 | Copyright (C) 2018-2025 Jose Luis Blanco, University of Almeria, 8 | and individual contributors. 9 | SPDX-License-Identifier: GPL-3.0 10 | See LICENSE for full license information. 11 | */ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | int main(int argc, char** argv) 20 | { 21 | try 22 | { 23 | if (argc != 4) 24 | { 25 | std::cerr << "Usage: " << argv[0] 26 | << " INPUT.tum OUTPUT.tum \"[x y z yaw_deg pitch_deg " 27 | "roll_deg]\"" 28 | << std::endl; 29 | return 1; 30 | } 31 | 32 | const std::string sIn = argv[1]; 33 | const std::string sOut = argv[2]; 34 | const std::string sTF = argv[3]; 35 | 36 | mrpt::poses::CPose3DInterpolator pIn; 37 | pIn.loadFromTextFile_TUM(sIn); 38 | 39 | std::cout << "Loaded: " << pIn.size() << " poses.\n"; 40 | ASSERT_(!pIn.empty()); 41 | 42 | auto in0 = pIn.begin()->second; 43 | 44 | // Apply tf: 45 | const auto newStartPose = mrpt::poses::CPose3D::FromString(sTF); 46 | std::cout << "newStartPose: " << newStartPose << "\n"; 47 | 48 | auto tf = newStartPose - mrpt::poses::CPose3D(in0); 49 | 50 | for (auto& [t, pose] : pIn) // 51 | pose = (tf + mrpt::poses::CPose3D(pose)).asTPose(); 52 | 53 | // save: 54 | pIn.saveToTextFile_TUM(sOut); 55 | 56 | return 0; 57 | } 58 | catch (const std::exception& e) 59 | { 60 | std::cerr << "Exception: " << e.what() << std::endl; 61 | return 1; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /mola_demos/mola-cli-launchs/ros2_ouster_just_view.yaml: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # SLAM system definition for MOLA 3 | # This file defines: 4 | # An input sensor from a ROS 2 topic, and the MOLA Visualizer. 5 | # ----------------------------------------------------------------------------- 6 | 7 | modules: 8 | # ===================== 9 | # MolaViz 10 | # ===================== 11 | - name: viz 12 | type: mola::MolaViz 13 | #verbosity_level: DEBUG 14 | params: ~ # none 15 | 16 | # Offline or online sensory data sources ===================== 17 | - type: mola::BridgeROS2 18 | name: dataset_input 19 | # In BridgeROS2, this execution rate (Hz) determines the 20 | # rate of publishing odometry observations, if enabled. 21 | # All other subscribed sensors are forwarded to the MOLA 22 | # system without delay as they are received from ROS. 23 | execution_rate: 20 # Hz 24 | #verbosity_level: INFO 25 | gui_preview_sensors: 26 | - raw_sensor_label: lidar 27 | decimation: 1 28 | win_pos: 5 5 400 400 29 | params: 30 | base_link_frame: base_link 31 | odom_frame: odom 32 | 33 | # If true, the /tf 'odom_frame'->'base_link_frame' will be forwarded to MOLA as CObservationOdometry. 34 | forward_ros_tf_as_mola_odometry_observations: false 35 | 36 | subscribe: 37 | - topic: ${MOLA_LIDAR_TOPIC|/ouster/points} 38 | msg_type: PointCloud2 39 | output_sensor_label: ${MOLA_LIDAR_NAME|lidar} 40 | # If present, this will override whatever /tf tells about the sensor pose: 41 | fixed_sensor_pose: "0 0 0 0 0 0" # 'x y z yaw_deg pitch_deg roll_deg'' 42 | use_fixed_sensor_pose: ${MOLA_USE_FIXED_LIDAR_POSE|false} 43 | 44 | - topic: /odom 45 | msg_type: Odometry 46 | output_sensor_label: odom 47 | --------------------------------------------------------------------------------