Main MRPT website > C++ reference for MRPT 1.4.0
HMT_SLAM_common.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-2016, 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 HMT_SLAM_common_H
10#define HMT_SLAM_common_H
11
14#include <set>
15
17
18
19#define COMMON_TOPOLOG_HYP static_cast<THypothesisID>(0)
20
21#define NODE_ANNOTATION_METRIC_MAPS "metricMaps" // CMultiMetricMap
22#define NODE_ANNOTATION_REF_POSEID "refPoseID" // TPoseID
23#define NODE_ANNOTATION_POSES_GRAPH "posesGraph" // CRobotPosesGraph
24
25#define NODE_ANNOTATION_PLACE_POSE "placePose" // mrpt::poses::CPoint2D
26
27#define ARC_ANNOTATION_DELTA "Delta" // CPose3DPDF (for the current implementation, it's a CPose3DPDFParticles)
28#define ARC_ANNOTATION_DELTA_SRC_POSEID "Delta_poseID_src" // TPoseID (elemental datatype)
29#define ARC_ANNOTATION_DELTA_TRG_POSEID "Delta_poseID_trg" // TPoseID (elemental datatype)
30
31/** Used in constructor of mrpt::hmtslam::CHMHMapArc */
32#define ARC_TYPES "Membership,Navegability,RelativePose,Location"
33#define DEFAULT_ARC_TYPE "Membership"
34
35/** Used in constructor of mrpt::hmtslam::CHMHMapNode */
36#define NODE_TYPES "Place,Area,TopologicalMap,Object"
37#define DEFAULT_NODE_TYPE "Place"
38
39// Used as current robot pose when initializing an empty HMT-map.
40#define POSEID_INVALID static_cast<TPoseID>(-1)
41
42#define AREAID_INVALID static_cast<uint64_t>(-1)
43
44#define MSG_SOURCE_LSLAM 1
45#define MSG_SOURCE_AA 2
46
47namespace mrpt
48{
49 namespace hmtslam
50 {
51 class HMTSLAM_IMPEXP CHMHMapArc;
52 class HMTSLAM_IMPEXP CHMHMapNode;
53
55
56 /** An integer number uniquely identifying each of the concurrent hypotheses for the robot topological path (& possibly local metric clusters) in HMT-SLAM.
57 * The number 0 has the special meaning of "that part of the map/robot path in which all hypotheses agree".
58 * They can be generated from CHMTSLAM::generateHypothesisID()
59 */
60 typedef int64_t THypothesisID;
61
62 /** An integer number uniquely identifying each robot pose stored in HMT-SLAM.
63 * They can be generated from CHMTSLAM::generatePoseID()
64 */
65 typedef uint64_t TPoseID;
66
68
69 typedef std::vector<TPoseID> TPoseIDList;
70 typedef std::set<TPoseID> TPoseIDSet;
71
73
74 /** A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps.
75 * \sa THypothesisID, CHierarchicalMHMap
76 * \ingroup mrpt_hmtslam_grp
77 */
78 class HMTSLAM_IMPEXP THypothesisIDSet : public mrpt::utils::CSerializable, public std::set<THypothesisID>
79 {
80 // This must be added to any CSerializable derived class:
82
83 public:
84 /** Default constructor
85 */
87 {
88 }
89
90 /** Constructor with one initial element
91 */
93 {
94 insert( val );
95 }
96
98 {
99 }
100
101 /** Returns true if the hypothesis is into the set.
102 */
103 bool has( const THypothesisID& val ) const
104 {
105 return find(val)!=end() || find(COMMON_TOPOLOG_HYP)!=end();
106 }
107
108 /** Dump to console.
109 */
110 void debugDump() const;
111
112 };
114
115
116 /** A class for storing a sequence of arcs (a path).
117 * \sa CHMTSLAM
118 */
119 class HMTSLAM_IMPEXP TArcList : public mrpt::utils::list_searchable<mrpt::hmtslam::CHMHMapArcPtr>
120 {
121 private:
123
124 public:
125 void debugDump();
126 void read( utils::CStream &in );
127 void write( utils::CStream &out ) const;
128
129 };
130
131
132 } // End of namespace
133} // End of namespace
134
135
136
137#endif
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define COMMON_TOPOLOG_HYP
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map.
Definition CHMHMapArc.h:30
A class for storing a sequence of arcs (a path).
void read(utils::CStream &in)
void write(utils::CStream &out) const
mrpt::utils::list_searchable< mrpt::hmtslam::CHMHMapArcPtr > BASE
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps.
bool has(const THypothesisID &val) const
Returns true if the hypothesis is into the set.
void debugDump() const
Dump to console.
THypothesisIDSet()
Default constructor.
THypothesisIDSet(const THypothesisID &val)
Constructor with one initial element.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition CStream.h:39
This class implements a STL container with features of both, a std::set and a std::list.
EIGEN_STRONG_INLINE iterator end()
#define HMTSLAM_IMPEXP
struct HMTSLAM_IMPEXP CHMHMapArcPtr
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
std::vector< TPoseID > TPoseIDList
std::set< TPoseID > TPoseIDSet
std::pair< TPoseID, TPoseID > TPairPoseIDs
uint64_t TPoseID
An integer number uniquely identifying each robot pose stored in HMT-SLAM.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
STL namespace.



Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 27 15:23:24 UTC 2023