Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
mrpt::slam::CIncrementalMapPartitioner Class Reference

Detailed Description

This class can be used to make partitions on a map/graph build from observations taken at some poses/nodes.

Definition at line 30 of file CIncrementalMapPartitioner.h.

#include <mrpt/slam/CIncrementalMapPartitioner.h>

Inheritance diagram for mrpt::slam::CIncrementalMapPartitioner:
Inheritance graph

Classes

struct  TOptions
 Configuration of the algorithm: More...
 

Public Member Functions

voidoperator new (size_t size)
 
voidoperator new[] (size_t size)
 
void operator delete (void *ptr) throw ()
 
void operator delete[] (void *ptr) throw ()
 
void operator delete (void *memory, void *ptr) throw ()
 
voidoperator new (size_t size, const std::nothrow_t &) throw ()
 
void operator delete (void *ptr, const std::nothrow_t &) throw ()
 
 CIncrementalMapPartitioner ()
 ctor More...
 
virtual ~CIncrementalMapPartitioner ()
 dtor More...
 
void clear ()
 
void updatePartitions (std::vector< vector_uint > &partitions)
 This method executed only the neccesary part of the partition to take into account the lastest added frames. More...
 
unsigned int getNodesCount ()
 Get the total node count currently in the internal map/graph. More...
 
void removeSetOfNodes (vector_uint indexesToRemove, bool changeCoordsRef=true)
 Remove the stated nodes (0-based indexes) from the internal lists. More...
 
template<class MATRIX >
void getAdjacencyMatrix (MATRIX &outMatrix) const
 Return a copy of the internal adjacency matrix. More...
 
const mrpt::math::CMatrixDoublegetAdjacencyMatrix () const
 Return a const ref to the internal adjacency matrix. More...
 
const mrpt::maps::CSimpleMapgetSequenceOfFrames () const
 Read-only access to the sequence of Sensory Frames. More...
 
mrpt::maps::CSimpleMapgetSequenceOfFrames ()
 Access to the sequence of Sensory Frames. More...
 
void markAllNodesForReconsideration ()
 Mark all nodes for reconsideration in the next call to "updatePartitions", instead of considering just those affected by aditions of new arcs. More...
 
void getAs3DScene (mrpt::opengl::CSetOfObjectsPtr &objs, const std::map< uint32_t, int64_t > *renameIndexes=NULL) const
 Return a 3D representation of the current state: poses & links between them. 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...
 
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...
 
Add to the Map Frames

Add a new frame to the current graph

Call this method each time a new observation is added to the map/graph, and whenever you want to update the partitions, call "updatePartitions"

Parameters
frameThe sensed data
robotPose*DAn estimation of the robot global *D pose.
Returns
{ The index of the new pose in the internal list, which will be used to refer to the pose in the future. }
See also
updatePartitions
unsigned int addMapFrame (const mrpt::obs::CSensoryFramePtr &frame, const mrpt::poses::CPosePDFPtr &robotPose2D)
 
unsigned int addMapFrame (const mrpt::obs::CSensoryFramePtr &frame, const mrpt::poses::CPose3DPDFPtr &robotPose3D)
 
unsigned int addMapFrame (const mrpt::obs::CSensoryFrame &frame, const mrpt::poses::CPose3DPDF &robotPose3D)
 
Change Coordinates System

Change the coordinate origin of all stored poses

Used for consistency with future new poses to enter in the system.

void changeCoordinatesOrigin (const mrpt::poses::CPose3D &newOrigin)
 
void changeCoordinatesOriginPoseIndex (const unsigned &newOriginPose)
 The new origin is given by the index of the pose that is to become the new origin. More...
 

Static Public Member Functions

static voidoperator new (size_t size, void *ptr)
 

Public Attributes

mrpt::slam::CIncrementalMapPartitioner::TOptions options
 

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...
 

Private Attributes

mrpt::maps::CSimpleMap m_individualFrames
 
std::deque< mrpt::maps::CMultiMetricMapm_individualMaps
 
mrpt::math::CMatrixD m_A
 Adjacency matrix. More...
 
std::vector< vector_uintm_last_partition
 The last partition. More...
 
bool m_last_last_partition_are_new_ones
 This will be true after adding new observations, and before an "updatePartitions" is invoked. More...
 
std::vector< uint8_tm_modified_nodes
 The list of keyframes to consider in the next update. More...
 

RTTI stuff

typedef CIncrementalMapPartitionerPtr Ptr
 
typedef CIncrementalMapPartitionerPtr ConstPtr
 
static mrpt::utils::CLASSINIT _init_CIncrementalMapPartitioner
 
static mrpt::utils::TRuntimeClassId classCIncrementalMapPartitioner
 
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 CIncrementalMapPartitionerPtr Create ()
 

Member Typedef Documentation

typedef CIncrementalMapPartitionerPtr mrpt::slam::CIncrementalMapPartitioner::ConstPtr

Definition at line 35 of file CIncrementalMapPartitioner.h.

typedef CIncrementalMapPartitionerPtr mrpt::slam::CIncrementalMapPartitioner::Ptr

A typedef for the associated smart pointer

Definition at line 35 of file CIncrementalMapPartitioner.h.

Constructor & Destructor Documentation

CIncrementalMapPartitioner::CIncrementalMapPartitioner ( )

ctor

Definition at line 40 of file CIncrementalMapPartitioner.cpp.

References mrpt::utils::clear().

CIncrementalMapPartitioner::~CIncrementalMapPartitioner ( )
virtual

dtor

Definition at line 56 of file CIncrementalMapPartitioner.cpp.

References mrpt::utils::clear().

Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CIncrementalMapPartitioner::_GetBaseClass ( )
staticprotected
unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame ( const mrpt::obs::CSensoryFramePtr &  frame,
const mrpt::poses::CPosePDFPtr &  robotPose2D 
)
unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame ( const mrpt::obs::CSensoryFramePtr &  frame,
const mrpt::poses::CPose3DPDFPtr &  robotPose3D 
)
unsigned int CIncrementalMapPartitioner::addMapFrame ( const mrpt::obs::CSensoryFrame frame,
const mrpt::poses::CPose3DPDF robotPose3D 
)
void CIncrementalMapPartitioner::changeCoordinatesOrigin ( const mrpt::poses::CPose3D newOrigin)
void CIncrementalMapPartitioner::changeCoordinatesOriginPoseIndex ( const unsigned &  newOriginPose)

The new origin is given by the index of the pose that is to become the new origin.

Definition at line 590 of file CIncrementalMapPartitioner.cpp.

References changeCoordinatesOrigin(), mrpt::maps::CSimpleMap::get(), m_individualFrames, MRPT_END, and MRPT_START.

void CIncrementalMapPartitioner::clear ( )

Definition at line 111 of file CIncrementalMapPartitioner.cpp.

References addMapFrame(), ASSERT_, mrpt::maps::CSimpleMap::clear(), mrpt::maps::CMultiMetricMap::compute3DMatchingRatio(), mrpt::maps::CSimpleMap::get(), mrpt::maps::CSimpleMap::insert(), mrpt::maps::CLandmarksMap::TInsertionOptions::insert_Landmarks_from_range_scans, mrpt::maps::CLandmarksMap::TInsertionOptions::insert_SIFTs_from_monocular_images, mrpt::maps::CLandmarksMap::TInsertionOptions::insert_SIFTs_from_stereo_images, mrpt::maps::CLandmarksMap::insertionOptions, m_A, m_individualFrames, m_individualMaps, mrpt::maps::CMultiMetricMap::m_landmarksMap, m_last_last_partition_are_new_ones, m_last_partition, m_modified_nodes, mrpt::maps::CMultiMetricMap::m_pointsMaps, mrpt::maps::TMatchingRatioParams::maxDistForCorr, mrpt::maps::TMatchingRatioParams::maxMahaDistForCorr, mrpt::slam::CIncrementalMapPartitioner::TOptions::minDistForCorrespondence, mrpt::slam::CIncrementalMapPartitioner::TOptions::minMahaDistForCorrespondence, MRPT_END, MRPT_END_WITH_CLEAN_UP, MRPT_START, mrpt::slam::observationsOverlap(), options, mrpt::maps::TSetOfMetricMapInitializers::push_back(), mrpt::maps::CMultiMetricMap::setListOfMaps(), mrpt::maps::CSimpleMap::size(), mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::size(), mrpt::poses::CPose3D::size(), and mrpt::slam::CIncrementalMapPartitioner::TOptions::useMapMatching.

