MRPT  1.9.9
CVehicleVelCmd_DiffDriven.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 
13 namespace mrpt::kinematics
14 {
15 /** Kinematic model for Ackermann-like or differential-driven vehicles.
16  *
17  * \ingroup mrpt_kinematics_grp
18  */
20 {
22  public:
23  /** Linear velocity (m/s) */
24  double lin_vel{.0};
25  /** Angular velocity (rad/s) */
26  double ang_vel{.0};
27 
28  ~CVehicleVelCmd_DiffDriven() override;
29  size_t getVelCmdLength() const override;
30  std::string getVelCmdDescription(const int index) const override;
31  double getVelCmdElement(const int index) const override;
32  void setVelCmdElement(const int index, const double val) override;
33  bool isStopCmd() const override;
34  void setToStop() override;
35 
36  /** See docs of method in base class. The implementation for
37  * differential-driven robots of this method
38  * just multiplies all the components of vel_cmd times vel_scale, which is
39  * appropriate
40  * for differential-driven kinematic models (v,w).
41  */
42  void cmdVel_scale(double vel_scale) override;
43 
44  /** See base class docs.
45  * Tecognizes these parameters: `robotMax_V_mps`, `robotMax_W_degps` */
46  double cmdVel_limits(
47  const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta,
48  const TVelCmdParams& params) override;
49 
50  private:
51  double filter_max_vw(double& v, double& w, const TVelCmdParams& p);
52 };
53 
54 } // namespace mrpt::kinematics
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:4199
Virtual base for velocity commands of different kinematic models of planar mobile robot...
size_t getVelCmdLength() const override
Get number of components in each velocity command.
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
See base class docs.
GLuint index
Definition: glext.h:4068
void setToStop() override
Set to a command that means "do not move" / "stop".
int val
Definition: mrpt_jpeglib.h:957
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
GLsizei const GLchar ** string
Definition: glext.h:4116
const GLdouble * v
Definition: glext.h:3684
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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.
GLfloat GLfloat p
Definition: glext.h:6398
GLenum const GLfloat * params
Definition: glext.h:3538
void cmdVel_scale(double vel_scale) override
See docs of method in base class.
Kinematic model for Ackermann-like or differential-driven vehicles.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019