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 CLandmark_H
00029 #define CLandmark_H
00030
00031 #include <mrpt/utils/CSerializable.h>
00032 #include <mrpt/math/CMatrix.h>
00033 #include <mrpt/system/os.h>
00034 #include <mrpt/poses/CPointPDFGaussian.h>
00035 #include <mrpt/poses/CPoint3D.h>
00036
00037 namespace mrpt
00038 {
00039 namespace slam
00040 {
00041 using namespace mrpt::poses;
00042
00043 DEFINE_SERIALIZABLE_PRE( CLandmark )
00044
00045
00048 class MRPTDLLIMPEXP CLandmark : public mrpt::utils::CSerializable
00049 {
00050
00051 DEFINE_SERIALIZABLE( CLandmark )
00052
00053 public:
00056 typedef int64_t TLandmarkID;
00057
00061 enum TLandmarkType
00062 {
00065 vlColor = 0,
00066 vlSIFT,
00067
00070 glOccupancy,
00071 glPanoramicDescriptor,
00072 glBeacon
00073 };
00074
00077 float pose_mean_x,pose_mean_y,pose_mean_z;
00078 float pose_cov_11,pose_cov_22,pose_cov_33,pose_cov_12,pose_cov_13,pose_cov_23;
00079
00082 float normal_x,normal_y,normal_z;
00083
00086 void getPose( CPointPDFGaussian *p ) const;
00087
00090 void setPose( CPointPDFGaussian *p );
00091
00095 void setDescriptorFromMatrix( CMatrix &m );
00096
00099 void getDescriptorAsMatrix( CMatrix &m );
00100
00104 void setDescriptorFromBeaconID( unsigned int beaconID );
00105
00109 unsigned int getDescriptorAsBeaconID( ) const;
00110
00113 TLandmarkType type;
00114
00124 TLandmarkID ID;
00125
00128 mrpt::system::TTimeStamp timestampLastSeen;
00129
00132 uint32_t seenTimesCount;
00133
00156 std::vector<unsigned char> descriptor1;
00157 std::vector<float> descriptor2;
00158
00161 CLandmark();
00162
00165 virtual ~CLandmark();
00166
00167 protected:
00170 static TLandmarkID m_counterIDs;
00171
00172 };
00173
00174 }
00175 }
00176
00177 #endif