template class mrpt::graphslam::optimizers::CGraphSlamOptimizer
Overview
Interface for implementing graphSLAM optimizer classes.
Class should provide a generic interface from which real optimizers should inherit so that they abide to the necessary method calls used in the CGraphSlamEngine class. For an example of inheriting from this class see CLevMarqGSO.
As a naming convention, all the implemented graphslam optimizer classes are suffixed with the GSO acronym.
#include <mrpt/graphslam/interfaces/CGraphSlamOptimizer.h> template <class GRAPH_t = typename mrpt::graphs::CNetworkOfPoses2DInf> class CGraphSlamOptimizer: public mrpt::graphslam::CRegistrationDeciderOrOptimizer { public: // typedefs typedef typename GRAPH_t::constraint_t constraint_t; typedef typename GRAPH_t::constraint_t::type_value pose_t; // construction CGraphSlamOptimizer(); // methods virtual bool justFullyOptimizedGraph() const; }; // direct descendants template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf> class CEmptyGSO; template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf> class CLevMarqGSO;
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(); virtual bool updateState(mrpt::obs::CActionCollection::Ptr action, mrpt::obs::CSensoryFrame::Ptr observations, mrpt::obs::CObservation::Ptr observation) = 0; virtual void setWindowManagerPtr(mrpt::graphslam::CWindowManager* win_manager); virtual void setCriticalSectionPtr(std::mutex* graph_section); virtual void initializeVisuals(); virtual void updateVisuals(); virtual void notifyOfWindowEvents(const std::map<std::string, bool>& events_occurred); virtual void loadParams(const std::string& source_fname); virtual void printParams() const; virtual void getDescriptiveReport(std::string* report_str) const; virtual void setGraphPtr(GRAPH_T* graph); virtual void initializeLoggers(const std::string& name); virtual void setClassName(const std::string& name); bool isMultiRobotSlamClass(); std::string getClassName() const;
Methods
virtual bool justFullyOptimizedGraph() const
Used by the caller to query for possible full graph optimization on the latest optimizer run.