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::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 
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 }
55 
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Kinematic model for Ackermann-like or differential-driven vehicles.
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
bool isStopCmd() const override
Returns true if the command means "do not move" / "stop".
void cmdVel_scale(double vel_scale) override
See docs of method in base class.
void setToStop() override
Set to a command that means "do not move" / "stop".
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
See base class docs.
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
size_t getVelCmdLength() const override
Get number of components in each velocity command.
std::string getVelCmdDescription(const int index) const override
Get textual, human-readable description of each velocity command component.
double getVelCmdElement(const int index) const override
Get each velocity command component.
Virtual base for velocity commands of different kinematic models of planar mobile robot.
const GLdouble * v
Definition: glext.h:3678
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:4178
GLuint index
Definition: glext.h:4054
GLfloat GLfloat p
Definition: glext.h:6305
GLenum const GLfloat * params
Definition: glext.h:3534
GLsizei const GLchar ** string
Definition: glext.h:4101
int val
Definition: mrpt_jpeglib.h:955
Parameters that may be used by cmdVel_limits() in any derived classes.



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST