class mrpt::obs::CActionRobotMovement3D

Overview

Represents a probabilistic motion increment in SE(3).

Odometry increments might be determined from visual odometry for full 3D, or from wheel encoders for 2D movements only.

The implemented model for creating a SE(3) Gaussian from an odometry increment is based on [1]

See also:

CAction, CActionRobotMovement3D,

#include <mrpt/obs/CActionRobotMovement3D.h>

class CActionRobotMovement3D: public mrpt::obs::CAction
{
public:
    // typedefs

    typedef std::shared_ptr<mrpt::obs ::CActionRobotMovement3D> Ptr;
    typedef std::shared_ptr<const mrpt::obs ::CActionRobotMovement3D> ConstPtr;
    typedef std::unique_ptr<mrpt::obs ::CActionRobotMovement3D> UniquePtr;
    typedef std::unique_ptr<const mrpt::obs ::CActionRobotMovement3D> ConstUniquePtr;

    // enums

    enum TDrawSampleMotionModel;
    enum TEstimationMethod;

    // structs

    struct TMotionModelOptions;

    // fields

    static constexpr const char* className = "mrpt::obs" "::" "CActionRobotMovement3D";
    mrpt::poses::CPose3DPDFGaussian poseChange {};
    mrpt::poses::CPose3D rawOdometryIncrementReading {};
    TEstimationMethod estimationMethod {emOdometry};
    struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions motionModelConfiguration;
    std::vector<bool> hasVelocities {false, false, false, false, false, false};
    mrpt::math::CVectorFloat velocities {6};

    // construction

    CActionRobotMovement3D();

    // methods

    static constexpr auto getClassName();
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    static std::shared_ptr<CObject> CreateObject();

    template <typename... Args>
    static Ptr Create(Args&&... args);

    template <typename Alloc, typename... Args>
    static Ptr CreateAlloc(
        const Alloc& alloc,
        Args&&... args
        );

    template <typename... Args>
    static UniquePtr CreateUnique(Args&&... args);

    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual mrpt::rtti::CObject* clone() const;
    void computeFromOdometry(const mrpt::poses::CPose3D& odometryIncrement, const TMotionModelOptions& options);
    void computeFromOdometry_model6DOF(const mrpt::poses::CPose3D& odometryIncrement, const TMotionModelOptions& o);
    virtual void getDescriptionAsText(std::ostream& o) const;
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<CObject> Ptr;
    typedef std::shared_ptr<const CObject> ConstPtr;
    typedef std::shared_ptr<CSerializable> Ptr;
    typedef std::shared_ptr<const CSerializable> ConstPtr;
    typedef std::shared_ptr<CAction> Ptr;
    typedef std::shared_ptr<const CAction> ConstPtr;

    // fields

    mrpt::system::TTimeStamp timestamp {INVALID_TIMESTAMP};

    // methods

    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual void getDescriptionAsText(std::ostream& o) const;
    std::string getDescriptionAsTextValue() const;

Typedefs

typedef std::shared_ptr<mrpt::obs ::CActionRobotMovement3D> Ptr

A type for the associated smart pointer.

Fields

mrpt::poses::CPose3DPDFGaussian poseChange {}

The 3D pose change probabilistic estimation.

It can be converted to/from these alternative classes:

mrpt::poses::CPose3D rawOdometryIncrementReading {}

This is the raw odometry reading, and only is used when “estimationMethod” is “TEstimationMethod::emOdometry”.

TEstimationMethod estimationMethod {emOdometry}

This fields indicates the way this estimation was obtained.

std::vector<bool> hasVelocities {false, false, false, false, false, false}

Each “true” entry means that the corresponding “velocities” element contains valid data - There are 6 entries.

mrpt::math::CVectorFloat velocities {6}

The velocity of the robot in each of 6D: v_x,v_y,v_z,v_yaw,v_pitch,v_roll (linear in meters/sec and angular in rad/sec).

Methods

virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const

Returns information about the class of an object in runtime.

virtual mrpt::rtti::CObject* clone() const

Returns a deep copy (clone) of the object, indepently of its class.

void computeFromOdometry(const mrpt::poses::CPose3D& odometryIncrement, const TMotionModelOptions& options)

Computes the PDF of the pose increment from an odometry reading and according to the given motion model (speed and encoder ticks information is not modified).

According to the parameters in the passed struct, it will be called one the private sampling functions (see “see also” next).

See also:

computeFromOdometry_model6DOF

void computeFromOdometry_model6DOF(const mrpt::poses::CPose3D& odometryIncrement, const TMotionModelOptions& o)

Computes the PDF of the pose increment from an odometry reading, using the motion model for 6 DOF.

Based on: [1]

See also:

computeFromOdometry

virtual void getDescriptionAsText(std::ostream& o) const

Build a detailed, multi-line textual description of the action contents and dump it to the output stream.

If overried by derived classes, call base CAction::getDescriptionAsText() first to show common information.