Main MRPT website > C++ reference
MRPT logo
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 36 of file CIncrementalMapPartitioner.h.

#include <mrpt/slam/CIncrementalMapPartitioner.h>

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

Classes

struct  TOptions
 Configuration of the algorithm: More...
 

Public Member Functions

 CIncrementalMapPartitioner ()
 Constructor: More...
 
virtual ~CIncrementalMapPartitioner ()
 Destructor: More...
 
void clear ()
 Initialization: Start of a new map, new internal matrices,... More...
 
unsigned int addMapFrame (const CSensoryFramePtr &frame, const CPosePDFPtr &robotPose2D)
 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". More...
 
unsigned int addMapFrame (const CSensoryFramePtr &frame, const CPose3DPDFPtr &robotPose3D)
 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". More...
 
unsigned int addMapFrame (const CSensoryFrame &frame, const CPose3DPDF &robotPose3D)
 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". More...
 
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 ()
 It returns the nodes 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
 Returns a copy of the internal adjacency matrix. More...
 
const CMatrixDouble & getAdjacencyMatrix () const
 Returns a const ref to the internal adjacency matrix. More...
 
const CSimpleMapgetSequenceOfFrames () const
 Read-only access to the sequence of Sensory Frames. More...
 
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 changeCoordinatesOrigin (const CPose3D &newOrigin)
 Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system. More...
 
void changeCoordinatesOriginPoseIndex (const unsigned &newOriginPose)
 Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system; the new origin is given by the index of the pose to become the new origin. More...
 
void getAs3DScene (mrpt::opengl::CSetOfObjectsPtr &objs, const std::map< uint32_t, int64_t > *renameIndexes=NULL) const
 Returns a 3D representation of the current state: poses & links between them. 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...
 

Static Public Member Functions

static void printf_debug (const char *frmt,...)
 Sends a formated text to "debugOut" if not NULL, or to cout otherwise. More...
 

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

CSimpleMap m_individualFrames
 El conjunto de los scans se guardan en un array: More...
 
std::deque< mrpt::slam::CMultiMetricMapm_individualMaps
 
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_t > m_modified_nodes
 La lista de nodos que hay que tener en cuenta en la proxima actualizacion: More...
 

RTTI stuff

typedef CIncrementalMapPartitionerPtr SmartPtr
 
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

◆ SmartPtr

A typedef for the associated smart pointer

Definition at line 39 of file CIncrementalMapPartitioner.h.

Constructor & Destructor Documentation

◆ CIncrementalMapPartitioner()

mrpt::slam::CIncrementalMapPartitioner::CIncrementalMapPartitioner ( )

Constructor:

◆ ~CIncrementalMapPartitioner()

virtual mrpt::slam::CIncrementalMapPartitioner::~CIncrementalMapPartitioner ( )
virtual

Destructor:

Member Function Documentation

◆ _GetBaseClass()

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

◆ addMapFrame() [1/3]

unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame ( const CSensoryFramePtr frame,
const CPosePDFPtr robotPose2D 
)

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
robotPoseAn estimation of the robot global 2D 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

◆ addMapFrame() [2/3]

unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame ( const CSensoryFramePtr frame,
const CPose3DPDFPtr robotPose3D 
)

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
robotPoseAn estimation of the robot global 2D 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

◆ addMapFrame() [3/3]

unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame ( const CSensoryFrame frame,
const CPose3DPDF robotPose3D 
)

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
robotPoseAn estimation of the robot global 2D 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

◆ changeCoordinatesOrigin()

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

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

◆ changeCoordinatesOriginPoseIndex()

void mrpt::slam::CIncrementalMapPartitioner::changeCoordinatesOriginPoseIndex ( const unsigned &  newOriginPose)

Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system; the new origin is given by the index of the pose to become the new origin.

◆ clear()

void mrpt::slam::CIncrementalMapPartitioner::clear ( )

Initialization: Start of a new map, new internal matrices,...

