template class CGraphSlamHandler

Overview

Manage variables and methods related to applications executing graphSLAM using the mrpt-graphslam API.

CGraphSlamHandler class instances deal with the following:

  • Manage user interaction with the visuals (e.g. CDisplayWindow instance)

  • Manage general user options (e.g. user output directory preferences)

#include <mrpt/graphslam/apps_related/CGraphSlamHandler.h>

template <class GRAPH_T = mrpt::graphs::CNetworkOfPoses2DInf>
class CGraphSlamHandler
{
public:
    // construction

    CGraphSlamHandler(
        mrpt::system::COutputLogger* logger,
        mrpt::graphslam::apps::TUserOptionsChecker<GRAPH_T>* options_checker,
        const bool enable_visuals = true
        );

    // methods

    void getParamsAsString(std::string* str) const;
    std::string getParamsAsString() const;

    void setFNames(
        const std::string& ini_fname,
        const std::string& rawlog_fname,
        const std::string& ground_truth_fname = std::string()
        );

    void printParams() const;
    void initVisualization();
    void execute();

    void initEngine(
        const std::string& node_reg_str,
        const std::string& edge_reg_str,
        const std::string& optimizer_str
        );

    void setResultsDirName(const std::string& dirname);
};

Methods

void getParamsAsString(std::string* str) const

Fetch the general configuraiton variables for the current graphSLAM execution.

void setFNames(
    const std::string& ini_fname,
    const std::string& rawlog_fname,
    const std::string& ground_truth_fname = std::string()
    )

Set the relevant filenames for instantiating CGraphSlamEngine instance.

void printParams() const

Print in a formatted manner the general configuraiton variables for the current graphSLAM execution.

See also:

readConfigFname, getParamsAsString

void initVisualization()

Initialize visualization (e.g.

the CDisplayWindow instance that shows the overall graphSLAM execution)

void execute()

Method to be called for parsing the rawlog file provided and for running graphSLAM using that information.

void setResultsDirName(const std::string& dirname)

Override the results directory filename that was initially set in the .ini file.