Go to the documentation of this file.
33 out.WriteAs<uint32_t>(m_actions.size());
34 for (
const auto& a : *
this)
out << *a;
45 m_actions.resize(in.
ReadAs<uint32_t>());
49 ObjectReadFromStreamToPtrs<CAction::Ptr>(&in));
68 return m_actions.at(index).get_ptr();
75 return *(m_actions.at(index).get_ptr());
87 m_actions.emplace_back(
100 for (
const auto& it : *
this)
102 if (it->GetRuntimeClass()->derivedFrom(
106 std::dynamic_pointer_cast<CActionRobotMovement2D>(it.get_ptr());
108 if (temp->estimationMethod ==
114 double det = temp->poseChange->getCovariance().det();
135 auto it = m_actions.begin() + index;
146 for (
auto& it : *
this)
148 if (it->GetRuntimeClass()->derivedFrom(
152 std::dynamic_pointer_cast<CActionRobotMovement2D>(it.get_ptr());
155 if (temp->estimationMethod == method)
175 return m_actions.erase(it);
183 CPose3D& out_pose_increment)
const
186 getActionByClass<CActionRobotMovement3D>();
189 out_pose_increment = act3D->poseChange.mean;
193 getActionByClass<CActionRobotMovement2D>();
196 out_pose_increment =
CPose3D(act2D->poseChange->getMeanVal());
209 getActionByClass<CActionRobotMovement3D>();
212 out_pose_increment = act3D->poseChange;
216 getActionByClass<CActionRobotMovement2D>();
219 out_pose_increment.
copyFrom(*act2D->poseChange);
Declares a class that represents a Probability Density function (PDF) of a 3D pose .
void clear()
Clear the contents of this container.
const_iterator end() const
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...
virtual CObject * clone() const =0
Returns a deep copy (clone) of the object, indepently of its class.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
mrpt::vision::TStereoCalibResults out
Declares a class for storing a collection of robot actions.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::shared_ptr< mrpt::obs ::CActionRobotMovement3D > Ptr
void eraseByIndex(size_t index)
Remove an action from the list by its index.
Represents a probabilistic 2D movement of the robot mobile base.
#define THROW_EXCEPTION(msg)
#define ASSERT_(f)
Defines an assertion mechanism.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::shared_ptr< mrpt::obs ::CActionRobotMovement2D > Ptr
std::deque< mrpt::containers::deepcopy_poly_ptr< CAction::Ptr > >::iterator iterator
You can use CActionCollection::begin to get a iterator to the first element.
This namespace contains representation of robot actions and observations.
Virtual base class for "archives": classes abstracting I/O streams.
const_iterator begin() const
CActionRobotMovement2D::Ptr getMovementEstimationByType(CActionRobotMovement2D::TEstimationMethod method)
Returns the pose increment estimator in the collection having the specified type.
STORED_TYPE ReadAs()
De-serialize a variable and returns it by value.
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
CActionRobotMovement2D::Ptr getBestMovementEstimation() const
Returns the best pose increment estimator in the collection, based on the determinant of its pose cha...
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
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...
void insert(CAction &action)
Add a new object to the list.
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...
std::shared_ptr< CAction > Ptr
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
Declares a class for storing a robot action.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void clear()
Erase all actions from the list.
void copyFrom(const CPose3DPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations)
size_t size()
Returns the actions count in the collection.
TEstimationMethod
A list of posible ways for estimating the content of a CActionRobotMovement2D object.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020 | |