Main MRPT website > C++ reference for MRPT 1.5.7
CPTG_DiffDrive_C.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 nav
16  {
17  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(CPTG_DiffDrive_C, CParameterizedTrajectoryGenerator, NAV_IMPEXP)
18 
19  /** A PTG for circular paths ("C" type PTG in papers).
20  * - **Compatible kinematics**: differential-driven / Ackermann steering
21  * - **Compatible robot shape**: Arbitrary 2D polygon
22  * - **PTG parameters**: Use the app `ptg-configurator`
23  *
24  * This PT generator functions are:
25  *
26  * \f[ v(\alpha) = V_{MAX} sign(K) \f]
27  * \f[ \omega(\alpha) = \dfrac{\alpha}{\pi} W_{MAX} sign(K) \f]
28  *
29  * So, the radius of curvature of each trajectory is constant for each "alpha" value (the trajectory parameter):
30  *
31  * \f[ R(\alpha) = \dfrac{v}{\omega} = \dfrac{V_{MAX}}{W_{MAX}} \dfrac{\pi}{\alpha} \f]
32  *
33  * from which a minimum radius of curvature can be set by selecting the appropriate values of V_MAX and W_MAX,
34  * knowning that \f$ \alpha \in (-\pi,\pi) \f$.
35  *
36  * ![C-PTG path examples](PTG1_paths.png)
37  *
38  * \note [Before MRPT 1.5.0 this was named CPTG1]
39  * \ingroup nav_tpspace
40  */
42  {
44  public:
45  CPTG_DiffDrive_C() : K(0) { }
47  loadFromConfigFile(cfg,sSection);
48  }
49  virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) MRPT_OVERRIDE;
50  virtual void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) const MRPT_OVERRIDE;
51 
52  std::string getDescription() const MRPT_OVERRIDE;
53  bool inverseMap_WS2TP(double x, double y, int &out_k, double &out_d, double tolerance_dist = 0.10) const MRPT_OVERRIDE;
54  bool PTG_IsIntoDomain( double x, double y ) const MRPT_OVERRIDE;
55  void ptgDiffDriveSteeringFunction( float alpha, float t,float x, float y, float phi, float &v, float &w ) const MRPT_OVERRIDE;
56  void loadDefaultParams() MRPT_OVERRIDE;
57 
58  protected:
59  /** A generation parameter */
60  double K;
61  };
63 
64  }
65 }
66 
GLclampf GLclampf GLclampf alpha
Definition: glext.h:3510
GLdouble GLdouble t
Definition: glext.h:3610
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3962
This class allows loading and storing values and vectors of different types from a configuration text...
This is the base class for any user-defined PTG.
#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...
GLsizei const GLchar ** string
Definition: glext.h:3919
CPTG_DiffDrive_C(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection)
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...
Base class for all PTGs suitable to non-holonomic, differentially-driven (or Ackermann) vehicles base...
GLenum GLint GLint y
Definition: glext.h:3516
GLenum GLint x
Definition: glext.h:3516
A PTG for circular paths ("C" type PTG in papers).
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



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