Main MRPT website > C++ reference for MRPT 1.5.9
CAbstractHolonomicReactiveMethod.cpp
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 
10 #include "nav-precomp.h" // Precomp header
11 
13 #include <mrpt/utils/CStream.h>
14 
15 using namespace mrpt;
16 using namespace mrpt::utils;
17 using namespace mrpt::nav;
18 
20 
21 
23  m_associatedPTG(NULL),
24  m_enableApproachTargetSlowDown(true),
25  m_cfgSectionName(defaultCfgSectionName)
26 {
27 }
28 CAbstractHolonomicReactiveMethod::~CAbstractHolonomicReactiveMethod()
29 {
30 }
31 
32 /** Defines the name of the section (Default: "FULL_EVAL_CONFIG") */
33 void CAbstractHolonomicReactiveMethod::setConfigFileSectionName(const std::string &sectName)
34 {
35  m_cfgSectionName = sectName;
36 }
37 std::string CAbstractHolonomicReactiveMethod::getConfigFileSectionName() const {
38  return m_cfgSectionName;
39 }
40 
41 void CAbstractHolonomicReactiveMethod::setAssociatedPTG(mrpt::nav::CParameterizedTrajectoryGenerator *ptg)
42 {
43  m_associatedPTG = ptg;
44 }
45 mrpt::nav::CParameterizedTrajectoryGenerator * CAbstractHolonomicReactiveMethod::getAssociatedPTG() const
46 {
47  return m_associatedPTG;
48 }
49 
50 CAbstractHolonomicReactiveMethod * CAbstractHolonomicReactiveMethod::Create(const std::string &className) MRPT_NO_THROWS
51 {
52  try
53  {
55 
56  // Factory:
58  if (!classId) return NULL;
59 
61  return holo;
62  }
63  catch (...)
64  {
65  return nullptr;
66  }
67 }
68 
69 CAbstractHolonomicReactiveMethod::NavInput::NavInput() :
70  targets(),
71  maxRobotSpeed(1.0),
72  maxObstacleDist(1.0),
73  clearance(nullptr)
74 {
75 }
76 
78  desiredDirection(0),
79  desiredSpeed(0)
80 {
81 }
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:39
void BASE_IMPEXP registerAllPendingClasses()
Register all pending classes - to be called just before de-serializing an object, for example...
A base class for holonomic reactive navigation methods.
#define MRPT_NO_THROWS
C++11 noexcept: Used after member declarations.
STL namespace.
This is the base class for any user-defined PTG.
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE(class_name, base_class_name, NameSpace)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
mrpt::utils::CObject * createObject() const
Definition: CObject.cpp:88
const TRuntimeClassId BASE_IMPEXP * findRegisteredClass(const std::string &className)
Return info about a given class by its name, or NULL if the class is not registered.
GLsizei const GLchar ** string
Definition: glext.h:3919
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A structure that holds runtime class type information.
Definition: CObject.h:36



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020