◆ clone()

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

Cloning interface for smart pointers.

Definition at line 135 of file CObject.h.

◆ Create()

static CIncrementalMapPartitionerPtr mrpt::slam::CIncrementalMapPartitioner::Create ( )
static

◆ CreateObject()

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

◆ duplicate()

virtual mrpt::utils::CObject* mrpt::slam::CIncrementalMapPartitioner::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 132 of file CObject.h.

◆ getAdjacencyMatrix() [1/2]

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

Returns a copy of the internal adjacency matrix.

Definition at line 145 of file CIncrementalMapPartitioner.h.

◆ getAdjacencyMatrix() [2/2]

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

Returns a const ref to the internal adjacency matrix.

Definition at line 148 of file CIncrementalMapPartitioner.h.

◆ getAs3DScene()

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

Returns a 3D representation of the current state: poses & links between them.

The previous contents of "objs" will be discarded

◆ getNodesCount()

unsigned int mrpt::slam::CIncrementalMapPartitioner::getNodesCount ( )

It returns the nodes count currently in the internal map/graph.

◆ GetRuntimeClass()

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.

◆ getSequenceOfFrames() [1/2]

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

Read-only access to the sequence of Sensory Frames.

Definition at line 152 of file CIncrementalMapPartitioner.h.

◆ getSequenceOfFrames() [2/2]

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

Access to the sequence of Sensory Frames.

Definition at line 159 of file CIncrementalMapPartitioner.h.

◆ markAllNodesForReconsideration()

void mrpt::slam::CIncrementalMapPartitioner::markAllNodesForReconsideration ( )

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

◆ printf_debug()

static void mrpt::utils::CDebugOutputCapable::printf_debug ( const char *  frmt,
  ... 
)
staticinherited

Sends a formated text to "debugOut" if not NULL, or to cout otherwise.

Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute().

◆ readFromStream()

void mrpt::slam::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.

◆ removeSetOfNodes()

void mrpt::slam::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).

◆ updatePartitions()

void mrpt::slam::CIncrementalMapPartitioner::updatePartitions ( std::vector< vector_uint > &  partitions)

This method executed only the neccesary part of the partition to take into account the lastest added frames.

See also
addMapFrame

◆ writeToStream()

void mrpt::slam::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.

Member Data Documentation

◆ _init_CIncrementalMapPartitioner

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

Definition at line 39 of file CIncrementalMapPartitioner.h.

◆ classCIncrementalMapPartitioner

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

Definition at line 39 of file CIncrementalMapPartitioner.h.

◆ classCObject

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

Definition at line 120 of file CObject.h.

◆ classCSerializable

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

Definition at line 35 of file CSerializable.h.

◆ classinfo

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

Definition at line 39 of file CIncrementalMapPartitioner.h.

◆ m_A

CMatrixD mrpt::slam::CIncrementalMapPartitioner::m_A
private

Adjacency matrix.

Definition at line 191 of file CIncrementalMapPartitioner.h.

◆ m_individualFrames

CSimpleMap mrpt::slam::CIncrementalMapPartitioner::m_individualFrames
private

El conjunto de los scans se guardan en un array:

Definition at line 185 of file CIncrementalMapPartitioner.h.

◆ m_individualMaps

std::deque<mrpt::slam::CMultiMetricMap> mrpt::slam::CIncrementalMapPartitioner::m_individualMaps
private

Definition at line 186 of file CIncrementalMapPartitioner.h.

◆ m_last_last_partition_are_new_ones

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 199 of file CIncrementalMapPartitioner.h.

◆ m_last_partition

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

The last partition.

Definition at line 195 of file CIncrementalMapPartitioner.h.

◆ m_modified_nodes

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

La lista de nodos que hay que tener en cuenta en la proxima actualizacion:

Definition at line 203 of file CIncrementalMapPartitioner.h.

◆ options

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



Page generated by Doxygen 1.8.14 for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019 Hosted on:
SourceForge.net Logo