Declares a class for storing a collection of robot actions.
It is used in mrpt::slam::CRawlog, for logs storage and particle filter based simulations.
#include <mrpt/slam/CActionCollection.h>

Public Types | |
| typedef std::deque< CActionPtr > ::iterator | iterator |
| You can use CActionCollection::begin to get a iterator to the first element. | |
| typedef std::deque< CActionPtr > ::const_iterator | const_iterator |
| You can use CActionCollection::begin to get a iterator to the first element. | |
Public Member Functions | |
| CActionCollection () | |
| Constructor. | |
| CActionCollection (CAction &a) | |
| Constructor from a single action. | |
| CActionCollection (const CActionCollection &o) | |
| Copy Constructor. | |
| CActionCollection & | operator= (const CActionCollection &o) |
| Copy operator. | |
| virtual | ~CActionCollection () |
| Destructor. | |
| const_iterator | begin () const |
| Returns a iterator to the first action: this is an example of usage: | |
| iterator | begin () |
| Returns a iterator to the first action: this is an example of usage: | |
| const_iterator | end () const |
| Returns a iterator pointing to the end of the list: this is an example of usage: | |
| iterator | end () |
| Returns a iterator pointing to the end of the list: this is an example of usage: | |
| iterator | erase (const iterator &it) |
| Removes the given action in the list, and return an iterator to the next element (or this->end() if it was the last one). | |
| void | clear () |
| Erase all actions from the list. | |
| CActionPtr | get (size_t index) |
| Access the i'th action.DO NOT MODIFY the returned object, make a copy of ir with "CSerializable::duplicate" if desired. | |
| template<typename T > | |
| T::SmartPtr | getActionByClass (const size_t &ith=0) const |
| Access to the i'th action of a given class, or a NULL smart pointer if there is no action of that class in the list. | |
| void | insert (CAction &action) |
| Add a new object to the list. | |
| size_t | size () |
| Returns the actions count in the collection. | |
| CActionRobotMovement2DPtr | getBestMovementEstimation () const |
| Returns the best pose increment estimator in the collection, based on the determinant of its pose change covariance matrix. | |
| CActionRobotMovement2DPtr | getMovementEstimationByType (CActionRobotMovement2D::TEstimationMethod method) |
| Returns the pose increment estimator in the collection having the specified type. | |
| bool | getFirstMovementEstimationMean (CPose3D &out_pose_increment) const |
| Look for the first 2D or 3D "odometry" found in this collection of actions, and return the "mean" increment of the robot according to it. | |
| bool | getFirstMovementEstimation (CPose3DPDFGaussian &out_pose_increment) const |
| Look for the first 2D or 3D "odometry" found in this collection of actions, and return the "mean" increment of the robot and its covariance according to it. | |
| void | eraseByIndex (const size_t &index) |
| Remove an action from the list by its index. | |
| 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. | |
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. | |
Protected Attributes | |
| std::deque< CActionPtr > | m_actions |
| The actions: | |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCSerializable |
| class | mrpt::utils::CStream |
RTTI stuff | |
| typedef CActionCollectionPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CActionCollection |
| static mrpt::utils::TRuntimeClassId | classCActionCollection |
| 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 CActionCollectionPtr | Create () |
You can use CActionCollection::begin to get a iterator to the first element.
Definition at line 86 of file CActionCollection.h.
You can use CActionCollection::begin to get a iterator to the first element.
Definition at line 82 of file CActionCollection.h.
A typedef for the associated smart pointer
Definition at line 52 of file CActionCollection.h.
| mrpt::slam::CActionCollection::CActionCollection | ( | ) |
Constructor.
| mrpt::slam::CActionCollection::CActionCollection | ( | CAction & | a | ) |
Constructor from a single action.
| mrpt::slam::CActionCollection::CActionCollection | ( | const CActionCollection & | o | ) |
Copy Constructor.
| virtual mrpt::slam::CActionCollection::~CActionCollection | ( | ) | [virtual] |
Destructor.
| static const mrpt::utils::TRuntimeClassId* mrpt::slam::CActionCollection::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::utils::CSerializable.
| const_iterator mrpt::slam::CActionCollection::begin | ( | ) | const [inline] |
Returns a iterator to the first action: this is an example of usage:
CActionCollection acts; ... for (CActionCollection::iterator it=acts.begin();it!=acts.end();++it) { (*it)->... // (*it) is a "CActionPtr" }
Definition at line 99 of file CActionCollection.h.
| iterator mrpt::slam::CActionCollection::begin | ( | ) | [inline] |
Returns a iterator to the first action: this is an example of usage:
CActionCollection acts; ... for (CActionCollection::iterator it=acts.begin();it!=acts.end();++it) { (*it)->... // (*it) is a "CActionPtr" }
Definition at line 112 of file CActionCollection.h.
| void mrpt::slam::CActionCollection::clear | ( | ) |
Erase all actions from the list.
| CObject* mrpt::utils::CObject::clone | ( | ) | const [inline, inherited] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.
| static CActionCollectionPtr mrpt::slam::CActionCollection::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::slam::CActionCollection::CreateObject | ( | ) | [static] |
| virtual mrpt::utils::CObject* mrpt::slam::CActionCollection::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] |
| const_iterator mrpt::slam::CActionCollection::end | ( | ) | const [inline] |
Returns a iterator pointing to the end of the list: this is an example of usage:
CActionCollection acts; ... for (CActionCollection::iterator it=acts.begin();it!=acts.end();++it) { (*it)->... // (*it) is a "CActionPtr" }
Definition at line 125 of file CActionCollection.h.
| iterator mrpt::slam::CActionCollection::end | ( | ) | [inline] |
Returns a iterator pointing to the end of the list: this is an example of usage:
CActionCollection acts; ... for (CActionCollection::iterator it=acts.begin();it!=acts.end();++it) { (*it)->... // (*it) is a "CActionPtr" }
Definition at line 138 of file CActionCollection.h.
Removes the given action in the list, and return an iterator to the next element (or this->end() if it was the last one).
| void mrpt::slam::CActionCollection::eraseByIndex | ( | const size_t & | index | ) |
Remove an action from the list by its index.
| std::exception | On index out of bounds. |
| CActionPtr mrpt::slam::CActionCollection::get | ( | size_t | index | ) |
Access the i'th action.DO NOT MODIFY the returned object, make a copy of ir with "CSerializable::duplicate" if desired.
First element is 0.
| std::exception | On index out of bounds. |
| T::SmartPtr mrpt::slam::CActionCollection::getActionByClass | ( | const size_t & | ith = 0 | ) | const [inline] |
Access to the i'th action of a given class, or a NULL smart pointer if there is no action of that class in the list.
Example:
CActionRobotMovement2DPtr obs = acts->getActionByClass<CActionRobotMovement2D>();
By default (ith=0), the first one is returned.
Definition at line 163 of file CActionCollection.h.
References MRPT_START, begin(), end(), and MRPT_END.
Referenced by mrpt::slam::PF_implementation::PF_SLAM_implementation_gatherActionsCheckBothActObs(), and mrpt::slam::PF_implementation::PF_SLAM_implementation_pfStandardProposal().
| CActionRobotMovement2DPtr mrpt::slam::CActionCollection::getBestMovementEstimation | ( | ) | const |
Returns the best pose increment estimator in the collection, based on the determinant of its pose change covariance matrix.
Referenced by mrpt::slam::PF_implementation::PF_SLAM_implementation_gatherActionsCheckBothActObs(), and mrpt::slam::PF_implementation::PF_SLAM_implementation_pfStandardProposal().
| bool mrpt::slam::CActionCollection::getFirstMovementEstimation | ( | CPose3DPDFGaussian & | out_pose_increment | ) | const |
Look for the first 2D or 3D "odometry" found in this collection of actions, and return the "mean" increment of the robot and its covariance according to it.
| bool mrpt::slam::CActionCollection::getFirstMovementEstimationMean | ( | CPose3D & | out_pose_increment | ) | const |
Look for the first 2D or 3D "odometry" found in this collection of actions, and return the "mean" increment of the robot according to it.
| CActionRobotMovement2DPtr mrpt::slam::CActionCollection::getMovementEstimationByType | ( | CActionRobotMovement2D::TEstimationMethod | method | ) |
Returns the pose increment estimator in the collection having the specified type.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CActionCollection::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
| void mrpt::slam::CActionCollection::insert | ( | CAction & | action | ) |
Add a new object to the list.
| CActionCollection& mrpt::slam::CActionCollection::operator= | ( | const CActionCollection & | o | ) |
Copy operator.
| 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.
| size_t mrpt::slam::CActionCollection::size | ( | ) |
Returns the actions count in the collection.
| 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::slam::CActionCollection::_init_CActionCollection [static, protected] |
Definition at line 52 of file CActionCollection.h.
Definition at line 52 of file CActionCollection.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.
const mrpt::utils::TRuntimeClassId* mrpt::slam::CActionCollection::classinfo [static] |
Definition at line 52 of file CActionCollection.h.
std::deque<CActionPtr> mrpt::slam::CActionCollection::m_actions [protected] |
The actions:
Definition at line 57 of file CActionCollection.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |