class mrpt::apps::KFSLAMApp

Overview

EKF-SLAM application wrapper class.

See also:

mrpt::slam::CRangeBearingKFSLAM2D, mrpt::slam::CRangeBearingKFSLAM

#include <mrpt/apps_gui/KFSLAMApp.h>

class KFSLAMApp: public mrpt::system::COutputLogger
{
public:
    // fields

    mrpt::config::CConfigFileMemory params;
    std::string rawlogFileName;
    double loc_error_wrt_gt = 0;

    // construction

    KFSLAMApp();

    // methods

    void initialize(int argc, const char** argv);

    void initialize(
        int argc,
        char** argv
        );

    void run();
};

Inherited Members

public:
    // structs

    struct TMsg;

    // fields

    bool logging_enable_console_output {true};
    bool logging_enable_keep_record {false};

    // methods

    void logStr(const VerbosityLevel level, std::string_view msg_str) const;
    void logFmt(const VerbosityLevel level, const char* fmt, ...) const;
    void void logCond(const VerbosityLevel level, bool cond, const std::string& msg_str) const;
    void setLoggerName(const std::string& name);
    std::string getLoggerName() const;
    void setVerbosityLevel(const VerbosityLevel level);
    void setVerbosityLevelForCallbacks(const VerbosityLevel level);
    void setMinLoggingLevel(const VerbosityLevel level);
    VerbosityLevel getMinLoggingLevel() const;
    VerbosityLevel getMinLoggingLevelForCallbacks() const;
    bool isLoggingLevelVisible(VerbosityLevel level) const;
    void getLogAsString(std::string& log_contents) const;
    std::string getLogAsString() const;
    void writeLogToFile(const std::optional<std::string>& fname_in = std::nullopt) const;
    void dumpLogToConsole() const;
    std::string getLoggerLastMsg() const;
    void getLoggerLastMsg(std::string& msg_str) const;
    void loggerReset();
    void logRegisterCallback(output_logger_callback_t userFunc);
    bool logDeregisterCallback(output_logger_callback_t userFunc);
    COutputLogger& operator = (const COutputLogger&);
    COutputLogger& operator = (COutputLogger&&);
    static std::array<mrpt::system::ConsoleForegroundColor, NUMBER_OF_VERBOSITY_LEVELS>& logging_levels_to_colors();
    static const std::array<const char*, NUMBER_OF_VERBOSITY_LEVELS>& logging_levels_to_names();

Fields

mrpt::config::CConfigFileMemory params

Populated in initialize().

Can be replaced or manipulated by the user after that and before run() to change the parameters loaded from INI file.

std::string rawlogFileName

rawlog to process

double loc_error_wrt_gt = 0

Average localization error, when supplied with a ground-truth file.

Methods

void initialize(int argc, const char** argv)

Initializes the application from CLI parameters.

Refer to the manpage of kf-slam. Throws on errors.

void run()

Runs with the current parameter set.

Throws on errors.