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: // typedefs typedef std::shared_ptr<mrpt::kinematics ::CVehicleVelCmd_DiffDriven> Ptr; typedef std::shared_ptr<const mrpt::kinematics ::CVehicleVelCmd_DiffDriven> ConstPtr; typedef std::unique_ptr<mrpt::kinematics ::CVehicleVelCmd_DiffDriven> UniquePtr; typedef std::unique_ptr<const mrpt::kinematics ::CVehicleVelCmd_DiffDriven> ConstUniquePtr; // fields static constexpr const char* className = "mrpt::kinematics" "::" "CVehicleVelCmd_DiffDriven"; double lin_vel {.0}; double ang_vel {.0}; // 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; 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: // 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<CVehicleVelCmd> Ptr; typedef std::shared_ptr<const CVehicleVelCmd> ConstPtr; // structs struct TVelCmdParams; // 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(); 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;
Typedefs
typedef std::shared_ptr<mrpt::kinematics ::CVehicleVelCmd_DiffDriven> Ptr
A type for the associated smart pointer.
Fields
double lin_vel {.0}
Linear velocity (m/s)
double ang_vel {.0}
Angular velocity (rad/s)
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.
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