Main MRPT website > C++ reference
MRPT logo
List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes
mrpt::slam::CLandmark Class Reference

Detailed Description

The class for storing "landmarks" (visual or laser-scan-extracted features,...)

The descriptors for each kind of descriptor are stored in the vector "features", which will typically consists of only 1 element, or 2 elements for landmarks obtained from stereo images.

See also
CLandmarksMap

Definition at line 66 of file CLandmark.h.

#include <mrpt/slam/CLandmark.h>

Inheritance diagram for mrpt::slam::CLandmark:
Inheritance graph
[legend]

Public Types

typedef int64_t TLandmarkID
 The type for the IDs of landmarks. More...
 

Public Member Functions

void getPose (CPointPDFGaussian &p) const
 Returns the pose as an object: More...
 
void getPose (CPoint3D &p, CMatrixDouble &COV) const
 
void setPose (const CPointPDFGaussian &p)
 Sets the pose from an object: More...
 
TFeatureType getType () const
 Gets the type of the first feature in its feature vector. More...
 
void createOneFeature ()
 Creates one feature in the vector "features", calling the appropriate constructor of the smart pointer, so after calling this method "features[0]" is a valid pointer to a CFeature object. More...
 
 CLandmark ()
 Default constructor. More...
 
virtual ~CLandmark ()
 Virtual destructor. More...
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More...
 
CObjectclone () const
 Cloning interface for smart pointers. More...
 

Public Attributes

std::vector< CFeaturePtrfeatures
 The set of features from which the landmark comes. More...
 
TPoint3D pose_mean
 The mean of the landmark 3D position. More...
 
TPoint3D normal
 The "normal" to the landmark, i.e. a unitary 3D vector towards the viewing direction, or a null vector if not applicable. More...
 
float pose_cov_11
 
float pose_cov_22
 
float pose_cov_33
 
float pose_cov_12
 
float pose_cov_13
 
float pose_cov_23
 
TLandmarkID ID
 An ID for the landmark (see details next...) This ID was introduced in the version 3 of this class (21/NOV/2006), and its aim is to provide a way for easily establishing correspondences between landmarks detected in sequential image frames. More...
 
mrpt::system::TTimeStamp timestampLastSeen
 The last time that this landmark was observed. More...
 
uint32_t seenTimesCount
 The number of times that this landmark has been seen. More...
 

Static Public Attributes

static const mrpt::utils::TRuntimeClassId classCObject
 
RTTI stuff
static const mrpt::utils::TRuntimeClassId classCSerializable
 

Protected Member Functions

CSerializable virtual methods
void writeToStream (mrpt::utils::CStream &out, int *getVersion) const
 Introduces a pure virtual method responsible for writing to a CStream. More...
 
void readFromStream (mrpt::utils::CStream &in, int version)
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More...
 

Static Protected Attributes

static TLandmarkID m_counterIDs
 Auxiliary variable. More...
 

RTTI stuff

typedef CLandmarkPtr SmartPtr
 
static mrpt::utils::CLASSINIT _init_CLandmark
 
static mrpt::utils::TRuntimeClassId classCLandmark
 
static const mrpt::utils::TRuntimeClassIdclassinfo
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class. More...
 
static mrpt::utils::CObjectCreateObject ()
 
static CLandmarkPtr Create ()
 

Member Typedef Documentation

◆ SmartPtr

A typedef for the associated smart pointer

Definition at line 69 of file CLandmark.h.

◆ TLandmarkID

The type for the IDs of landmarks.

Definition at line 72 of file CLandmark.h.

Constructor & Destructor Documentation

◆ CLandmark()

mrpt::slam::CLandmark::CLandmark ( )

Default constructor.

◆ ~CLandmark()

virtual mrpt::slam::CLandmark::~CLandmark ( )
virtual

Virtual destructor.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CLandmark::_GetBaseClass ( )
staticprotected

◆ clone()

CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 161 of file CObject.h.

◆ Create()

static CLandmarkPtr mrpt::slam::CLandmark::Create ( )
static

◆ CreateObject()

static mrpt::utils::CObject* mrpt::slam::CLandmark::CreateObject ( )
static

◆ createOneFeature()

void mrpt::slam::CLandmark::createOneFeature ( )
inline

Creates one feature in the vector "features", calling the appropriate constructor of the smart pointer, so after calling this method "features[0]" is a valid pointer to a CFeature object.

Definition at line 115 of file CLandmark.h.

◆ duplicate()

virtual mrpt::utils::CObject* mrpt::slam::CLandmark::duplicate ( ) const
virtual

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

◆ duplicateGetSmartPtr()

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 158 of file CObject.h.

◆ getPose() [1/2]

void mrpt::slam::CLandmark::getPose ( CPointPDFGaussian p) const

