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
mrpt::kinematics::CVehicleVelCmd_DiffDriven::getVelCmdDescription
std::string getVelCmdDescription(const int index) const override
Get textual, human-readable description of each velocity command component.
Definition: CVehicleVelCmd_DiffDriven.cpp:21
mrpt::kinematics::CVehicleVelCmd_DiffDriven::cmdVel_limits
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
See base class docs.
Definition: CVehicleVelCmd_DiffDriven.cpp:100
mrpt::kinematics::CVehicleVelCmd_DiffDriven::ang_vel
double ang_vel
Angular velocity (rad/s)
Definition: CVehicleVelCmd_DiffDriven.h:28
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
w
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:4178
mrpt::kinematics::CVehicleVelCmd_DiffDriven::filter_max_vw
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
Definition: CVehicleVelCmd_DiffDriven.cpp:133
mrpt::kinematics::CVehicleVelCmd_DiffDriven::setToStop
void setToStop() override
Set to a command that means "do not move" / "stop".
Definition: CVehicleVelCmd_DiffDriven.cpp:73
mrpt::kinematics::CVehicleVelCmd_DiffDriven::setVelCmdElement
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
Definition: CVehicleVelCmd_DiffDriven.cpp:52
p
GLfloat GLfloat p
Definition: glext.h:6305
v
const GLdouble * v
Definition: glext.h:3678
val
int val
Definition: mrpt_jpeglib.h:955
index
GLuint index
Definition: glext.h:4054
mrpt::kinematics::CVehicleVelCmd_DiffDriven::~CVehicleVelCmd_DiffDriven
virtual ~CVehicleVelCmd_DiffDriven()
mrpt::kinematics::CVehicleVelCmd_DiffDriven::cmdVel_scale
void cmdVel_scale(double vel_scale) override
See docs of method in base class.
Definition: CVehicleVelCmd_DiffDriven.cpp:94
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::kinematics::CVehicleVelCmd_DiffDriven::lin_vel
double lin_vel
Linear velocity (m/s)
Definition: CVehicleVelCmd_DiffDriven.h:26
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::kinematics::CVehicleVelCmd_DiffDriven::getVelCmdLength
size_t getVelCmdLength() const override
Get number of components in each velocity command.
Definition: CVehicleVelCmd_DiffDriven.cpp:20
mrpt::kinematics::CVehicleVelCmd
Virtual base for velocity commands of different kinematic models of planar mobile robot.
Definition: CVehicleVelCmd.h:22
mrpt::kinematics::CVehicleVelCmd_DiffDriven
Kinematic model for Ackermann-like or differential-driven vehicles.
Definition: CVehicleVelCmd_DiffDriven.h:21
params
GLenum const GLfloat * params
Definition: glext.h:3534
mrpt::kinematics::CVehicleVelCmd_DiffDriven::isStopCmd
bool isStopCmd() const override
Returns true if the command means "do not move" / "stop".
Definition: CVehicleVelCmd_DiffDriven.cpp:68
CVehicleVelCmd.h
mrpt::kinematics::CVehicleVelCmd_DiffDriven::getVelCmdElement
double getVelCmdElement(const int index) const override
Get each velocity command component.
Definition: CVehicleVelCmd_DiffDriven.cpp:37



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST