class mrpt::kinematics::CVehicleVelCmd_DiffDriven
Overview
Kinematic model for Ackermann-like or differential-driven vehicles.
#include <mrpt/kinematics/CVehicleVelCmd_DiffDriven.h> class CVehicleVelCmd_DiffDriven: public mrpt::kinematics::CVehicleVelCmd { public: // fields double lin_vel {.0}; double ang_vel {.0}; // methods virtual size_t getVelCmdLength() const; virtual std::string getVelCmdDescription(const int index) const; virtual double getVelCmdElement(const int index) const; virtual void setVelCmdElement(const int index, const double val); virtual bool isStopCmd() const; virtual void setToStop(); virtual void cmdVel_scale(double vel_scale); virtual double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta, const TVelCmdParams& params); };
Inherited Members
public: // structs struct TVelCmdParams; // methods CVehicleVelCmd& operator = (const CVehicleVelCmd& other); virtual size_t getVelCmdLength() const = 0; virtual std::string getVelCmdDescription(const int index) const = 0; virtual double getVelCmdElement(const int index) const = 0; virtual void setVelCmdElement(const int index, const double val) = 0; virtual bool isStopCmd() const = 0; virtual void setToStop() = 0; virtual std::string asString() const; virtual void cmdVel_scale(double vel_scale) = 0; virtual double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta, const TVelCmdParams& params) = 0;
Fields
double lin_vel {.0}
Linear velocity (m/s)
double ang_vel {.0}
Angular velocity (rad/s)
Methods
virtual size_t getVelCmdLength() const
Get number of components in each velocity command.
virtual std::string getVelCmdDescription(const int index) const
Get textual, human-readable description of each velocity command component.
virtual double getVelCmdElement(const int index) const
Get each velocity command component.
virtual void setVelCmdElement(const int index, const double val)
Set each velocity command component.
virtual bool isStopCmd() const
Returns true if the command means “do not move” / “stop”.
See also:
virtual void setToStop()
Set to a command that means “do not move” / “stop”.
See also:
virtual void cmdVel_scale(double vel_scale)
See docs of method in base class.
The implementation for differential-driven robots of this method just multiplies all the components of vel_cmd times vel_scale, which is appropriate for differential-driven kinematic models (v,w).
virtual double cmdVel_limits( const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta, const TVelCmdParams& params )
See base class docs.
Tecognizes these parameters: robotMax_V_mps
, robotMax_W_degps