Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Private Attributes

mrpt::slam::CSimpleMap Class Reference


Detailed Description

This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be totally determined with this information.

The pose of the sensory frame is not deterministic, but described by some PDF. Full 6D poses are used.

Note:
Objects of this class are serialized into (possibly GZ-compressed) files with the extension ".simplemap".
Before MRPT 0.9.0 the name of this class was "CSensFrameProbSequence", that's why there is a typedef with that name to allow backward compatibility.
See also:
CSensoryFrame, CPosePDF

Definition at line 51 of file CSimpleMap.h.

#include <mrpt/slam/CSimpleMap.h>

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

List of all members.

Public Types

typedef std::pair
< CPose3DPDFPtr,
CSensoryFramePtr
TPosePDFSensFramePair
typedef std::deque
< TPosePDFSensFramePair
TPosePDFSensFramePairList
typedef
TPosePDFSensFramePairList::const_iterator 
const_iterator
typedef
TPosePDFSensFramePairList::iterator 
iterator
typedef
TPosePDFSensFramePairList::reverse_iterator 
reverse_iterator
typedef
TPosePDFSensFramePairList::const_reverse_iterator 
const_reverse_iterator

Public Member Functions

 CSimpleMap ()
 Constructor.
 CSimpleMap (const CSimpleMap &o)
 Copy constructor.
CSimpleMapoperator= (const CSimpleMap &o)
 Copy constructor.
virtual ~CSimpleMap ()
 Destructor:
bool saveToFile (const std::string &filName) const
 Save this object to a .simplemap binary file (compressed with gzip)
bool loadFromFile (const std::string &filName)
 Load the contents of this object from a .simplemap binary file (possibly compressed with gzip)
size_t size () const
 Returns the pairs count.
void get (size_t index, CPose3DPDFPtr &out_posePDF, CSensoryFramePtr &out_SF) const
 Access to the i'th pair, first one is index '0'.
void set (size_t index, const CPose3DPDFPtr &in_posePDF, const CSensoryFramePtr &in_SF)
 Changes the i'th pair, first one is index '0'.
void set (size_t index, const CPosePDFPtr &in_posePDF, const CSensoryFramePtr &in_SF)
 Changes the i'th pair, first one is index '0'.
void remove (size_t index)
 Deletes the i'th pair, first one is index '0'.
void insert (const CPose3DPDF *in_posePDF, const CSensoryFrame &in_SF)
 Add a new pair to the sequence.
