Class MolaLauncherApp
Defined in File MolaLauncherApp.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public mrpt::system::COutputLogger
Class Documentation
-
class MolaLauncherApp : public mrpt::system::COutputLogger
Main launcher for a MOLA system. See mola-cli for a ready-to-use program.
SLAM system setup
-
void setup(const mrpt::containers::yaml &cfg, const std::optional<std::string> &basePath = std::nullopt)
Prepares the SLAM system based on a YAML configuration file. See [mola]/demos/ for example YAML files. At this point, MOLA module libraries are searched in a list of paths and loaded for their classes to be available in name-based class factories. Modules must be named “libmola*” to be loaded.
See also
-
void spin()
(Blocking call) Launch sensor and worker threads and enters into an infinite loop executing the SLAM system, until shutdown() is called (e.g. from another thread or a signal handler).
MOLA module listing, paths, finding, etc.
-
void addPathModuleLibs(const std::string &path)
Adds a directory to the list of paths to search for MOLA modules (.so/.dll) when setup() is called. The environment variable MOLA_MODULES_LIB_PATH (
path1[:path2[:...]]
) is automatically added at class construction.Note
Default is
CMAKE_LIBRARY_OUTPUT_DIRECTORY
.
-
void addPathModuleSources(const std::string &path)
Adds a directory to the list of paths to search for MOLA module source and shared files. The environment variable MOLA_MODULES_SHARED_PATH (
path1[:path2[:...]]
) is automatically added at class construction.Note
Default is
${MOLA_SOURCE_DIR}/modules/
-
inline std::vector<std::string> getModuleLibPaths() const
Returns a copy of the current list of paths in which this object will try to look for MOLA modules compiled binaries.
See also
-
inline std::vector<std::string> getModuleSourcePaths() const
Returns a copy of the current list of paths in which this object will try to look for MOLA modules shared files.
See also
-
std::vector<std::string> getLoadedModules()
Returns the current list of loaded module dynamic libraries.
Returns the absolute path of the root directory where the given module shared files can be found. For BUILD_INTERFACE, this should be the root of each repository source. For INSTALL_INTERFACE, it should be <INSTALL_PREFIX>/share/<MODULE_NAME>/
Returns an empty string if module is not found.
See also
scanForModuleSharedDirectories() to search for all module paths.
Public Functions
-
MolaLauncherApp()
-
virtual ~MolaLauncherApp()
-
void scanAndLoadLibraries()
Scans and loads MOLA module libraries. This is automatically called within setup(), but it’s provided here in case a user want to only load modules for use the RTTI machinery on them without setting up a complete SLAM system.
See also
Scans the shared directories and returns a list with found modules and their shared directory.
Public Members
-
mrpt::system::CTimeLogger profiler_ = {true, "MolaLauncherApp"}
Time profiler. It’s enabled/disabled status will be inherited (by default, unless set otherwise in their YAML config files) by all modules created upon the call to setup()
-
std::optional<ProfilerSaverAtDtor> profiler_dtor_save_stats_
Enabled from mola-cli with
--profiler-whole
to save full profile stats to .m files at program end.
-
Parameters launcher_params_
-
void setup(const mrpt::containers::yaml &cfg, const std::optional<std::string> &basePath = std::nullopt)