9 #ifndef CActionCollection_H
10 #define CActionCollection_H
35 std::deque<mrpt::utils::poly_ptr_ptr<CAction::Ptr>>
m_actions;
46 typedef std::deque<mrpt::utils::poly_ptr_ptr<CAction::Ptr>>
::iterator
131 template <
typename T>
135 size_t foundCount = 0;
138 if ((*it)->GetRuntimeClass()->derivedFrom(class_ID))
139 if (foundCount++ == ith)
140 return std::dynamic_pointer_cast<T>(it->get_ptr());
141 return typename T::Ptr();
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Declares a class for storing a collection of robot actions.
CActionRobotMovement2D::Ptr getMovementEstimationByType(CActionRobotMovement2D::TEstimationMethod method)
Returns the pose increment estimator in the collection having the specified type.
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:
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...
T::Ptr getActionByClass(const size_t &ith=0) const
Access to the i'th action of a given class, or a nullptr smart pointer if there is no action of that ...
void insert(CAction &action)
Add a new object to the list.
std::deque< mrpt::utils::poly_ptr_ptr< CAction::Ptr > >::const_iterator const_iterator
You can use CActionCollection::begin to get a iterator to the first element.
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...
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...
CActionRobotMovement2D::Ptr getBestMovementEstimation() const
Returns the best pose increment estimator in the collection, based on the determinant of its pose cha...
void clear()
Erase all actions from the list.
iterator end()
Returns a iterator pointing to the end of the list: this is an example of usage:
std::deque< mrpt::utils::poly_ptr_ptr< CAction::Ptr > >::iterator iterator
You can use CActionCollection::begin to get a iterator to the first element.
std::deque< mrpt::utils::poly_ptr_ptr< CAction::Ptr > > m_actions
The robot "actionss".
void eraseByIndex(const size_t &index)
Remove an action from the list by its index.
size_t size()
Returns the actions count in the collection.
CAction::Ptr get(size_t index)
Access the i'th action.DO NOT MODIFY the returned object, make a copy of ir with "CSerializable::dupl...
Declares a class for storing a robot action.
std::shared_ptr< CAction > Ptr
std::shared_ptr< CActionRobotMovement2D > Ptr
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.
GLubyte GLubyte GLubyte a
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A structure that holds runtime class type information.