MRPT  2.0.0
List of all members | Public Types | Public Member Functions | Public Attributes | Static Protected Attributes
mrpt::maps::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 35 of file CLandmark.h.

#include <mrpt/maps/CLandmark.h>

Inheritance diagram for mrpt::maps::CLandmark:

Public Types

using TLandmarkID = int64_t
 The type for the IDs of landmarks. More...
 

Public Member Functions

void getPose (mrpt::poses::CPointPDFGaussian &p) const
 Returns the pose as an object: More...
 
void getPose (mrpt::poses::CPoint3D &p, mrpt::math::CMatrixDouble &COV) const
 
void setPose (const mrpt::poses::CPointPDFGaussian &p)
 Sets the pose from an object: More...
 
mrpt::vision::TKeyPointMethod 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
 Default constructor. More...
 
 ~CLandmark () override
 Virtual destructor. More...
 
virtual mxArraywriteToMatlab () const
 Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More...
 
RTTI classes and functions for polymorphic hierarchies
mrpt::rtti::CObject::Ptr duplicateGetSmartPtr () const
 Makes a deep copy of the object and returns a smart pointer to it. More...
 

Public Attributes

std::vector< mrpt::vision::CFeaturefeatures
 The set of features from which the landmark comes. More...
 
mrpt::math::TPoint3D pose_mean
 The mean of the landmark 3D position. More...
 
