MRPT  1.9.9
CHMHMapArc.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 CHMHMapArc_H
10 #define CHMHMapArc_H
11 
12 #include <mrpt/obs/CSensoryFrame.h>
15 
16 namespace mrpt::hmtslam
17 {
18 class CHierarchicalMHMap;
19 
20 /** A class for representing an arc between two nodes in a hierarchical,
21  * multi-hypothesis map.
22  * The arc itself will be considered only if some given hypothesisID matchs
23  * its own ID.
24  * \note Create objects by invoking the class factory "::Create"
25  *
26  * \sa CHierarchicalMHMap,CHMHMapNode
27  * \ingroup mrpt_hmtslam_grp
28  */
30 {
31  friend class CHierarchicalMHMap;
32  friend class CHMHMapNode;
34  friend class TArcList;
35 
37 
38  public:
39  /** The hypothesis IDs under which this arc exists.
40  */
42 
43  protected:
44  /** The origin/target nodes for this arc.
45  */
47 
48  /** The hierarchical graph in which this object is into. */
50 
51  /** Event handler to be called just before a node is being destroyed: it
52  * should be called only for nodes involved in the arc, altought other cases
53  * must be handled without effects
54  * When a node involved in the arc is delected, the corresponding pointer
55  * in the arc will be set to nullptr and the arc is no longer a valid one.
56  */
57  void onNodeDestruction(CHMHMapNode* node);
58 
59  public:
60  /** Private constructor (see ::Create class factory)
61  */
62  CHMHMapArc(
63  const CHMHMapNode::TNodeID& from = 0,
64  const CHMHMapNode::TNodeID& to = 0,
65  const THypothesisIDSet& hyps = THypothesisIDSet(),
66  CHierarchicalMHMap* parent = nullptr);
67 
68  /** Alternative constructor, using pointers for convenience.
69  */
70  CHMHMapArc(
72  const THypothesisIDSet& hyps, CHierarchicalMHMap* parent);
73 
74  /** Destructor
75  */
76  virtual ~CHMHMapArc();
77 
78  /** Return the starting node of the arc:
79  */
81  {
83  return m_nodeFrom;
84  }
85 
86  /** Return the ending node of the arc:
87  */
89  {
91  return m_nodeTo;
92  }
93 
94  /** The type of the arc, the possibilities are:
95  - "Membership": for abstractions
96  - "Navegability"
97  - "RelativePose"
98  */
100 
101  /** The annotations of the arc, see the general description of the class for
102  * possible properties and values.
103  */
105 
106 }; // End of class def.
107 
108 }
109 #endif
110 
111 
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
Definition: CHMHMapArc.h:41
mrpt::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
Definition: CHMHMapArc.h:49
Represents a set of nodes and arcs, posibly only a part of the whole hierarchical, multi-hypothesis map.
mrpt::graphs::TNodeID TNodeID
The type of the IDs of nodes.
Definition: CHMHMapNode.h:45
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
CHMHMapNode::TNodeID m_nodeTo
Definition: CHMHMapArc.h:46
#define AREAID_INVALID
CHMHMapNode::TNodeID getNodeFrom() const
Return the starting node of the arc:
Definition: CHMHMapArc.h:80
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
Definition: CHMHMapArc.h:46
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
CHMHMapArc(const CHMHMapNode::TNodeID &from=0, const CHMHMapNode::TNodeID &to=0, const THypothesisIDSet &hyps=THypothesisIDSet(), CHierarchicalMHMap *parent=nullptr)
Private constructor (see ::Create class factory)
Definition: CHMHMapArc.cpp:21
std::string m_arcType
The type of the arc, the possibilities are:
Definition: CHMHMapArc.h:99
CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
Definition: CHMHMapArc.h:104
virtual ~CHMHMapArc()
Destructor.
Definition: CHMHMapArc.cpp:59
A wrapper class for pointers that can be safely copied with "=" operator without problems.
Definition: safe_pointers.h:71
GLsizei const GLchar ** string
Definition: glext.h:4101
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable ...
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
Definition: CHMHMapArc.h:29
A class for storing a sequence of arcs (a path).
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:34
CHMHMapNode::TNodeID getNodeTo() const
Return the ending node of the arc:
Definition: CHMHMapArc.h:88
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...
Definition: CHMHMapArc.cpp:74



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020