Referenced by mrpt::slam::CRangeBearingKFSLAM::reset(), and mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::updateMapPartitions().

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

Cloning interface for smart pointers.

Definition at line 143 of file CObject.h.

static CIncrementalMapPartitionerPtr mrpt::slam::CIncrementalMapPartitioner::Create ( )
static
static mrpt::utils::CObject* mrpt::slam::CIncrementalMapPartitioner::CreateObject ( )
static
virtual mrpt::utils::CObject* mrpt::slam::CIncrementalMapPartitioner::duplicate ( ) const
virtual

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

Implements mrpt::utils::CObject.

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 140 of file CObject.h.

Referenced by mrpt::obs::CRawlog::addActions(), addMapFrame(), and mrpt::obs::CRawlog::addObservations().

template<class MATRIX >
void mrpt::slam::CIncrementalMapPartitioner::getAdjacencyMatrix ( MATRIX &  outMatrix) const
inline

Return a copy of the internal adjacency matrix.

Definition at line 144 of file CIncrementalMapPartitioner.h.

Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles().

const mrpt::math::CMatrixDouble& mrpt::slam::CIncrementalMapPartitioner::getAdjacencyMatrix ( ) const
inline

Return a const ref to the internal adjacency matrix.

Definition at line 147 of file CIncrementalMapPartitioner.h.

void CIncrementalMapPartitioner::getAs3DScene ( mrpt::opengl::CSetOfObjectsPtr &  objs,
const std::map< uint32_t, int64_t > *  renameIndexes = NULL 
) const
unsigned int CIncrementalMapPartitioner::getNodesCount ( )

Get the total node count currently in the internal map/graph.

Definition at line 471 of file CIncrementalMapPartitioner.cpp.

References m_individualFrames, and mrpt::maps::CSimpleMap::size().

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

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

const mrpt::maps::CSimpleMap* mrpt::slam::CIncrementalMapPartitioner::getSequenceOfFrames ( ) const
inline

Read-only access to the sequence of Sensory Frames.

Definition at line 152 of file CIncrementalMapPartitioner.h.

mrpt::maps::CSimpleMap* mrpt::slam::CIncrementalMapPartitioner::getSequenceOfFrames ( )
inline

Access to the sequence of Sensory Frames.

Definition at line 159 of file CIncrementalMapPartitioner.h.

void CIncrementalMapPartitioner::markAllNodesForReconsideration ( )

Mark all nodes for reconsideration in the next call to "updatePartitions", instead of considering just those affected by aditions of new arcs.

Definition at line 570 of file CIncrementalMapPartitioner.cpp.

References m_last_last_partition_are_new_ones, m_last_partition, and m_modified_nodes.

Referenced by mrpt::hmtslam::CHMTSLAM::areaAbstraction(), and mrpt::slam::CRangeBearingKFSLAM::reconsiderPartitionsNow().

