Skip to content

Commit

Permalink
Merge remote-tracking branch 'remote2/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 15, 2023
2 parents fa63ff6 + 534e52e commit ffbacf6
Show file tree
Hide file tree
Showing 16 changed files with 2,345 additions and 0 deletions.
198 changes: 198 additions & 0 deletions docs/module-mola-launcher.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
.. _mola-launcher:

======================
Module: mola-launcher
======================

.. toctree::
:maxdepth: 2

----

.. index::
single: mola-cli

.. _mola_cli:

Application: ``mola-cli``
##########################

``mola-cli`` is the most-common entry point to the MOLA system for users.
Refer to :ref:`demos` for real examples to launch and run SLAM systems.

-------------
SYNOPSIS
-------------

.. code-block:: none
USAGE:
mola-cli [--list-module-shared-dirs] [--list-modules]
[--rtti-children-of <mp2p_icp::ICP_Base>] [--rtti-list-all]
[--profiler-whole] [-p] [-v <INFO>] [-c <demo.yml>] [--]
[--version] [-h]
Where:
--list-module-shared-dirs
Finds all MOLA module source/shared directories, then list them. Paths
can be added with the environment variable MOLA_MODULES_SHARED_PATH.
--list-modules
Loads all MOLA modules, then list them. It also shows the list of
paths in which the program looks for module dynamic libraries, then
exits.
--rtti-children-of <mp2p_icp::ICP_Base>
Loads all MOLA modules, then list all known classes that inherit from
the given one, and exits.
--rtti-list-all
Loads all MOLA modules, then list all classes registered via
mrpt::rtti, and exits.
--profiler-whole
Enable whole-history time profiler in all modules (Default: NO). **DO
NOT** use in production, only to benchmark short runs (unbounded
memory usage)
-p, --profiler
Enable time profiler by default in all modules (Default: NO)
-v <INFO>, --verbosity <INFO>
Verbosity level: ERROR|WARN|INFO|DEBUG (Default: INFO)
-c <demo.yml>, --config <demo.yml>
Input YAML config file (required) (*.yml)
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
Notes:

- Finer-control of the verbosity for individual modules is possible by using the `verbosity` variable in the YAML launch file, see: :ref:`yaml_slam_cfg_file`.

Example: Launching a SLAM system with performance details at end:

.. code-block:: none
mola-cli -c kitti_lidar_slam.yml -p
Example: To list all known ICP algorithms:

.. code-block:: none
mola-cli --rtti-children-of mp2p_icp::ICP_Base
Listing children of class: mp2p_icp::ICP_Base
mp2p_icp::ICP_GaussNewton
mp2p_icp::ICP_Horn_MultiCloud
mp2p_icp::ICP_OLAE
----

.. index::
single: mola-dir

.. _mola_dir:

Application: ``mola-dir``
##########################

``mola-dir`` is a CLI program that finds the shared directory
(see :ref:`concepts_module_shared_dir`) of a module.
It is most-commonly useful inside evaluation expression of MOLA definition files (:ref:`yaml_slam_cfg_file`).

-------------
SYNOPSIS
-------------

.. code-block:: none
USAGE:
mola-dir <module_name>
Note: To list all known shared directories of modules, use:

.. code-block:: none
mola-cli --list-module-shared-dirs
----

.. index::
single: mola-yaml-parser

.. _mola_yaml_parser:

Application: ``mola-yaml-parser``
###################################

``mola-yaml-parser`` is a CLI program that parses YAML files using MOLA-specific
extensions (see :ref:`yaml_extensions`), and outputs the result to ``cout``.

-------------
SYNOPSIS
-------------

.. code-block:: none
USAGE:
mola-yaml-parser [--no-env-vars] [--no-cmd-runs] [--no-includes] [--]
[--version] [-h] <YAML files>
Where:
--no-env-vars
Disables solving YAML `${xxx}`s (Default: NO)
--no-cmd-runs
Disables solving YAML `$(cmd)`s (Default: NO)
--no-includes
Disables solving YAML `$include{}`s (Default: NO)
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<YAML files>
(required) Input YAML file (required) (*.yml)
Example:

.. code-block:: none
mola-yaml-parser --no-env-vars demos/kitti_lidar_slam.yml
----

.. index::
module: mola-launcher

C++ library: `mola-launcher`
#############################

