Main MRPT website > C++ reference for MRPT 1.9.9
CLandmark.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 CLandmark_H
10 #define CLandmark_H
11 
13 #include <mrpt/math/CMatrix.h>
14 #include <mrpt/system/datetime.h>
16 #include <mrpt/poses/CPoint3D.h>
17 #include <mrpt/vision/CFeature.h>
19 
20 namespace mrpt
21 {
22 namespace maps
23 {
24 /** The class for storing "landmarks" (visual or laser-scan-extracted
25  * features,...)
26  *
27  * The descriptors for each kind of descriptor are stored in the vector
28  * "features", which
29  * will typically consists of only 1 element, or 2 elements for landmarks
30  * obtained from stereo images.
31  *
32  * \sa CLandmarksMap
33  * \ingroup mrpt_vision_grp
34  */
36 {
38 
39  public:
40  /** The type for the IDs of landmarks. */
42 
43  /** The set of features from which the landmark comes. */
44  std::vector<mrpt::vision::CFeature::Ptr> features;
45 
46  /** The mean of the landmark 3D position. */
48  /** The "normal" to the landmark, i.e. a unitary 3D vector towards the
49  * viewing direction, or a null vector if not applicable */
53 
54  /** An ID for the landmark (see details next...)
55  * This ID was introduced in the version 3 of this class (21/NOV/2006),
56  *and its aim is
57  * to provide a way for easily establishing correspondences between
58  *landmarks detected
59  * in sequential image frames. Thus, the management of this field should
60  *be:
61  * - In 'servers' (classes/modules/... that detect landmarks from
62  *images):
63  *A different ID must be assigned to every landmark (e.g. a sequential
64  *counter), BUT only in the case of being sure of the correspondence of one
65  *landmark with another one in the past (e.g. tracking).
66  * - In 'clients': This field can be ignored, but if it is used, the
67  *advantage is solving the correspondence between landmarks detected in
68  *consequentive instants of time: Two landmarks with the same ID
69  *<b>correspond</b> to the same physical feature, BUT it should not be
70  *expected the inverse to be always true.
71  *
72  * Note that this field is never fill out automatically, it must be set by
73  *the programmer if used.
74  */
76  /** The last time that this landmark was observed. */
78  /** The number of times that this landmark has been seen. */
80 
81  /** Returns the pose as an object:
82  */
84 
86  {
88  getPose(pdf);
89  p = pdf.mean;
90  COV = mrpt::math::CMatrixDouble(pdf.cov);
91  }
92 
93  /** Sets the pose from an object:
94  */
96 
97  /** Gets the type of the first feature in its feature vector. The vector
98  * must not be empty.
99  */
101  {
102  ASSERT_(!features.empty());
103  ASSERT_(features[0]);
104  return features[0]->type;
105  }
106 
107  /** Creates one feature in the vector "features", calling the appropriate
108  * constructor of the smart pointer, so after calling this method
109  * "features[0]" is a valid pointer to a CFeature object.
110  */
112  {
113  features.assign(
115  }
116 
117  /** Default constructor
118  */
119  CLandmark();
120 
121  /** Virtual destructor
122  */
123  virtual ~CLandmark();
124 
125  protected:
126  /** Auxiliary variable
127  */
129 
130 }; // End of class definition
131 
132 } // End of namespace
133 } // End of namespace
134 
135 #endif
mrpt::math::CMatrixDouble
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
Definition: CMatrixTemplateNumeric.h:144
mrpt::maps::CLandmark::ID
TLandmarkID ID
An ID for the landmark (see details next...) This ID was introduced in the version 3 of this class (2...
Definition: CLandmark.h:75
mrpt::poses::CPointPDFGaussian::cov
mrpt::math::CMatrixDouble33 cov
The 3x3 covariance matrix.
Definition: CPointPDFGaussian.h:46
mrpt::maps::CLandmark::TLandmarkID
int64_t TLandmarkID
The type for the IDs of landmarks.
Definition: CLandmark.h:41
mrpt::maps::CLandmark::seenTimesCount
uint32_t seenTimesCount
The number of times that this landmark has been seen.
Definition: CLandmark.h:79
mrpt::poses::CPointPDFGaussian
A gaussian distribution for 3D points.
Definition: CPointPDFGaussian.h:25
mrpt::maps::CLandmark::getPose
void getPose(mrpt::poses::CPointPDFGaussian &p) const
Returns the pose as an object:
Definition: CLandmark.cpp:53
CMatrix.h
int64_t
__int64 int64_t
Definition: rptypes.h:49
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::maps::CLandmark::features
std::vector< mrpt::vision::CFeature::Ptr > features
The set of features from which the landmark comes.
Definition: CLandmark.h:44
ASSERT_
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
p
GLfloat GLfloat p
Definition: glext.h:6305
mrpt::maps::CLandmark::pose_cov_12
float pose_cov_12
Definition: CLandmark.h:51
mrpt::maps::CLandmark::pose_cov_13
float pose_cov_13
Definition: CLandmark.h:51
mrpt::maps::CLandmark::pose_cov_22
float pose_cov_22
Definition: CLandmark.h:51
mrpt::system::TTimeStamp
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:31
lightweight_geom_data.h
mrpt::math::CMatrixTemplateNumeric< double >
mrpt::maps::CLandmark::CLandmark
CLandmark()
Default constructor.
Definition: CLandmark.cpp:30
mrpt::vision::CFeature::Ptr
std::shared_ptr< CFeature > Ptr
Definition: CFeature.h:60
mrpt::maps::CLandmark
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
Definition: CLandmark.h:35
CPointPDFGaussian.h
mrpt::maps::CLandmark::getPose
void getPose(mrpt::poses::CPoint3D &p, mrpt::math::CMatrixDouble &COV) const
Definition: CLandmark.h:85
mrpt::serialization::CSerializable
The virtual base class which provides a unified interface for all persistent objects in MRPT.
Definition: CSerializable.h:32
mrpt::vision::TFeatureType
TFeatureType
Types of features - This means that the point has been detected with this algorithm,...
Definition: vision/include/mrpt/vision/types.h:50
mrpt::maps::CLandmark::pose_mean
mrpt::math::TPoint3D pose_mean
The mean of the landmark 3D position.
Definition: CLandmark.h:47
mrpt::maps::CLandmark::normal
mrpt::math::TPoint3D normal
The "normal" to the landmark, i.e.
Definition: CLandmark.h:50
mrpt::maps::CLandmark::m_counterIDs
static TLandmarkID m_counterIDs
Auxiliary variable.
Definition: CLandmark.h:128
CPoint3D.h
mrpt::math::TPoint3D
Lightweight 3D point.
Definition: lightweight_geom_data.h:378
mrpt::maps::CLandmark::getType
mrpt::vision::TFeatureType getType() const
Gets the type of the first feature in its feature vector.
Definition: CLandmark.h:100
mrpt::maps::CLandmark::pose_cov_33
float pose_cov_33
Definition: CLandmark.h:51
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
mrpt::maps::CLandmark::~CLandmark
virtual ~CLandmark()
Virtual destructor.
Definition: CLandmark.cpp:49
mrpt::maps::CLandmark::createOneFeature
void createOneFeature()
Creates one feature in the vector "features", calling the appropriate constructor of the smart pointe...
Definition: CLandmark.h:111
CFeature.h
mrpt::poses::CPoint3D
A class used to store a 3D point.
Definition: CPoint3D.h:33
CSerializable.h
mrpt::maps::CLandmark::pose_cov_11
float pose_cov_11
Definition: CLandmark.h:51
mrpt::poses::CPointPDFGaussian::mean
CPoint3D mean
The mean value.
Definition: CPointPDFGaussian.h:44
mrpt::maps::CLandmark::timestampLastSeen
mrpt::system::TTimeStamp timestampLastSeen
The last time that this landmark was observed.
Definition: CLandmark.h:77
mrpt::maps::CLandmark::pose_cov_23
float pose_cov_23
Definition: CLandmark.h:52
mrpt::vision::CFeature
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
Definition: CFeature.h:53
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47
datetime.h
mrpt::maps::CLandmark::setPose
void setPose(const mrpt::poses::CPointPDFGaussian &p)
Sets the pose from an object:
Definition: CLandmark.cpp:72



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