Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef HMT_SLAM_common_H
00029 #define HMT_SLAM_common_H
00030
00031 #include <mrpt/utils/CSerializable.h>
00032 #include <mrpt/utils/stl_extensions.h>
00033
00034 #include <mrpt/hmtslam/link_pragmas.h>
00035
00036
00037 #define COMMON_TOPOLOG_HYP static_cast<THypothesisID>(0)
00038
00039 #define NODE_ANNOTATION_METRIC_MAPS "metricMaps" // CMultiMetricMap
00040 #define NODE_ANNOTATION_REF_POSEID "refPoseID" // TPoseID
00041 #define NODE_ANNOTATION_POSES_GRAPH "posesGraph" // CRobotPosesGraph
00042
00043 #define NODE_ANNOTATION_PLACE_POSE "placePose" // CPoint2D
00044
00045 #define ARC_ANNOTATION_DELTA "Delta" // CPose3DPDF (for the current implementation, it's a CPose3DPDFParticles)
00046 #define ARC_ANNOTATION_DELTA_SRC_POSEID "Delta_poseID_src" // TPoseID (elemental datatype)
00047 #define ARC_ANNOTATION_DELTA_TRG_POSEID "Delta_poseID_trg" // TPoseID (elemental datatype)
00048
00049
00050 #define ARC_TYPES "Membership,Navegability,RelativePose,Location"
00051 #define DEFAULT_ARC_TYPE "Membership"
00052
00053
00054 #define NODE_TYPES "Place,Area,TopologicalMap,Object"
00055 #define DEFAULT_NODE_TYPE "Place"
00056
00057
00058 #define POSEID_INVALID static_cast<TPoseID>(-1)
00059
00060 #define AREAID_INVALID static_cast<uint64_t>(-1)
00061
00062 #define MSG_SOURCE_LSLAM 1
00063 #define MSG_SOURCE_AA 2
00064
00065 namespace mrpt
00066 {
00067 namespace hmtslam
00068 {
00069 using namespace mrpt::utils;
00070
00071 class HMTSLAM_IMPEXP CHMHMapArc;
00072 class HMTSLAM_IMPEXP CHMHMapNode;
00073
00074 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CHMHMapArc,mrpt::utils::CSerializable, HMTSLAM_IMPEXP )
00075
00076
00077
00078
00079
00080
00081 typedef int64_t THypothesisID;
00082
00083
00084
00085
00086 typedef uint64_t TPoseID;
00087
00088 typedef std::pair<TPoseID,TPoseID> TPairPoseIDs;
00089
00090 typedef std::vector<TPoseID> TPoseIDList;
00091 typedef std::set<TPoseID> TPoseIDSet;
00092
00093 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( THypothesisIDSet,mrpt::utils::CSerializable, HMTSLAM_IMPEXP )
00094
00095
00096
00097
00098
00099 class HMTSLAM_IMPEXP THypothesisIDSet : public mrpt::utils::CSerializable, public std::set<THypothesisID>
00100 {
00101
00102 DEFINE_SERIALIZABLE( THypothesisIDSet )
00103
00104 public:
00105
00106
00107 THypothesisIDSet()
00108 {
00109 }
00110
00111
00112
00113 THypothesisIDSet( const THypothesisID& val)
00114 {
00115 insert( val );
00116 }
00117
00118 virtual ~THypothesisIDSet()
00119 {
00120 }
00121
00122
00123
00124 bool has( const THypothesisID& val ) const
00125 {
00126 return find(val)!=end() || find(COMMON_TOPOLOG_HYP)!=end();
00127 }
00128
00129
00130
00131 void debugDump() const;
00132
00133 };
00134
00135
00136
00137
00138
00139 class HMTSLAM_IMPEXP TArcList : public list_searchable<mrpt::hmtslam::CHMHMapArcPtr>
00140 {
00141 private:
00142 typedef list_searchable<mrpt::hmtslam::CHMHMapArcPtr> BASE;
00143
00144 public:
00145 void debugDump();
00146 void read( utils::CStream &in );
00147 void write( utils::CStream &out ) const;
00148
00149 };
00150
00151
00152 }
00153 }
00154
00155
00156
00157 #endif