22 const int index)
const
109 ASSERTMSG_(prevcmd,
"Expected prevcmd of type `CVehicleVelCmd_DiffDriven`");
136 double speed_scale = 1.0;
138 if (std::abs(
v) >
p.robotMax_V_mps)
141 const double F = std::abs(
p.robotMax_V_mps /
v);
147 if (std::abs(
w) >
p.robotMax_W_radps)
150 const double F = std::abs(
p.robotMax_W_radps /
w);
IMPLEMENTS_SERIALIZABLE(CVehicleVelCmd_DiffDriven, CVehicleVelCmd, mrpt::kinematics) CVehicleVelCmd_DiffDriven
Kinematic model for Ackermann-like or differential-driven vehicles.
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
bool isStopCmd() const override
Returns true if the command means "do not move" / "stop".
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
void cmdVel_scale(double vel_scale) override
See docs of method in base class.
void setToStop() override
Set to a command that means "do not move" / "stop".
virtual ~CVehicleVelCmd_DiffDriven()
double ang_vel
Angular velocity (rad/s)
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams ¶ms) override
See base class docs.
double lin_vel
Linear velocity (m/s)
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
size_t getVelCmdLength() const override
Get number of components in each velocity command.
std::string getVelCmdDescription(const int index) const override
Get textual, human-readable description of each velocity command component.
double getVelCmdElement(const int index) const override
Get each velocity command component.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
Virtual base for velocity commands of different kinematic models of planar mobile robot.
Virtual base class for "archives": classes abstracting I/O streams.
#define ASSERT_(f)
Defines an assertion mechanism.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
GLubyte GLubyte GLubyte GLubyte w
GLenum const GLfloat * params
GLsizei const GLchar ** string
Parameters that may be used by cmdVel_limits() in any derived classes.