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-2017, 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;
27  /** Angular velocity (rad/s) */
28  double ang_vel;
29 
32  size_t getVelCmdLength() const override;
33  std::string getVelCmdDescription(const int index) const override;
34  double getVelCmdElement(const int index) const override;
35  void setVelCmdElement(const int index, const double val) override;
36  bool isStopCmd() const override;
37  void setToStop() override;
38 
39  /** See docs of method in base class. The implementation for
40  * differential-driven robots of this method
41  * just multiplies all the components of vel_cmd times vel_scale, which is
42  * appropriate
43  * for differential-driven kinematic models (v,w).
44  */
45  void cmdVel_scale(double vel_scale) override;
46 
47  /** See base class docs.
48  * Tecognizes these parameters: `robotMax_V_mps`, `robotMax_W_degps` */
49  double cmdVel_limits(
50  const mrpt::kinematics::CVehicleVelCmd& prev_vel_cmd, const double beta,
51  const TVelCmdParams& params) override;
52 
53  private:
54  double filter_max_vw(double& v, double& w, const TVelCmdParams& p);
55 };
56 
57 } // End of namespace
58 } // End of namespace
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.
Parameters that may be used by cmdVel_limits() in any derived classes.
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: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019