Main MRPT website > C++ reference for MRPT 1.5.6
CPTG_DiffDrive_alpha.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_alpha, CParameterizedTrajectoryGenerator, NAV_IMPEXP)
18 
19  /** The "a(symptotic)-alpha PTG", as named in PTG 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} e^{ -\left( \dfrac{\alpha-\phi}{cte_{a0v}} \right)^2} \f]
27  * \f[ \omega(\alpha) = W_{MAX} \left( -\dfrac{1}{2} +\dfrac{1}{1+ e^{ - \dfrac{\alpha-\phi}{cte_{a0w}} } } \right) \f]
28  *
29  * So, the radius of curvature of each trajectory is NOT constant for each "alpha" value in this PTG:
30  *
31  * ![C-PTG path examples](PTG2_paths.png)
32  *
33  * \note [Before MRPT 1.5.0 this was named CPTG2]
34  * \ingroup nav_tpspace
35  */
37  {
39  public:
40  CPTG_DiffDrive_alpha() : cte_a0v(0),cte_a0w(0) { }
42  loadFromConfigFile(cfg,sSection);
43  }
44  virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) MRPT_OVERRIDE;
45  virtual void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg,const std::string &sSection) const MRPT_OVERRIDE;
46 
47  std::string getDescription() const MRPT_OVERRIDE;
48  void ptgDiffDriveSteeringFunction( float alpha, float t,float x, float y, float phi, float &v, float &w ) const MRPT_OVERRIDE;
49  void loadDefaultParams() MRPT_OVERRIDE;
50 
51  protected:
52  double cte_a0v, cte_a0w;
53  };
55 
56  }
57 }
58 
const GLdouble * v
Definition: glew.h:1296
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1166
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1425
CPTG_DiffDrive_alpha(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection)
GLubyte GLubyte GLubyte GLubyte w
Definition: glew.h:1797
GLdouble GLdouble t
Definition: glew.h:1303
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...
GLint GLint GLint GLint GLint x
Definition: glew.h:1166
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
GLsizei const GLcharARB ** string
Definition: glew.h:3293
The "a(symptotic)-alpha PTG", as named in PTG papers.
Base class for all PTGs suitable to non-holonomic, differentially-driven (or Ackermann) vehicles base...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018