This class can be used to make partitions on a map/graph build from observations taken at some poses/nodes.
Definition at line 33 of file CIncrementalMapPartitioner.h.
#include <mrpt/slam/CIncrementalMapPartitioner.h>
Classes | |
struct | TOptions |
Configuration of the algorithm: More... | |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) throw () |
void | operator delete[] (void *ptr) throw () |
void | operator delete (void *memory, void *ptr) throw () |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
void | operator delete (void *ptr, const std::nothrow_t &) throw () |
CIncrementalMapPartitioner () | |
Constructor: More... | |
virtual | ~CIncrementalMapPartitioner () |
Destructor: More... | |
void | clear () |
Initialization: Start of a new map, new internal matrices,... More... | |
unsigned int | addMapFrame (const mrpt::obs::CSensoryFramePtr &frame, const mrpt::poses::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 mrpt::obs::CSensoryFramePtr &frame, const mrpt::poses::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 mrpt::obs::CSensoryFrame &frame, const mrpt::poses::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 mrpt::math::CMatrixDouble & | getAdjacencyMatrix () const |
Returns a const ref to the internal adjacency matrix. More... | |
const mrpt::maps::CSimpleMap * | getSequenceOfFrames () const |
Read-only access to the sequence of Sensory Frames. More... | |
mrpt::maps::CSimpleMap * | getSequenceOfFrames () |
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 mrpt::poses::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... | |
virtual mxArray * | writeToMatlab () 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... | |
CObject * | clone () const |
Cloning interface for smart pointers. More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
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 <br> | |
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::CMultiMetricMap > | m_individualMaps |
mrpt::math::CMatrixD | m_A |
Adjacency matrix. More... | |
std::vector< vector_uint > | m_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 |
The list of keyframes to consider in the next update. More... | |
RTTI stuff <br> | |
typedef CIncrementalMapPartitionerPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CIncrementalMapPartitioner |
static mrpt::utils::TRuntimeClassId | classCIncrementalMapPartitioner |
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. More... | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. More... | |
static mrpt::utils::CObject * | CreateObject () |
static CIncrementalMapPartitionerPtr | Create () |
typedef CIncrementalMapPartitionerPtr mrpt::slam::CIncrementalMapPartitioner::SmartPtr |
A typedef for the associated smart pointer
Definition at line 36 of file CIncrementalMapPartitioner.h.
mrpt::slam::CIncrementalMapPartitioner::CIncrementalMapPartitioner | ( | ) |
Constructor:
|
virtual |
Destructor:
|
staticprotected |
unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame | ( | const mrpt::obs::CSensoryFrame & | frame, |
const mrpt::poses::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".
frame | The sensed data |
robotPose | An estimation of the robot global 2D pose. |
unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame | ( | const mrpt::obs::CSensoryFramePtr & | frame, |
const mrpt::poses::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".
frame | The sensed data |
robotPose | An estimation of the robot global 2D pose. |
unsigned int mrpt::slam::CIncrementalMapPartitioner::addMapFrame | ( | const mrpt::obs::CSensoryFramePtr & | frame, |
const mrpt::poses::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".
frame | The sensed data |
robotPose | An estimation of the robot global 2D pose. |
void mrpt::slam::CIncrementalMapPartitioner::changeCoordinatesOrigin | ( | const mrpt::poses::CPose3D & | newOrigin | ) |
Change the coordinate origin of all stored poses, for consistency with future new poses to enter in the system.
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.
void mrpt::slam::CIncrementalMapPartitioner::clear | ( | ) |
Initialization: Start of a new map, new internal matrices,...
|
inlineinherited |
|
static |
|
static |
|
virtual |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlineinherited |
|
inline |
Returns a const ref to the internal adjacency matrix.
Definition at line 138 of file CIncrementalMapPartitioner.h.
|
inline |
Returns a copy of the internal adjacency matrix.
Definition at line 135 of file CIncrementalMapPartitioner.h.
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
unsigned int mrpt::slam::CIncrementalMapPartitioner::getNodesCount | ( | ) |
It returns the nodes count currently in the internal map/graph.
|
virtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
|
inline |
Access to the sequence of Sensory Frames.
Definition at line 149 of file CIncrementalMapPartitioner.h.
|
inline |
Read-only access to the sequence of Sensory Frames.
Definition at line 142 of file CIncrementalMapPartitioner.h.
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.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inlinestatic |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
inline |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
staticinherited |
Sends a formated text to "debugOut" if not NULL, or to cout otherwise.
Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute().
|
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.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
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).
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.
|
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.
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.
|
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.
out | The output binary stream where object must be dumped. |
getVersion | If 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. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
|
staticprotected |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
static |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
staticinherited |
|
staticinherited |
Definition at line 42 of file CSerializable.h.
|
static |
Definition at line 36 of file CIncrementalMapPartitioner.h.
|
private |
Adjacency matrix.
Definition at line 177 of file CIncrementalMapPartitioner.h.
|
private |
Definition at line 173 of file CIncrementalMapPartitioner.h.
|
private |
Definition at line 174 of file CIncrementalMapPartitioner.h.
|
private |
This will be true after adding new observations, and before an "updatePartitions" is invoked.
Definition at line 183 of file CIncrementalMapPartitioner.h.
|
private |
The last partition.
Definition at line 180 of file CIncrementalMapPartitioner.h.
|
private |
The list of keyframes to consider in the next update.
Definition at line 186 of file CIncrementalMapPartitioner.h.
mrpt::slam::CIncrementalMapPartitioner::TOptions mrpt::slam::CIncrementalMapPartitioner::options |
Page generated by Doxygen 1.9.2 for MRPT 1.4.0 SVN: at Mon Sep 20 00:36:32 UTC 2021 |