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