void mrpt::slam::CIncrementalMapPartitioner::operator delete ( void ptr)
throw (
)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void mrpt::slam::CIncrementalMapPartitioner::operator delete ( void memory,
void ptr 
)
throw (
)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void mrpt::slam::CIncrementalMapPartitioner::operator delete ( void ptr,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void mrpt::slam::CIncrementalMapPartitioner::operator delete[] ( void ptr)
throw (
)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void* mrpt::slam::CIncrementalMapPartitioner::operator new ( size_t  size,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void* mrpt::slam::CIncrementalMapPartitioner::operator new ( size_t  size)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

static void* mrpt::slam::CIncrementalMapPartitioner::operator new ( size_t  size,
void ptr 
)
inlinestatic

Definition at line 35 of file CIncrementalMapPartitioner.h.

void* mrpt::slam::CIncrementalMapPartitioner::operator new[] ( size_t  size)
inline

Definition at line 35 of file CIncrementalMapPartitioner.h.

void CIncrementalMapPartitioner::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.

Definition at line 679 of file CIncrementalMapPartitioner.cpp.

References m_A, m_individualFrames, m_individualMaps, m_last_last_partition_are_new_ones, m_last_partition, m_modified_nodes, and MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.

void CIncrementalMapPartitioner::removeSetOfNodes ( vector_uint  indexesToRemove,
bool  changeCoordsRef = true 
)

Remove the stated nodes (0-based indexes) from the internal lists.

If changeCoordsRef is true, coordinates are changed to leave the first node at (0,0,0).

Definition at line 479 of file CIncrementalMapPartitioner.cpp.

References ASSERT_, mrpt::maps::CSimpleMap::changeCoordinatesOrigin(), mrpt::maps::CSimpleMap::get(), m_A, m_individualFrames, m_individualMaps, m_last_last_partition_are_new_ones, m_last_partition, m_modified_nodes, MRPT_END, MRPT_START, mrpt::maps::CSimpleMap::remove(), and mrpt::maps::CSimpleMap::size().

void CIncrementalMapPartitioner::updatePartitions ( std::vector< vector_uint > &  partitions)
virtual mxArray* mrpt::utils::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 NULL is class does not support conversion to MATLAB.

Definition at line 79 of file CSerializable.h.

References BASE_IMPEXP, DEFINE_MRPT_OBJECT_POST, mrpt::utils::ObjectToOctetVector(), mrpt::utils::ObjectToRawString(), mrpt::utils::ObjectToString(), mrpt::utils::OctetVectorToObject(), mrpt::utils::RawStringToObject(), and mrpt::utils::StringToObject().

Referenced by mrpt::poses::operator<<(), mrpt::utils::TCamera::readFromStream(), mrpt::obs::CObservationImage::readFromStream(), mrpt::obs::CObservationStereoImages::readFromStream(), mrpt::obs::CObservation2DRangeScan::readFromStream(), and mrpt::utils::CImage::readFromStream().

void CIncrementalMapPartitioner::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.

Definition at line 703 of file CIncrementalMapPartitioner.cpp.

References m_A, m_individualFrames, m_individualMaps, m_last_last_partition_are_new_ones, m_last_partition, and m_modified_nodes.

Member Data Documentation

mrpt::utils::CLASSINIT mrpt::slam::CIncrementalMapPartitioner::_init_CIncrementalMapPartitioner
staticprotected

Definition at line 35 of file CIncrementalMapPartitioner.h.

mrpt::utils::TRuntimeClassId mrpt::slam::CIncrementalMapPartitioner::classCIncrementalMapPartitioner
static

Definition at line 35 of file CIncrementalMapPartitioner.h.

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

Definition at line 128 of file CObject.h.

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

Definition at line 42 of file CSerializable.h.

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

Definition at line 35 of file CIncrementalMapPartitioner.h.

mrpt::math::CMatrixD mrpt::slam::CIncrementalMapPartitioner::m_A
private
mrpt::maps::CSimpleMap mrpt::slam::CIncrementalMapPartitioner::m_individualFrames
private
std::deque<mrpt::maps::CMultiMetricMap> mrpt::slam::CIncrementalMapPartitioner::m_individualMaps
private
bool mrpt::slam::CIncrementalMapPartitioner::m_last_last_partition_are_new_ones
private

This will be true after adding new observations, and before an "updatePartitions" is invoked.

Definition at line 204 of file CIncrementalMapPartitioner.h.

Referenced by clear(), markAllNodesForReconsideration(), readFromStream(), removeSetOfNodes(), updatePartitions(), and writeToStream().

std::vector<vector_uint> mrpt::slam::CIncrementalMapPartitioner::m_last_partition
private
std::vector<uint8_t> mrpt::slam::CIncrementalMapPartitioner::m_modified_nodes
private

The list of keyframes to consider in the next update.

Definition at line 207 of file CIncrementalMapPartitioner.h.

Referenced by clear(), markAllNodesForReconsideration(), readFromStream(), removeSetOfNodes(), updatePartitions(), and writeToStream().

mrpt::slam::CIncrementalMapPartitioner::TOptions mrpt::slam::CIncrementalMapPartitioner::options



Page generated by Doxygen 1.8.11 for MRPT 1.5.7 Git: 2190203 Tue May 15 02:01:15 2018 +0200 at miƩ may 16 12:40:16 CEST 2018