Main MRPT website > C++ reference for MRPT 1.9.9
CHierarchicalMHMap.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CHierarchicalMHMap_H
10 #define CHierarchicalMHMap_H
11 
15 #include <mrpt/maps/CSimpleMap.h>
18 
19 namespace mrpt
20 {
21 namespace hmtslam
22 {
23 /** The most high level class for storing hybrid, multi-hypothesis maps in a
24  * graph-based model.
25  * This class is used within the HMT-SLAM implementation in CHMTSLAM.
26  * \sa CHMTSLAM, CHMHMapArc, CHMHMapNode, CHierarchicalMHMapPartition
27  * \ingroup mrpt_hmtslam_grp
28  */
31 {
32  friend class CHMHMapArc;
33  friend class CHMHMapNode;
34 
36  protected:
37  /** Event handler to be called just after a node has being created: it will
38  * be added to the internal list.
39  */
40  void onNodeAddition(CHMHMapNode::Ptr& node);
41 
42  /** Event handler to be called just after an arc has being created: it will
43  * be added to the internal list.
44  */
45  void onArcAddition(CHMHMapArc::Ptr& arc);
46 
47  /** Event handler to be called just before a node is being destroyed: it
48  * will be removed from the internal list.
49  * \note At *addition we use a smart pointer to assure all the implied guys
50  * use the same smrt. pnt., but at destructors the objects don't know
51  * anything but "this", thus the usage of plain pointers.
52  */
53  void onNodeDestruction(CHMHMapNode* node);
54 
55  /** Event handler to be called just before an arc is being destroyed: it
56  * will be removed from the internal list.
57  * \note At *addition we use a smart pointer to assure all the implied guys
58  * use the same smrt. pnt., but at destructors the objects don't know
59  * anything but "this", thus the usage of plain pointers.
60  */
61  void onArcDestruction(CHMHMapArc* arc);
62 
63  public:
64  /** Default constructor
65  */
67 
68  /** Destructor
69  */
70 
71  /** Save the whole graph as a XML file */
72  void dumpAsXMLfile(std::string fileName) const;
73 
74  /** Load a graph from a XML file */
75  void loadFromXMLfile(std::string fileName);
76 
77  virtual ~CHierarchicalMHMap();
78 
79  /** Erase all the contents of map (It delete all nodes/arcs objects)
80  */
81  void clear();
82 
83 }; // End of class def.
84 
85 } // End of namespace
86 } // End of namespace
87 
88 #endif
mrpt::hmtslam::CHierarchicalMHMap::clear
void clear()
Erase all the contents of map (It delete all nodes/arcs objects)
Definition: CHierarchicalMHMap.cpp:37
mrpt::hmtslam::CHierarchicalMHMap::~CHierarchicalMHMap
virtual ~CHierarchicalMHMap()
Definition: CHierarchicalMHMap.cpp:33
mrpt::hmtslam::CHierarchicalMHMap::onArcAddition
void onArcAddition(CHMHMapArc::Ptr &arc)
Event handler to be called just after an arc has being created: it will be added to the internal list...
Definition: CHierarchicalMHMap.cpp:145
mrpt::hmtslam::CHMHMapArc::Ptr
std::shared_ptr< CHMHMapArc > Ptr
Definition: CHMHMapArc.h:38
CHMHMapNode.h
CMultiMetricMap.h
mrpt::hmtslam::CHMHMapNode
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:36
mrpt::hmtslam::CHierarchicalMHMap::onNodeDestruction
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it will be removed from the interna...
Definition: CHierarchicalMHMap.cpp:100
CHierarchicalMapMHPartition.h
mrpt::hmtslam::CHierarchicalMHMap::onNodeAddition
void onNodeAddition(CHMHMapNode::Ptr &node)
Event handler to be called just after a node has being created: it will be added to the internal list...
Definition: CHierarchicalMHMap.cpp:124
mrpt::hmtslam::CHierarchicalMHMap::dumpAsXMLfile
void dumpAsXMLfile(std::string fileName) const
Destructor.
Definition: CHierarchicalMHMap.cpp:264
mrpt::hmtslam::CHierarchicalMHMap::loadFromXMLfile
void loadFromXMLfile(std::string fileName)
Load a graph from a XML file.
Definition: CHierarchicalMHMap.cpp:157
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::hmtslam::CHierarchicalMHMap::CHierarchicalMHMap
CHierarchicalMHMap()
Default constructor.
Definition: CHierarchicalMHMap.cpp:29
mrpt::serialization::CSerializable
The virtual base class which provides a unified interface for all persistent objects in MRPT.
Definition: CSerializable.h:32
mrpt::hmtslam::CHMHMapArc
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map.
Definition: CHMHMapArc.h:31
CHMHMapArc.h
mrpt::hmtslam::CHMHMapNode::Ptr
std::shared_ptr< CHMHMapNode > Ptr
Definition: CHMHMapNode.h:42
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::hmtslam::CHierarchicalMHMap::onArcDestruction
void onArcDestruction(CHMHMapArc *arc)
Event handler to be called just before an arc is being destroyed: it will be removed from the interna...
Definition: CHierarchicalMHMap.cpp:113
string
GLsizei const GLchar ** string
Definition: glext.h:4101
CSerializable.h
CSimpleMap.h
mrpt::hmtslam::CHierarchicalMHMap
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model.
Definition: CHierarchicalMHMap.h:29
mrpt::hmtslam::CHierarchicalMapMHPartition
Represents a set of nodes and arcs, posibly only a part of the whole hierarchical,...
Definition: CHierarchicalMapMHPartition.h:39



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST