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  };
53 
54  } // End of namespace
55 } // End of namespace
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
STL namespace.
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3962
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...
GLuint index
Definition: glext.h:3891
int val
Definition: mrpt_jpeglib.h:953
const GLdouble * v
Definition: glext.h:3603
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...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Parameters that may be used by cmdVel_limits() in any derived classes.
GLfloat GLfloat p
Definition: glext.h:5587
GLenum const GLfloat * params
Definition: glext.h:3514
Kinematic model for Ackermann-like or differential-driven vehicles.



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019