[mrpt-apps]

Overview

Applications library

Library mrpt-apps

This C++ library is part of MRPT and can be installed in Debian-based systems with:

sudo apt install libmrpt-libapps-cli-dev libmrpt-libapps-gui-dev

Read also how to import MRPT into your CMake scripts.

This library contains library wrappers for ready-to-use applications, for easy integration into final programs, test suites, etc.

Overview

Each class here is the full implementation of one MRPT program (for example, icp-slam is just a main() creating an mrpt::apps::ICP_SLAM_App_Rawlog). Use them to run those algorithms from your own programs or tests, change their parameters programmatically, and read their results back without parsing output files.

The classes, all in the namespace mrpt::apps, are split into two packages:

  • mrpt_libapps_cli (headers <mrpt/apps_cli/...>, CMake target mrpt::mrpt_libapps_cli): dataset tools without GUI dependencies.

  • mrpt_libapps_gui (headers <mrpt/apps_gui/...>, CMake target mrpt::mrpt_libapps_gui): SLAM and localization apps, which can show their progress in 3D windows.

Key classes

The typical usage is: initialize(argc, argv) with the same arguments as the command-line program, optionally modify the public parameters (e.g. the INI contents in params), then call run().

Example: running ICP-SLAM from a program

#include <mrpt/apps_gui/ICP_SLAM_App.h>

int main(int argc, char** argv)
{
  // Takes the same command-line arguments as the icp-slam program:
  mrpt::apps::ICP_SLAM_App_Rawlog app;
  app.initialize(argc, argv);
  // `app.params` holds the loaded INI parameters, and can be modified here.
  app.run();

  for (const auto& [t, pose] : app.out_estimated_path)
  {
    std::cout << mrpt::Clock::toDouble(t) << " " << pose << "\n";
  }
}

Library contents

// classes

class mrpt::apps::BaseAppDataSource;
class mrpt::apps::BaseAppInitializableCLI;
class mrpt::apps::CRawlogProcessor;
class mrpt::apps::DataSourceRawlog;
class mrpt::apps::ICP_SLAM_App_Base;
class mrpt::apps::KFSLAMApp;
class mrpt::apps::MonteCarloLocalization_Base;
class mrpt::apps::MonteCarloLocalization_Rawlog;
class mrpt::apps::RBPF_SLAM_App_Base;
class mrpt::apps::RawlogEditApp;
class mrpt::apps::RawlogGrabberApp;

// global functions

void mrpt::apps::registerAllClasses_mrpt_apps();
mrpt::hwdrivers::CCameraSensor::Ptr mrpt::apps::prepareVideoSourceFromPanel(void* panel);

Global Functions

void mrpt::apps::registerAllClasses_mrpt_apps()

Forces manual RTTI registration of all serializable classes in this namespace.

Should never be required to be explicitly called by users, except if building MRPT as a static library.

mrpt::hwdrivers::CCameraSensor::Ptr mrpt::apps::prepareVideoSourceFromPanel(void* panel)

Used only from MRPT apps: Use with caution since “panel” MUST be a “mrpt::gui::CPanelCameraSelection *”.