9#ifndef CActionCollection_H
10#define CActionCollection_H
134 CActionPtr
get(
size_t index);
143 template <
typename T>
147 size_t foundCount = 0;
150 if ( (*it)->GetRuntimeClass()->derivedFrom( class_ID ) )
151 if (foundCount++ == ith)
152 return typename T::SmartPtr(*it);
153 return typename T::SmartPtr();
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Declares a class for storing a collection of robot actions.
std::deque< CActionPtr >::const_iterator const_iterator
You can use CActionCollection::begin to get a iterator to the first element.
const_iterator end() const
Returns a iterator pointing to the end of the list: this is an example of usage:
iterator begin()
Returns a iterator to the first action: this is an example of usage:
const_iterator begin() const
Returns a iterator to the first action: this is an example of usage:
size_t size()
Returns the actions count in the collection.
virtual ~CActionCollection()
Destructor.
void clear()
Erase all actions from the list.
CActionRobotMovement2DPtr getBestMovementEstimation() const
Returns the best pose increment estimator in the collection, based on the determinant of its pose cha...
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" inc...
std::deque< CActionPtr > m_actions
The actions:
CActionCollection(const CActionCollection &o)
Copy Constructor.
void insert(CAction &action)
Add a new object to the list.
CActionCollection()
Constructor.
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 i...
CActionRobotMovement2DPtr getMovementEstimationByType(CActionRobotMovement2D::TEstimationMethod method)
Returns the pose increment estimator in the collection having the specified type.
CActionCollection(CAction &a)
Constructor from a single action.
CActionPtr get(size_t index)
Access the i'th action.DO NOT MODIFY the returned object, make a copy of ir with "CSerializable::dupl...
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 cla...
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" inc...
std::deque< CActionPtr >::iterator iterator
You can use CActionCollection::begin to get a iterator to the first element.
void eraseByIndex(const size_t &index)
Remove an action from the list by its index.
Declares a class for storing a robot action.
TEstimationMethod
A list of posible ways for estimating the content of a CActionRobotMovement2D object.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents a Probability Density function (PDF) of a 3D pose .
The virtual base class which provides a unified interface for all persistent objects in MRPT.
const Scalar * const_iterator
EIGEN_STRONG_INLINE iterator begin()
EIGEN_STRONG_INLINE iterator end()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A structure that holds runtime class type information.