MRPT  2.0.4
CRegistrationDeciderOrOptimizer_impl.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 namespace mrpt::graphslam
13 {
14 template <class GRAPH_T>
16  std::string(80, '-');
17 template <class GRAPH_T>
19  std::string(2, '\n');
20 
21 template <class GRAPH_T>
23  const std::string& name)
24 {
25  this->setClassName(name); // all the names in one call
26  this->logging_enable_keep_record = true;
27 
28  // just for the messages until reading the actual verbosity level, set it to
29  // debug.
31  MRPT_LOG_DEBUG_STREAM("Initialized time, output logger instances.");
32 }
33 
34 template <class GRAPH_T>
36  const std::string& name)
37 {
38  this->m_class_name = name;
39  this->m_time_logger.setName(this->m_class_name);
40  this->setLoggerName(this->m_class_name);
41 }
42 
43 template <class GRAPH_T>
46 {
47  ASSERTDEB_(win_manager);
48  m_win_manager = win_manager;
49 
50  if (m_win_manager)
51  {
52  m_win = m_win_manager->win;
53  m_win_observer = m_win_manager->observer;
54  }
55 }
56 
57 template <class GRAPH_T>
59  std::mutex* graph_section)
60 {
61  m_graph_section = graph_section;
62  this->logFmt(
63  mrpt::system::LVL_DEBUG, "Fetched the CCRiticalSection successfully");
64 }
65 
66 template <class GRAPH_T>
68 {
69  this->assertVisualsVars();
70  m_initialized_visuals = true;
71 }
72 
73 template <class GRAPH_T>
75 {
76  ASSERTDEBMSG_(this->m_win, "No CDisplayWindow3D* was provided");
77  ASSERTDEBMSG_(this->m_win_manager, "No CWindowManager* was provided");
78  ASSERTDEBMSG_(this->m_win_observer, "No CWindowObserver* was provided");
79 }
80 
81 template <class GRAPH_T>
83 {
84  ASSERTDEB_(m_initialized_visuals);
85 }
86 
87 template <class GRAPH_T>
89  const std::map<std::string, bool>& events_occurred)
90 {
91  ASSERTDEB_(m_initialized_visuals);
92 }
93 
94 template <class GRAPH_T>
96  const std::string& source_fname)
97 {
98  MRPT_LOG_DEBUG_STREAM("Loading corresponding parameters");
99 }
100 
101 template <class GRAPH_T>
103 {
104  MRPT_LOG_DEBUG_STREAM("Printing corresponding parameters");
105 }
106 
107 template <class GRAPH_T>
109  std::string* report_str) const
110 {
111  MRPT_LOG_DEBUG_STREAM("Generating corresponding report");
112  // TODO - give the compact form here!
113 }
114 
115 template <class GRAPH_T>
117 {
118  m_graph = graph;
119  MRPT_LOG_DEBUG_STREAM("Fetched the graph pointer successfully");
120 }
121 
122 template <class GRAPH_T>
124 {
125  return is_mr_slam_class;
126 }
127 } // namespace mrpt::graphslam
virtual void notifyOfWindowEvents(const std::map< std::string, bool > &events_occurred)
Get a list of the window events that happened since the last call.
virtual void loadParams(const std::string &source_fname)
Load the necessary for the decider/optimizer configuration parameters.
app setMinLoggingLevel(mrpt::system::LVL_ERROR)
virtual void printParams() const
Print the problem parameters - relevant to the decider/optimizer to the screen in a unified/compact w...
static const std::string header_sep
Separator string to be used in debugging messages.
virtual void setCriticalSectionPtr(std::mutex *graph_section)
Fetch a std::mutex for locking the GRAPH_T resource.
virtual void setGraphPtr(GRAPH_T *graph)
Fetch the graph on which the decider/optimizer will work on.
SLAM methods related to graphs of pose constraints.
mrpt::gui::CDisplayWindow3D * win
CDisplayWindow instance.
virtual void initializeVisuals()
Initialize visual objects in CDisplayWindow (e.g.
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
virtual void initializeLoggers(const std::string &name)
Initialize the COutputLogger, CTimeLogger instances given the name of the decider/optimizer at hand...
virtual void setWindowManagerPtr(mrpt::graphslam::CWindowManager *win_manager)
Fetch a CWindowManager pointer.
#define MRPT_LOG_DEBUG_STREAM(__CONTENTS)
Use: MRPT_LOG_DEBUG_STREAM("Var=" << value << " foo=" << foo_var);
virtual void assertVisualsVars()
Handy function for making all the visuals assertions in a compact manner.
#define ASSERTDEBMSG_(f, __ERROR_MSG)
Definition: exceptions.h:191
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
Definition: exceptions.h:190
virtual void updateVisuals()
Update the relevant visual features in CDisplayWindow.
Class acts as a container for storing pointers to mrpt::gui::CDisplayWindow3D, mrpt::graphslam::CWind...



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020