Declares a class for storing a collection of robot actions.
It is used in mrpt::obs::CRawlog, for logs storage and particle filter based simulations.
Definition at line 30 of file obs/CActionCollection.h.
#include <mrpt/obs/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 (mrpt::poses::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 (mrpt::poses::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. | |
Protected Member Functions | |
CSerializable virtual methods | |
| void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const MRPT_OVERRIDE |
| void | readFromStream (mrpt::utils::CStream &in, int version) MRPT_OVERRIDE |
Protected Attributes | |
| std::deque< CActionPtr > | m_actions |
| The actions: | |
RTTI stuff <br> | |
| 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 MRPT_OVERRIDE |
| virtual mrpt::utils::CObject * | duplicate () const MRPT_OVERRIDE |
| static mrpt::utils::CObject * | CreateObject () |
| static CActionCollectionPtr | Create () |
| typedef std::deque<CActionPtr>::const_iterator mrpt::obs::CActionCollection::const_iterator |
You can use CActionCollection::begin to get a iterator to the first element.
Definition at line 67 of file obs/CActionCollection.h.
| typedef std::deque<CActionPtr>::iterator mrpt::obs::CActionCollection::iterator |
You can use CActionCollection::begin to get a iterator to the first element.
Definition at line 63 of file obs/CActionCollection.h.
A typedef for the associated smart pointer
Definition at line 33 of file obs/CActionCollection.h.
| mrpt::obs::CActionCollection::CActionCollection | ( | ) |
Constructor.
| mrpt::obs::CActionCollection::CActionCollection | ( | CAction & | a | ) |
Constructor from a single action.
| mrpt::obs::CActionCollection::CActionCollection | ( | const CActionCollection & | o | ) |
Copy Constructor.
|
virtual |
Destructor.
|
staticprotected |
|
inline |
Returns a iterator to the first action: this is an example of usage:
Definition at line 93 of file obs/CActionCollection.h.
|
inline |
Returns a iterator to the first action: this is an example of usage:
Definition at line 80 of file obs/CActionCollection.h.
| void mrpt::obs::CActionCollection::clear | ( | ) |
Erase all actions from the list.
|
static |
|
static |
|
virtual |
|
inline |
Returns a iterator pointing to the end of the list: this is an example of usage:
Definition at line 119 of file obs/CActionCollection.h.
|
inline |
Returns a iterator pointing to the end of the list: this is an example of usage:
Definition at line 106 of file obs/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::obs::CActionCollection::eraseByIndex | ( | const size_t & | index | ) |
Remove an action from the list by its index.
| std::exception | On index out of bounds. |
| CActionPtr mrpt::obs::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. |
|
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:
By default (ith=0), the first one is returned.
Definition at line 144 of file obs/CActionCollection.h.
References begin(), end(), MRPT_END, and MRPT_START.
Referenced by mrpt::slam::PF_implementation< PARTICLE_TYPE, MYSELF >::PF_SLAM_implementation_pfStandardProposal().
| CActionRobotMovement2DPtr mrpt::obs::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< PARTICLE_TYPE, MYSELF >::PF_SLAM_implementation_gatherActionsCheckBothActObs(), and mrpt::slam::PF_implementation< PARTICLE_TYPE, MYSELF >::PF_SLAM_implementation_pfStandardProposal().
| bool mrpt::obs::CActionCollection::getFirstMovementEstimation | ( | mrpt::poses::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::obs::CActionCollection::getFirstMovementEstimationMean | ( | mrpt::poses::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::obs::CActionCollection::getMovementEstimationByType | ( | CActionRobotMovement2D::TEstimationMethod | method | ) |
Returns the pose increment estimator in the collection having the specified type.
|
virtual |
| void mrpt::obs::CActionCollection::insert | ( | CAction & | action | ) |
Add a new object to the list.
| CActionCollection & mrpt::obs::CActionCollection::operator= | ( | const CActionCollection & | o | ) |
Copy operator.
|
protected |
| size_t mrpt::obs::CActionCollection::size | ( | ) |
Returns the actions count in the collection.
|
protected |
|
staticprotected |
Definition at line 33 of file obs/CActionCollection.h.
|
static |
Definition at line 33 of file obs/CActionCollection.h.
|
static |
Definition at line 33 of file obs/CActionCollection.h.
|
protected |
The actions:
Definition at line 38 of file obs/CActionCollection.h.
| Page generated by Doxygen 1.9.8 for MRPT 1.4.0 SVN: at Thu Dec 14 16:54:58 UTC 2023 |