Main MRPT website > C++ reference for MRPT 1.5.7
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  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(CVehicleVelCmd_DiffDriven, CVehicleVelCmd, KINEMATICS_IMPEXP)
18 
19  /** Kinematic model for Ackermann-like or differential-driven vehicles.
20  *
21  * \ingroup mrpt_kinematics_grp
22  */
24  {
26  public:
27  double lin_vel; //!< Linear velocity (m/s)
28  double ang_vel; //!< Angular velocity (rad/s)
29 
31  virtual ~CVehicleVelCmd_DiffDriven();
32  size_t getVelCmdLength() const MRPT_OVERRIDE;
33  std::string getVelCmdDescription(const int index) const MRPT_OVERRIDE;
34  double getVelCmdElement(const int index) const MRPT_OVERRIDE;
35  void setVelCmdElement(const int index, const double val) MRPT_OVERRIDE;
36  bool isStopCmd() const MRPT_OVERRIDE;
37  void setToStop() MRPT_OVERRIDE;
38 
39  /** See docs of method in base class. The implementation for differential-driven robots of this method
40  * just multiplies all the components of vel_cmd times vel_scale, which is appropriate
41  * for differential-driven kinematic models (v,w).
42  */
43  void cmdVel_scale(double vel_scale) MRPT_OVERRIDE;
44 
45  /** See base class docs.
46  * Tecognizes these parameters: `robotMax_V_mps`, `robotMax_W_degps` */
47  double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) MRPT_OVERRIDE;
48 
49  private:
50  double filter_max_vw(double &v, double &w, const TVelCmdParams &p);
51  };
52  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(CVehicleVelCmd_DiffDriven, CVehicleVelCmd, KINEMATICS_IMPEXP)
53 
54  } // End of namespace
55 } // End of namespace
const GLdouble * v
Definition: glew.h:1296
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
GLubyte GLubyte GLubyte GLubyte w
Definition: glew.h:1797
STL namespace.
Virtual base for velocity commands of different kinematic models of planar mobile robot...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
GLfloat GLfloat p
Definition: glew.h:10113
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...
GLuint index
Definition: glew.h:1721
GLfloat * params
Definition: glew.h:1436
GLuint GLfloat * val
Definition: glew.h:7785
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Parameters that may be used by cmdVel_limits() in any derived classes.
Kinematic model for Ackermann-like or differential-driven vehicles.



Page generated by Doxygen 1.8.11 for MRPT 1.5.7 Git: 2190203 Tue May 15 02:01:15 2018 +0200 at miƩ may 16 12:40:16 CEST 2018