21 : lin_vel(.0), ang_vel(.0)
24 CVehicleVelCmd_DiffDriven::~CVehicleVelCmd_DiffDriven() {}
27 const int index)
const 118 ASSERTMSG_(prevcmd,
"Expected prevcmd of type `CVehicleVelCmd_DiffDriven`");
145 double speed_scale = 1.0;
147 if (std::abs(
v) >
p.robotMax_V_mps)
150 const double F = std::abs(
p.robotMax_V_mps /
v);
156 if (std::abs(
w) >
p.robotMax_W_radps)
159 const double F = std::abs(
p.robotMax_W_radps /
w);
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
GLubyte GLubyte GLubyte GLubyte w
Virtual base for velocity commands of different kinematic models of planar mobile robot...
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams ¶ms) override
See base class docs.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void setToStop() override
Set to a command that means "do not move" / "stop".
double ang_vel
Angular velocity (rad/s)
CVehicleVelCmd_DiffDriven()
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
GLsizei const GLchar ** string
double lin_vel
Linear velocity (m/s)
IMPLEMENTS_SERIALIZABLE(CVehicleVelCmd_DiffDriven, CVehicleVelCmd, mrpt::kinematics) CVehicleVelCmd_DiffDriven
size_t getVelCmdLength() const override
Get number of components in each velocity command.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
bool isStopCmd() const override
Returns true if the command means "do not move" / "stop".
double getVelCmdElement(const int index) const override
Get each velocity command component.
std::string getVelCmdDescription(const int index) const override
Get textual, human-readable description of each velocity command component.
Parameters that may be used by cmdVel_limits() in any derived classes.
#define ASSERTMSG_(f, __ERROR_MSG)
GLenum const GLfloat * params
void cmdVel_scale(double vel_scale) override
See docs of method in base class.
Kinematic model for Ackermann-like or differential-driven vehicles.