MRPT  2.0.1
CVehicleVelCmd_DiffDriven.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://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 
28  ~CVehicleVelCmd_DiffDriven() override;
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 } // namespace mrpt::kinematics
double filter_max_vw(double &v, double &w, const TVelCmdParams &p)
mrpt::vision::TStereoCalibParams params
Virtual base for velocity commands of different kinematic models of planar mobile robot...
size_t getVelCmdLength() const override
Get number of components in each velocity command.
double cmdVel_limits(const mrpt::kinematics::CVehicleVelCmd &prev_vel_cmd, const double beta, const TVelCmdParams &params) override
See base class docs.
void setToStop() override
Set to a command that means "do not move" / "stop".
int val
Definition: mrpt_jpeglib.h:957
void setVelCmdElement(const int index, const double val) override
Set each velocity command component.
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.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020