See :ref:`mp2p_icp_grp`.
83 changes: 83 additions & 0 deletions mola_launcher/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Language: Cpp
BasedOnStyle: Google
# ---
#AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak # Values: Align, DontAlign, AlwaysBreak
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
#AlignEscapedNewlinesLeft: true
#AlignOperands: false
AlignTrailingComments: false # Should be off, causes many dummy problems!!
#AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
#AllowShortCaseLabelsOnASingleLine: false
#AllowShortFunctionsOnASingleLine: Empty
#AllowShortIfStatementsOnASingleLine: false
#AllowShortLoopsOnASingleLine: false
#AlwaysBreakAfterDefinitionReturnType: None
#AlwaysBreakAfterReturnType: None
#AlwaysBreakBeforeMultilineStrings: true
#AlwaysBreakTemplateDeclarations: true
#BinPackArguments: false
#BinPackParameters: false
#BraceWrapping:
#AfterClass: false
#AfterControlStatement: false
#AfterEnum: false
#AfterFunction: false
#AfterNamespace: false
#AfterObjCDeclaration: false
#AfterStruct: false
#AfterUnion: false
#BeforeCatch: false
#BeforeElse: true
#IndentBraces: false
#BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
#BreakBeforeTernaryOperators: true
#BreakConstructorInitializersBeforeComma: false
ColumnLimit: 80
#CommentPragmas: ''
#ConstructorInitializerAllOnOneLineOrOnePerLine: true
#ConstructorInitializerIndentWidth: 4
#ContinuationIndentWidth: 4
#Cpp11BracedListStyle: true
#DerivePointerAlignment: false
#DisableFormat: false
#ExperimentalAutoDetectBinPacking: false
##FixNamespaceComments: true # Not applicable in 3.8
#ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
#IncludeCategories:
#- Regex: '.*'
#Priority: 1
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: true
#KeepEmptyLinesAtTheStartOfBlocks: true
#MacroBlockBegin: ''
#MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
#PenaltyBreakBeforeFirstCallParameter: 19
#PenaltyBreakComment: 300
#PenaltyBreakFirstLessLess: 120
#PenaltyBreakString: 1000
#PenaltyExcessCharacter: 1000000
#PenaltyReturnTypeOnItsOwnLine: 200
DerivePointerAlignment: false
#PointerAlignment: Left
ReflowComments: true # Should be true, otherwise clang-format doesn't touch comments
SortIncludes: true
#SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
#SpaceBeforeParens: ControlStatements
#SpaceInEmptyParentheses: false
#SpacesBeforeTrailingComments: 2
#SpacesInAngles: false
#SpacesInContainerLiterals: true
#SpacesInCStyleCastParentheses: false
#SpacesInParentheses: false
#SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never # Available options are Never, Always, ForIndentation
13 changes: 13 additions & 0 deletions mola_launcher/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package mola_launcher
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.2.2 (2023-09-08)
------------------
* First complete public release
* Contributors: Jose Luis Blanco-Claraco

0.2.1 (2018-12-17)
------------------
* Initial commit
* Contributors: Jose Luis Blanco-Claraco
50 changes: 50 additions & 0 deletions mola_launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ------------------------------------------------------------------------------
# A Modular Optimization framework for Localization and mApping
# (MOLA)
#
# Copyright (C) 2018-2023, Jose Luis Blanco-Claraco, contributors (AUTHORS.md)
# All rights reserved.
# Released under GNU GPL v3. See LICENSE file
# ------------------------------------------------------------------------------

# Minimum CMake vesion: limited by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
cmake_minimum_required(VERSION 3.4)

# Tell CMake we'll use C++ for use in its tests/flags
project(mola_launcher LANGUAGES CXX)

# MOLA CMake scripts: "mola_xxx()"
find_package(mola_common REQUIRED)

# find dependencies:
find_package(mrpt-core)

find_mola_package(mola_kernel)

# -----------------------
# define lib:
file(GLOB_RECURSE LIB_SRCS src/*.cpp src/*.h)
file(GLOB_RECURSE LIB_PUBLIC_HDRS include/*.h)


mola_add_library(
TARGET ${PROJECT_NAME}
SOURCES ${LIB_SRCS} ${LIB_PUBLIC_HDRS}
PUBLIC_LINK_LIBRARIES
mrpt::core
mola_kernel
PRIVATE_LINK_LIBRARIES
${CMAKE_DL_LIBS} # To be able to load DLLs/.so's
CMAKE_DEPENDENCIES
mola_kernel
)

target_compile_definitions(${PROJECT_NAME}
PRIVATE
BUILDTIME_MOLA_MODULES_LIB_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
# Use top-level source directory:
BUILDTIME_MOLA_MODULES_SHARED_PATH="${CMAKE_SOURCE_DIR}/modules"
)

# apps:
add_subdirectory(apps)
Loading

0 comments on commit ffbacf6

Please sign in to comment.