void insert (const CPose3DPDF *in_posePDF, const CSensoryFramePtr &in_SF)
 Add a new pair to the sequence, making a copy of the smart pointer (it's not made unique).
void insert (const CPose3DPDFPtr &in_posePDF, const CSensoryFramePtr &in_SF)
 Add a new pair to the sequence, making a copy of the smart pointer (it's not made unique).
void insert (const CPosePDFPtr &in_posePDF, const CSensoryFramePtr &in_SF)
 Add a new pair to the sequence.
void insert (const CPosePDF *in_posePDF, const CSensoryFrame &in_SF)
 Add a new pair to the sequence.
void insert (const CPosePDF *in_posePDF, const CSensoryFramePtr &in_SF)
 Add a new pair to the sequence.
void clear ()
 Remove all stored pairs.
void changeCoordinatesOrigin (const CPose3D &newOrigin)
 Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system.
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
reverse_iterator rbegin ()
reverse_iterator rend ()

Private Attributes

TPosePDFSensFramePairList m_posesObsPairs
 The stored data.

RTTI stuff

typedef CSimpleMapPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CSimpleMap
static mrpt::utils::TRuntimeClassId classCSimpleMap
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CSimpleMapPtr Create ()

Member Typedef Documentation

Definition at line 160 of file CSimpleMap.h.

typedef TPosePDFSensFramePairList::const_reverse_iterator mrpt::slam::CSimpleMap::const_reverse_iterator

Definition at line 163 of file CSimpleMap.h.

Definition at line 161 of file CSimpleMap.h.

typedef TPosePDFSensFramePairList::reverse_iterator mrpt::slam::CSimpleMap::reverse_iterator

Definition at line 162 of file CSimpleMap.h.

A typedef for the associated smart pointer

Definition at line 54 of file CSimpleMap.h.

Definition at line 157 of file CSimpleMap.h.

Definition at line 158 of file CSimpleMap.h.


Constructor & Destructor Documentation

mrpt::slam::CSimpleMap::CSimpleMap ( )

Constructor.

mrpt::slam::CSimpleMap::CSimpleMap ( const CSimpleMap o)

Copy constructor.

virtual mrpt::slam::CSimpleMap::~CSimpleMap ( ) [virtual]

Destructor:


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimpleMap::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::utils::CSerializable.

const_iterator mrpt::slam::CSimpleMap::begin ( ) const [inline]

Definition at line 166 of file CSimpleMap.h.

iterator mrpt::slam::CSimpleMap::begin ( ) [inline]

Definition at line 168 of file CSimpleMap.h.

void mrpt::slam::CSimpleMap::changeCoordinatesOrigin ( const CPose3D newOrigin)

Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system.

void mrpt::slam::CSimpleMap::clear ( )

Remove all stored pairs.

See also:
remove
static CSimpleMapPtr mrpt::slam::CSimpleMap::Create ( ) [static]
static mrpt::utils::CObject* mrpt::slam::CSimpleMap::CreateObject ( ) [static]
virtual mrpt::utils::CObject* mrpt::slam::CSimpleMap::duplicate ( ) const [virtual]

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

Implements mrpt::utils::CObject.

const_iterator mrpt::slam::CSimpleMap::end ( ) const [inline]

Definition at line 167 of file CSimpleMap.h.

iterator mrpt::slam::CSimpleMap::end ( ) [inline]

Definition at line 169 of file CSimpleMap.h.

void mrpt::slam::CSimpleMap::get ( size_t  index,
CPose3DPDFPtr out_posePDF,
CSensoryFramePtr out_SF 
) const

Access to the i'th pair, first one is index '0'.

NOTE: This method returns pointers to the objects inside the list, nor a copy of them, so do neither modify them nor delete them. NOTE: You can pass a NULL pointer if you dont need one of the two variables to be returned.

Exceptions:
std::exceptionOn index out of bounds.
virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimpleMap::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

void mrpt::slam::CSimpleMap::insert ( const CPosePDF in_posePDF,
const CSensoryFramePtr in_SF 
)

Add a new pair to the sequence.

The objects are copied, so original ones can be free if desired after insertion. This version for 2D PDFs just converts the 2D PDF into 3D before calling the 3D version.

void mrpt::slam::CSimpleMap::insert ( const CPose3DPDFPtr in_posePDF,
const CSensoryFramePtr in_SF 
)

Add a new pair to the sequence, making a copy of the smart pointer (it's not made unique).

void mrpt::slam::CSimpleMap::insert ( const CPosePDFPtr in_posePDF,
const CSensoryFramePtr in_SF 
)

Add a new pair to the sequence.

The objects are copied, so original ones can be free if desired after insertion. This version for 2D PDFs just converts the 2D PDF into 3D before calling the 3D version.

void mrpt::slam::CSimpleMap::insert ( const CPosePDF in_posePDF,
const CSensoryFrame in_SF 
)

Add a new pair to the sequence.

The objects are copied, so original ones can be free if desired after insertion. This version for 2D PDFs just converts the 2D PDF into 3D before calling the 3D version.

void mrpt::slam::CSimpleMap::insert ( const CPose3DPDF in_posePDF,
const CSensoryFrame in_SF 
)

Add a new pair to the sequence.

The objects are copied, so original ones can be free if desired after insertion.

void mrpt::slam::CSimpleMap::insert ( const CPose3DPDF in_posePDF,
const CSensoryFramePtr in_SF 
)

Add a new pair to the sequence, making a copy of the smart pointer (it's not made unique).

bool mrpt::slam::CSimpleMap::loadFromFile ( const std::string &  filName)

Load the contents of this object from a .simplemap binary file (possibly compressed with gzip)

See also:
saveToFile
Returns:
false on any error.
CSimpleMap& mrpt::slam::CSimpleMap::operator= ( const CSimpleMap o)

Copy constructor.

const_reverse_iterator mrpt::slam::CSimpleMap::rbegin ( ) const [inline]

Definition at line 171 of file CSimpleMap.h.

reverse_iterator mrpt::slam::CSimpleMap::rbegin ( ) [inline]

Definition at line 173 of file CSimpleMap.h.

void mrpt::slam::CSimpleMap::remove ( size_t  index)

Deletes the i'th pair, first one is index '0'.

Exceptions:
std::exceptionOn index out of bounds.
See also:
insert, get, set
const_reverse_iterator mrpt::slam::CSimpleMap::rend ( ) const [inline]

Definition at line 172 of file CSimpleMap.h.

reverse_iterator mrpt::slam::CSimpleMap::rend ( ) [inline]

Definition at line 174 of file CSimpleMap.h.

bool mrpt::slam::CSimpleMap::saveToFile ( const std::string &  filName) const

Save this object to a .simplemap binary file (compressed with gzip)

See also:
loadFromFile
Returns:
false on any error.
void mrpt::slam::CSimpleMap::set ( size_t  index,
const CPosePDFPtr in_posePDF,
const CSensoryFramePtr in_SF 
)

Changes the i'th pair, first one is index '0'.

The referenced object is COPIED, so you can freely destroy the object passed as parameter after calling this. If one of the pointers is NULL, the corresponding contents of the current i'th pair is not modified (i.e. if you want just to modify one of the values). This version for 2D PDFs just converts the 2D PDF into 3D before calling the 3D version.

Exceptions:
std::exceptionOn index out of bounds.
See also:
insert, get, remove
void mrpt::slam::CSimpleMap::set ( size_t  index,
const CPose3DPDFPtr in_posePDF,
const CSensoryFramePtr in_SF 
)

Changes the i'th pair, first one is index '0'.

The referenced object is COPIED, so you can freely destroy the object passed as parameter after calling this. If one of the pointers is NULL, the corresponding contents of the current i'th pair is not modified (i.e. if you want just to modify one of the values).

Exceptions:
std::exceptionOn index out of bounds.
See also:
insert, get, remove
size_t mrpt::slam::CSimpleMap::size ( ) const

Returns the pairs count.


Member Data Documentation

Definition at line 54 of file CSimpleMap.h.

Definition at line 54 of file CSimpleMap.h.

Definition at line 54 of file CSimpleMap.h.

The stored data.

Definition at line 178 of file CSimpleMap.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011