Returns the pose as an object:

◆ getPose() [2/2]

void mrpt::slam::CLandmark::getPose ( CPoint3D p,
CMatrixDouble COV 
) const
inline

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CLandmark::GetRuntimeClass ( ) const
virtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

◆ getType()

TFeatureType mrpt::slam::CLandmark::getType ( ) const
inline

Gets the type of the first feature in its feature vector.

The vector must not be empty.

Definition at line 110 of file CLandmark.h.

References ASSERT_.

◆ readFromStream()

void mrpt::slam::CLandmark::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protectedvirtual

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any error, see CStream::ReadBuffer
See also
CStream

Implements mrpt::utils::CSerializable.

◆ setPose()

void mrpt::slam::CLandmark::setPose ( const CPointPDFGaussian p)

Sets the pose from an object:

◆ writeToStream()

void mrpt::slam::CLandmark::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protectedvirtual

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions
std::exceptionOn any error, see CStream::WriteBuffer
See also
CStream

Implements mrpt::utils::CSerializable.

Member Data Documentation

◆ _init_CLandmark

mrpt::utils::CLASSINIT mrpt::slam::CLandmark::_init_CLandmark
staticprotected

Definition at line 69 of file CLandmark.h.

◆ classCLandmark

mrpt::utils::TRuntimeClassId mrpt::slam::CLandmark::classCLandmark
static

Definition at line 69 of file CLandmark.h.

◆ classCObject

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
staticinherited

Definition at line 146 of file CObject.h.

◆ classCSerializable

const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable
staticinherited

Definition at line 61 of file CSerializable.h.

◆ classinfo

const mrpt::utils::TRuntimeClassId* mrpt::slam::CLandmark::classinfo
static

Definition at line 69 of file CLandmark.h.

◆ features

std::vector<CFeaturePtr> mrpt::slam::CLandmark::features

The set of features from which the landmark comes.

Definition at line 74 of file CLandmark.h.

◆ ID

TLandmarkID mrpt::slam::CLandmark::ID

An ID for the landmark (see details next...) This ID was introduced in the version 3 of this class (21/NOV/2006), and its aim is to provide a way for easily establishing correspondences between landmarks detected in sequential image frames.

Thus, the management of this field should be:

  • In 'servers' (classes/modules/... that detect landmarks from images): A different ID must be assigned to every landmark (e.g. a sequential counter), BUT only in the case of being sure of the correspondence of one landmark with another one in the past (e.g. tracking).
  • In 'clients': This field can be ignored, but if it is used, the advantage is solving the correspondence between landmarks detected in consequentive instants of time: Two landmarks with the same ID correspond to the same physical feature, BUT it should not be expected the inverse to be always true.

Note that this field is never fill out automatically, it must be set by the programmer if used.

Definition at line 89 of file CLandmark.h.

◆ m_counterIDs

TLandmarkID mrpt::slam::CLandmark::m_counterIDs
staticprotected

Auxiliary variable.

Definition at line 129 of file CLandmark.h.

◆ normal

TPoint3D mrpt::slam::CLandmark::normal

The "normal" to the landmark, i.e. a unitary 3D vector towards the viewing direction, or a null vector if not applicable.

Definition at line 77 of file CLandmark.h.

◆ pose_cov_11

float mrpt::slam::CLandmark::pose_cov_11

Definition at line 78 of file CLandmark.h.

◆ pose_cov_12

float mrpt::slam::CLandmark::pose_cov_12

Definition at line 78 of file CLandmark.h.

◆ pose_cov_13

float mrpt::slam::CLandmark::pose_cov_13

Definition at line 78 of file CLandmark.h.

◆ pose_cov_22

float mrpt::slam::CLandmark::pose_cov_22

Definition at line 78 of file CLandmark.h.

◆ pose_cov_23

float mrpt::slam::CLandmark::pose_cov_23

Definition at line 78 of file CLandmark.h.

◆ pose_cov_33

float mrpt::slam::CLandmark::pose_cov_33

Definition at line 78 of file CLandmark.h.

◆ pose_mean

TPoint3D mrpt::slam::CLandmark::pose_mean

The mean of the landmark 3D position.

Definition at line 76 of file CLandmark.h.

◆ seenTimesCount

uint32_t mrpt::slam::CLandmark::seenTimesCount

The number of times that this landmark has been seen.

Definition at line 91 of file CLandmark.h.

◆ timestampLastSeen

mrpt::system::TTimeStamp mrpt::slam::CLandmark::timestampLastSeen

The last time that this landmark was observed.

Definition at line 90 of file CLandmark.h.




Page generated by Doxygen 1.8.14 for MRPT 1.0.2 SVN: at lun oct 28 00:52:41 CET 2019 Hosted on:
SourceForge.net Logo