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