The specialization of CNetworkOfPoses for poses of type CPosePDFGaussianInf, also implementing serialization.
#include <mrpt/graphs/CNetworkOfPoses.h>

Public Types | |
Typedef's | |
| typedef mrpt::graphs::CDirectedGraph < CPOSE, EDGE_ANNOTATIONS > | BASE |
| The base class "CDirectedGraph<CPOSE,EDGE_ANNOTATIONS>" */. | |
| typedef CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > | self_t |
| My own type. | |
| typedef CPOSE | constraint_t |
| The type of PDF poses in the contraints (edges) (=CPOSE template argument) | |
| typedef NODE_ANNOTATIONS | node_annotations_t |
| The extra annotations in nodes, apart from a constraint_no_pdf_t. | |
| typedef EDGE_ANNOTATIONS | edge_annotations_t |
| The extra annotations in edges, apart from a constraint_t. | |
| typedef MAPS_IMPLEMENTATION | maps_implementation_t |
| The type of map's implementation (=MAPS_IMPLEMENTATION template argument) | |
| typedef CPOSE::type_value | constraint_no_pdf_t |
| The type of edges or their means if they are PDFs (that is, a simple "edge" value) | |
| typedef MAPS_IMPLEMENTATION::template map< TNodeID, CPOSE > | global_poses_pdf_t |
| A map from pose IDs to their global coordinates estimates, with uncertainty. | |
| typedef MAPS_IMPLEMENTATION::template map< TNodeID, global_pose_t > | global_poses_t |
| A map from pose IDs to their global coordinates estimates, without uncertainty (the "most-likely value") | |
Public Member Functions | |
| 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). | |
| CObject * | clone () const |
| Cloning interface for smart pointers. | |
I/O file methods | |
| void | saveToTextFile (const std::string &fileName) const |
| Saves to a text file in the format used by TORO & HoG-man (more on the format here ) For 2D graphs only VERTEX2 & EDGE2 entries will be saved, and VERTEX3 & EDGE3 entries for 3D graphs. | |
| void | loadFromTextFile (const std::string &fileName, bool collapse_dup_edges=true) |
| Loads from a text file in the format used by TORO & HoG-man (more on the format here ) Recognized line entries are: VERTEX2, VERTEX3, EDGE2, EDGE3, EQUIV. | |
Utility methods | |
| void | dijkstra_nodes_estimate () |
| Spanning tree computation of a simple estimation of the global coordinates of each node just from the information in all edges, sorted in a Dijkstra tree based on the current "root" node. | |
| size_t | collapseDuplicatedEdges () |
| Look for duplicated edges (even in opposite directions) between all pairs of nodes and fuse them. | |
| double | getGlobalSquareError (bool ignoreCovariances=true) const |
| Computes the overall square error from all the pose constraints (edges) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error. | |
| double | getEdgeSquareError (const typename BASE::edges_map_t::const_iterator &itEdge, bool ignoreCovariances=true) const |
| Computes the square error of one pose constraints (edge) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error. | |
| double | getEdgeSquareError (const TNodeID from_id, const TNodeID to_id, bool ignoreCovariances=true) const |
| Computes the square error of one pose constraints (edge) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error. | |
| void | clear () |
| Empty all edges, nodes and set root to ID 0. | |
| size_t | nodeCount () const |
| Return number of nodes in the list of global coordinates (may be differente that all nodes appearing in edges) | |
Public Attributes | |
Data members | |
| global_poses_t | nodes |
| The nodes (vertices) of the graph, with their estimated "global" (with respect to root) position, without an associated covariance. | |
| TNodeID | root |
| The ID of the node that is the origin of coordinates, used as reference by all coordinates in . | |
| bool | edges_store_inverse_poses |
False (default) if an edge i->j stores the normal relative pose of j as seen from i: True if an edge i->j stores the inverse relateive pose, that is, i as seen from j: . | |
Static Public Attributes | |
| static const mrpt::utils::TRuntimeClassId | classCObject |
Protected Member Functions | |
| virtual void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0 |
| Introduces a pure virtual method responsible for writing to a CStream. | |
| virtual void | readFromStream (mrpt::utils::CStream &in, int version)=0 |
| 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. | |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCSerializable |
| class | mrpt::utils::CStream |
RTTI stuff | |
| typedef CNetworkOfPoses2DInfPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CNetworkOfPoses2DInf |
| static mrpt::utils::TRuntimeClassId | classCNetworkOfPoses2DInf |
| 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::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CNetworkOfPoses2DInfPtr | Create () |
typedef mrpt::graphs::CDirectedGraph<CPOSE,EDGE_ANNOTATIONS> mrpt::graphs::CNetworkOfPoses::BASE [inherited] |
The base class "CDirectedGraph<CPOSE,EDGE_ANNOTATIONS>" */.
Definition at line 111 of file CNetworkOfPoses.h.
typedef CPOSE::type_value mrpt::graphs::CNetworkOfPoses::constraint_no_pdf_t [inherited] |
The type of edges or their means if they are PDFs (that is, a simple "edge" value)
Definition at line 119 of file CNetworkOfPoses.h.
typedef CPOSE mrpt::graphs::CNetworkOfPoses::constraint_t [inherited] |
The type of PDF poses in the contraints (edges) (=CPOSE template argument)
Definition at line 114 of file CNetworkOfPoses.h.
typedef EDGE_ANNOTATIONS mrpt::graphs::CNetworkOfPoses::edge_annotations_t [inherited] |
The extra annotations in edges, apart from a constraint_t.
Definition at line 116 of file CNetworkOfPoses.h.
typedef MAPS_IMPLEMENTATION::template map<TNodeID,CPOSE> mrpt::graphs::CNetworkOfPoses::global_poses_pdf_t [inherited] |
A map from pose IDs to their global coordinates estimates, with uncertainty.
Definition at line 131 of file CNetworkOfPoses.h.
typedef MAPS_IMPLEMENTATION::template map<TNodeID,global_pose_t> mrpt::graphs::CNetworkOfPoses::global_poses_t [inherited] |
A map from pose IDs to their global coordinates estimates, without uncertainty (the "most-likely value")
Definition at line 134 of file CNetworkOfPoses.h.
typedef MAPS_IMPLEMENTATION mrpt::graphs::CNetworkOfPoses::maps_implementation_t [inherited] |
The type of map's implementation (=MAPS_IMPLEMENTATION template argument)
Definition at line 118 of file CNetworkOfPoses.h.
typedef NODE_ANNOTATIONS mrpt::graphs::CNetworkOfPoses::node_annotations_t [inherited] |
The extra annotations in nodes, apart from a constraint_no_pdf_t.
Definition at line 115 of file CNetworkOfPoses.h.
typedef CNetworkOfPoses<CPOSE,MAPS_IMPLEMENTATION,NODE_ANNOTATIONS,EDGE_ANNOTATIONS> mrpt::graphs::CNetworkOfPoses::self_t [inherited] |
My own type.
Definition at line 112 of file CNetworkOfPoses.h.
A typedef for the associated smart pointer
Definition at line 327 of file CNetworkOfPoses.h.
| static const mrpt::utils::TRuntimeClassId* mrpt::graphs::CNetworkOfPoses2DInf::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::utils::CSerializable.
| void mrpt::graphs::CNetworkOfPoses::clear | ( | void | ) | [inline, inherited] |
Empty all edges, nodes and set root to ID 0.
Definition at line 234 of file CNetworkOfPoses.h.
| CObject* mrpt::utils::CObject::clone | ( | ) | const [inline, inherited] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.
| size_t mrpt::graphs::CNetworkOfPoses::collapseDuplicatedEdges | ( | ) | [inline, inherited] |
Look for duplicated edges (even in opposite directions) between all pairs of nodes and fuse them.
Upon return, only one edge remains between each pair of nodes with the mean & covariance (or information matrix) corresponding to the Bayesian fusion of all the Gaussians.
Definition at line 201 of file CNetworkOfPoses.h.
| static CNetworkOfPoses2DInfPtr mrpt::graphs::CNetworkOfPoses2DInf::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::graphs::CNetworkOfPoses2DInf::CreateObject | ( | ) | [static] |
| void mrpt::graphs::CNetworkOfPoses::dijkstra_nodes_estimate | ( | ) | [inline, inherited] |
Spanning tree computation of a simple estimation of the global coordinates of each node just from the information in all edges, sorted in a Dijkstra tree based on the current "root" node.
Note that "global" coordinates are with respect to the node with the ID specified in root.
Definition at line 195 of file CNetworkOfPoses.h.
| virtual mrpt::utils::CObject* mrpt::graphs::CNetworkOfPoses2DInf::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 [inline, inherited] |
| double mrpt::graphs::CNetworkOfPoses::getEdgeSquareError | ( | const typename BASE::edges_map_t::const_iterator & | itEdge, |
| bool | ignoreCovariances = true |
||
| ) | const [inline, inherited] |
Computes the square error of one pose constraints (edge) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error.
| std::exception | On global poses not in nodes |
Definition at line 220 of file CNetworkOfPoses.h.
| double mrpt::graphs::CNetworkOfPoses::getEdgeSquareError | ( | const TNodeID | from_id, |
| const TNodeID | to_id, | ||
| bool | ignoreCovariances = true |
||
| ) | const [inline, inherited] |
Computes the square error of one pose constraints (edge) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error.
| std::exception | On edge not existing or global poses not in nodes |
Definition at line 226 of file CNetworkOfPoses.h.
| double mrpt::graphs::CNetworkOfPoses::getGlobalSquareError | ( | bool | ignoreCovariances = true | ) | const [inline, inherited] |
Computes the overall square error from all the pose constraints (edges) with respect to the global poses in If ignoreCovariances is false, the squared Mahalanobis distance will be computed instead of the straight square error.
| std::exception | On global poses not in nodes |
Definition at line 208 of file CNetworkOfPoses.h.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::graphs::CNetworkOfPoses2DInf::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
| void mrpt::graphs::CNetworkOfPoses::loadFromTextFile | ( | const std::string & | fileName, |
| bool | collapse_dup_edges = true |
||
| ) | [inline, inherited] |
Loads from a text file in the format used by TORO & HoG-man (more on the format here ) Recognized line entries are: VERTEX2, VERTEX3, EDGE2, EDGE3, EQUIV.
If an unknown entry is found, a warning is dumped to std::cerr (only once for each unknown keyword). An exception will be raised if trying to load a 3D graph into a 2D class (in the opposite case, missing 3D data will default to zero).
| fileName | The file to load. |
| collapse_dup_edges | If true, collapseDuplicatedEdges will be called automatically after loading (note that this operation may take significant time for very large graphs). |
| On | any error, as a malformed line or loading a 3D graph in a 2D graph. |
Definition at line 180 of file CNetworkOfPoses.h.
| size_t mrpt::graphs::CNetworkOfPoses::nodeCount | ( | ) | const [inline, inherited] |
Return number of nodes in the list of global coordinates (may be differente that all nodes appearing in edges)
Definition at line 244 of file CNetworkOfPoses.h.
| virtual void mrpt::utils::CSerializable::readFromStream | ( | mrpt::utils::CStream & | in, |
| int | version | ||
| ) | [protected, pure virtual, inherited] |
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 |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
| void mrpt::graphs::CNetworkOfPoses::saveToTextFile | ( | const std::string & | fileName | ) | const [inline, inherited] |
Saves to a text file in the format used by TORO & HoG-man (more on the format here ) For 2D graphs only VERTEX2 & EDGE2 entries will be saved, and VERTEX3 & EDGE3 entries for 3D graphs.
Note that EQUIV entries will not be saved, but instead several EDGEs will be stored between the same node IDs.
| On | any error |
Definition at line 167 of file CNetworkOfPoses.h.
| virtual void mrpt::utils::CSerializable::writeToStream | ( | mrpt::utils::CStream & | out, |
| int * | getVersion | ||
| ) | const [protected, pure virtual, inherited] |
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 |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
friend class mrpt::utils::CStream [friend, inherited] |
Reimplemented in mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CObservation, mrpt::slam::CMetricMap, mrpt::opengl::CRenderizable, mrpt::poses::CPose3DQuatPDF, mrpt::poses::CPointPDF, mrpt::poses::CPose3DPDF, mrpt::poses::CPosePDF, mrpt::poses::CPoint2DPDF, mrpt::opengl::CRenderizableDisplayList, mrpt::slam::CAction, mrpt::detectors::CDetectableObject, mrpt::opengl::CTexturedObject, and mrpt::reactivenav::CHolonomicLogFileRecord.
Definition at line 56 of file CSerializable.h.
mrpt::utils::CLASSINIT mrpt::graphs::CNetworkOfPoses2DInf::_init_CNetworkOfPoses2DInf [static, protected] |
Definition at line 327 of file CNetworkOfPoses.h.
Definition at line 327 of file CNetworkOfPoses.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject [static, inherited] |
const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable [static, inherited] |
Definition at line 56 of file CSerializable.h.
Definition at line 327 of file CNetworkOfPoses.h.
bool mrpt::graphs::CNetworkOfPoses::edges_store_inverse_poses [inherited] |
False (default) if an edge i->j stores the normal relative pose of j as seen from i:
True if an edge i->j stores the inverse relateive pose, that is, i as seen from j:
.
Definition at line 153 of file CNetworkOfPoses.h.
global_poses_t mrpt::graphs::CNetworkOfPoses::nodes [inherited] |
The nodes (vertices) of the graph, with their estimated "global" (with respect to root) position, without an associated covariance.
Definition at line 145 of file CNetworkOfPoses.h.
TNodeID mrpt::graphs::CNetworkOfPoses::root [inherited] |
The ID of the node that is the origin of coordinates, used as reference by all coordinates in .
By default, root is the ID "0".
Definition at line 148 of file CNetworkOfPoses.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |