class mrpt::kinematics::CVehicleSimul_Holo

Python API: mrpt.kinematics.CVehicleSimul_Holo

Overview

Kinematic simulator of a holonomic 2D robot capable of moving in any direction, with “blended” velocity profiles.

See CVehicleSimul_Holo::sendVelCmd() for a description of the velocity commands in this kinematic model.

#include <mrpt/kinematics/CVehicleSimul_Holo.h>

class CVehicleSimul_Holo: public mrpt::kinematics::CVehicleSimulVirtualBase
{
public:
    // typedefs

    typedef CVehicleVelCmd_Holo kinematic_cmd_t;

    // structs

    struct TVelRampCmd;

    // construction

    CVehicleSimul_Holo();

    // methods

    void sendVelRampCmd(double vel, double dir, double ramp_time, double rot_speed);
    virtual void sendVelCmd(const CVehicleVelCmd& cmd_vel);
    virtual CVehicleVelCmd::Ptr getVelCmdType() const;
};

Inherited Members

public:
    // methods

    void simulateOneTimeStep(const double dt);
    const mrpt::math::TPose2D& getCurrentGTPose() const;
    void setCurrentGTPose(const mrpt::math::TPose2D& pose);
    const mrpt::math::TPose2D& getCurrentOdometricPose() const;

    template <typename T>
    void setCurrentOdometricPose(const T& pose);

    const mrpt::math::TTwist2D& getCurrentGTVel() const;
    mrpt::math::TTwist2D getCurrentGTVelLocal() const;
    const mrpt::math::TTwist2D& getCurrentOdometricVel() const;
    mrpt::math::TTwist2D getCurrentOdometricVelLocal() const;
    double getTime() const;
    virtual void sendVelCmd(const CVehicleVelCmd& cmd_vel) = 0;
    virtual CVehicleVelCmd::Ptr getVelCmdType() const = 0;

    void setOdometryErrors(
        bool enabled,
        double Ax_err_bias = 1e-3,
        double Ax_err_std = 10e-3,
        double Ay_err_bias = 1e-3,
        double Ay_err_std = 10e-3,
        double Aphi_err_bias = mrpt::DEG2RAD(1e-3),
        double Aphi_err_std = mrpt::DEG2RAD(10e-3)
        );

    void resetStatus();
    void resetTime();

Methods

void sendVelRampCmd(double vel, double dir, double ramp_time, double rot_speed)

Sends a velocity cmd to the holonomic robot.

Parameters:

vel

Linear speed (m/s)

dir

Direction (rad) (In the odometry frame of reference)

ramp_time

Blend the cmd during this period (seconds)

rot_speed

Rotational speed while there is heading error and to this constant (rad/s)

virtual void sendVelCmd(const CVehicleVelCmd& cmd_vel)

Sends a velocity command to the robot.

The number of components and their meaning depends on the vehicle-kinematics derived class

virtual CVehicleVelCmd::Ptr getVelCmdType() const

Gets an empty velocity command object that can be queried to find out the number of velcmd components,…