mrpt::math::TPoint3D normal
 The "normal" to the landmark, i.e. 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 {INVALID_LANDMARK_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 {INVALID_TIMESTAMP}
 The last time that this landmark was observed. More...
 
uint32_t seenTimesCount {0}
 The number of times that this landmark has been seen. More...
 

Protected Member Functions

CSerializable virtual methods
uint8_t serializeGetVersion () const override
 Must return the current versioning number of the object. More...
 
void serializeTo (mrpt::serialization::CArchive &out) const override
 Pure virtual method for writing (serializing) to an abstract archive. More...
 
void serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override
 Pure virtual method for reading (deserializing) from an abstract archive. More...
 
CSerializable virtual methods
virtual void serializeTo (CSchemeArchiveBase &out) const
 Virtual method for writing (serializing) to an abstract schema based archive. More...
 
virtual void serializeFrom (CSchemeArchiveBase &in)
 Virtual method for reading (deserializing) from an abstract schema based archive. More...
 

Static Protected Attributes

static TLandmarkID m_counterIDs
 Auxiliary variable. More...
 

RTTI stuff

using Ptr = std::shared_ptr< mrpt::maps ::CLandmark >
 
using ConstPtr = std::shared_ptr< const mrpt::maps ::CLandmark >
 
using UniquePtr = std::unique_ptr< mrpt::maps ::CLandmark >
 
using ConstUniquePtr = std::unique_ptr< const mrpt::maps ::CLandmark >
 
static const mrpt::rtti::TRuntimeClassId runtimeClassId
 
static constexpr const char * className = "mrpt::maps" "::" "CLandmark"
 
static const mrpt::rtti::TRuntimeClassId_GetBaseClass ()
 
static constexpr auto getClassName ()
 
static const mrpt::rtti::TRuntimeClassIdGetRuntimeClassIdStatic ()
 
static std::shared_ptr< CObjectCreateObject ()
 
template<typename... Args>
static Ptr Create (Args &&... args)
 
template<typename Alloc , typename... Args>
static Ptr CreateAlloc (const Alloc &alloc, Args &&... args)
 
template<typename... Args>
static UniquePtr CreateUnique (Args &&... args)
 
virtual const mrpt::rtti::TRuntimeClassIdGetRuntimeClass () const override
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::rtti::CObjectclone () const override
 Returns a deep copy (clone) of the object, indepently of its class. More...
 

Member Typedef Documentation

◆ ConstPtr

Definition at line 37 of file CLandmark.h.

◆ ConstUniquePtr

using mrpt::maps::CLandmark::ConstUniquePtr = std::unique_ptr<const mrpt::maps :: CLandmark >

Definition at line 37 of file CLandmark.h.

◆ Ptr

A type for the associated smart pointer

Definition at line 37 of file CLandmark.h.

◆ TLandmarkID

The type for the IDs of landmarks.

Definition at line 41 of file CLandmark.h.

◆ UniquePtr

using mrpt::maps::CLandmark::UniquePtr = std::unique_ptr< mrpt::maps :: CLandmark >

Definition at line 37 of file CLandmark.h.

Constructor & Destructor Documentation

◆ CLandmark()

mrpt::maps::CLandmark::CLandmark ( )
default

Default constructor.

◆ ~CLandmark()

CLandmark::~CLandmark ( )
overridedefault

Virtual destructor.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::maps::CLandmark::_GetBaseClass ( )
staticprotected

◆ clone()

virtual mrpt::rtti::CObject* mrpt::maps::CLandmark::clone ( ) const
overridevirtual

Returns a deep copy (clone) of the object, indepently of its class.

Implements mrpt::rtti::CObject.

◆ Create()

template<typename... Args>
static Ptr mrpt::maps::CLandmark::Create ( Args &&...  args)
inlinestatic

Definition at line 37 of file CLandmark.h.

◆ CreateAlloc()

template<typename Alloc , typename... Args>
static Ptr mrpt::maps::CLandmark::CreateAlloc ( const Alloc &  alloc,
Args &&...  args 
)
inlinestatic

Definition at line 37 of file CLandmark.h.

◆ CreateObject()

static std::shared_ptr<CObject> mrpt::maps::CLandmark::CreateObject ( )
static

◆ createOneFeature()

void mrpt::maps::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 112 of file CLandmark.h.

References features.

Referenced by mrpt::maps::CLandmarksMap::internal_CreateFromMapDefinition(), and mrpt::maps::CLandmarksMap::loadOccupancyFeaturesFrom2DRangeScan().

Here is the caller graph for this function:

◆ CreateUnique()

template<typename... Args>
static UniquePtr mrpt::maps::CLandmark::CreateUnique ( Args &&...  args)
inlinestatic

Definition at line 37 of file CLandmark.h.

◆ duplicateGetSmartPtr()

mrpt::rtti::CObject::Ptr CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Makes a deep copy of the object and returns a smart pointer to it.

Definition at line 204 of file CObject.h.

References mrpt::rtti::CObject::clone().

Referenced by mrpt::obs::CRawlog::insert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClassName()

static constexpr auto mrpt::maps::CLandmark::getClassName ( )
inlinestatic

Definition at line 37 of file CLandmark.h.

◆ getPose() [1/2]

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

Returns the pose as an object:

Definition at line 32 of file CLandmark.cpp.

References mrpt::poses::CPointPDFGaussian::cov, mrpt::poses::CPointPDFGaussian::mean, mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().

Referenced by mrpt::maps::CLandmarksMap::computeLikelihood_RSLC_2007(), mrpt::maps::CLandmarksMap::fuseWith(), and getPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPose() [2/2]

void mrpt::maps::CLandmark::getPose ( mrpt::poses::CPoint3D p,
mrpt::math::CMatrixDouble COV 
) const
inline

Definition at line 87 of file CLandmark.h.

References mrpt::poses::CPointPDFGaussian::cov, getPose(), and mrpt::poses::CPointPDFGaussian::mean.

Here is the call graph for this function:

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::maps::CLandmark::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::serialization::CSerializable.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::maps::CLandmark::GetRuntimeClassIdStatic ( )
static

◆ getType()

mrpt::vision::TKeyPointMethod mrpt::maps::CLandmark::getType ( ) const
inline

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

The vector must not be empty.

Definition at line 102 of file CLandmark.h.

References ASSERT_, and features.

◆ serializeFrom() [1/2]

void CLandmark::serializeFrom ( mrpt::serialization::CArchive in,
uint8_t  serial_version 
)
overrideprotectedvirtual

Pure virtual method for reading (deserializing) from an abstract archive.

Users don't call this method directly. Instead, use stream >> object;.

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 I/O error

Implements mrpt::serialization::CSerializable.

Definition at line 73 of file CLandmark.cpp.

References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, and THROW_EXCEPTION.

◆ serializeFrom() [2/2]

virtual void mrpt::serialization::CSerializable::serializeFrom ( CSchemeArchiveBase in)
inlineprotectedvirtualinherited

Virtual method for reading (deserializing) from an abstract schema based archive.

Definition at line 74 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ serializeGetVersion()

uint8_t CLandmark::serializeGetVersion ( ) const
overrideprotectedvirtual

Must return the current versioning number of the object.

Start in zero for new classes, and increments each time there is a change in the stored format.

Implements mrpt::serialization::CSerializable.

Definition at line 65 of file CLandmark.cpp.

◆ serializeTo() [1/2]

void CLandmark::serializeTo ( mrpt::serialization::CArchive out) const
overrideprotectedvirtual

Pure virtual method for writing (serializing) to an abstract archive.

Users don't call this method directly. Instead, use stream << object;.

Exceptions
std::exceptionOn any I/O error

Implements mrpt::serialization::CSerializable.

Definition at line 66 of file CLandmark.cpp.

References out.

◆ serializeTo() [2/2]

virtual void mrpt::serialization::CSerializable::serializeTo ( CSchemeArchiveBase out) const
inlineprotectedvirtualinherited

Virtual method for writing (serializing) to an abstract schema based archive.

Definition at line 64 of file CSerializable.h.

References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.

Here is the call graph for this function:

◆ setPose()

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

Sets the pose from an object:

Definition at line 51 of file CLandmark.cpp.

References mrpt::poses::CPointPDFGaussian::cov, mrpt::d2f(), mrpt::poses::CPointPDFGaussian::mean, mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().

Referenced by mrpt::maps::CLandmarksMap::fuseWith().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeToMatlab()

virtual mxArray* mrpt::serialization::CSerializable::writeToMatlab ( ) const
inlinevirtualinherited

Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class.

Returns
A new mxArray (caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB.

Definition at line 90 of file CSerializable.h.

Member Data Documentation

◆ className

constexpr const char* mrpt::maps::CLandmark::className = "mrpt::maps" "::" "CLandmark"
static

Definition at line 37 of file CLandmark.h.

◆ features

std::vector<mrpt::vision::CFeature> mrpt::maps::CLandmark::features

◆ ID

TLandmarkID mrpt::maps::CLandmark::ID {INVALID_LANDMARK_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 75 of file CLandmark.h.

Referenced by mrpt::maps::CLandmarksMap::changeCoordinatesReference(), mrpt::maps::CLandmarksMap::internal_CreateFromMapDefinition(), mrpt::vision::projectMatchedFeatures(), and mrpt::slam::COccupancyGridMapFeatureExtractor::uncached_extractFeatures().

◆ m_counterIDs

CLandmark::TLandmarkID CLandmark::m_counterIDs
staticprotected
Initial value:
=
static_cast<CLandmark::TLandmarkID>(0)

Auxiliary variable.

Definition at line 123 of file CLandmark.h.

◆ normal

mrpt::math::TPoint3D mrpt::maps::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 50 of file CLandmark.h.

Referenced by mrpt::maps::CLandmarksMap::changeCoordinatesReference(), mrpt::maps::CLandmarksMap::loadOccupancyFeaturesFrom2DRangeScan(), mrpt::maps::CLandmarksMap::loadSiftFeaturesFromImageObservation(), and mrpt::vision::projectMatchedFeatures().

◆ pose_cov_11

float mrpt::maps::CLandmark::pose_cov_11 {}

◆ pose_cov_12

float mrpt::maps::CLandmark::pose_cov_12 {}

◆ pose_cov_13

float mrpt::maps::CLandmark::pose_cov_13 {}

◆ pose_cov_22

float mrpt::maps::CLandmark::pose_cov_22 {}

◆ pose_cov_23

float mrpt::maps::CLandmark::pose_cov_23 {}

◆ pose_cov_33

float mrpt::maps::CLandmark::pose_cov_33 {}

◆ pose_mean

mrpt::math::TPoint3D mrpt::maps::CLandmark::pose_mean

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::maps::CLandmark::runtimeClassId
staticprotected

Definition at line 37 of file CLandmark.h.

◆ seenTimesCount

uint32_t mrpt::maps::CLandmark::seenTimesCount {0}

◆ timestampLastSeen

mrpt::system::TTimeStamp mrpt::maps::CLandmark::timestampLastSeen {INVALID_TIMESTAMP}



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020