Main MRPT website > C++ reference for MRPT 1.9.9
CNavigatorManualSequence.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 #include <map>
13 #include <mrpt/utils/CTicTac.h>
14 
15 namespace mrpt
16 {
17 namespace nav
18 {
19 /** "Fake navigator" for tests: it just sends out a pre-programmed sequence of
20  * commands to the robot.
21  * For a short discussion of the API, see CNavigatorVirtualBase
22  */
24 {
25  public:
27  virtual ~CNavigatorManualSequence();
28 
29  /** @name Initialization API
30  * @{ */
31  virtual void loadConfigFile(const mrpt::utils::CConfigFileBase& c)
32  override; // See base class docs!
34  const override; // See base class docs!
35  /** Must be called for loading collision grids, etc. before invoking any
36  * navigation command */
37  void initialize() override;
38  /** @} */
39 
40  /** Overriden in this class to ignore the cancel/pause/... commands */
41  void navigationStep() override;
42 
43  struct TVelCmd
44  {
45  /** all with the same meaning than in
46  * CRobot2NavInterface::changeSpeeds() */
48  };
49 
50  /** map [time_in_secs_since_beginning] -> orders. */
51  std::map<double, TVelCmd> programmed_orders;
52 
53  protected:
54  virtual void onStartNewNavigation() override {}
55  private:
56  // Not used in this class:
57  virtual void navigate(const TNavigationParams* params) override {}
58  virtual void performNavigationStep() override {}
59 };
60 }
61 }
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
virtual void saveConfigFile(mrpt::utils::CConfigFileBase &c) const override
Saves all current options to a config file.
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel
all with the same meaning than in CRobot2NavInterface::changeSpeeds()
"Fake navigator" for tests: it just sends out a pre-programmed sequence of commands to the robot...
This class allows loading and storing values and vectors of different types from a configuration text...
The struct for configuring navigation requests.
void navigationStep() override
Overriden in this class to ignore the cancel/pause/...
const GLubyte * c
Definition: glext.h:6313
virtual void loadConfigFile(const mrpt::utils::CConfigFileBase &c) override
Loads all params from a file.
virtual void navigate(const TNavigationParams *params) override
Navigation request to a single target location.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void initialize() override
Must be called for loading collision grids, etc.
virtual void performNavigationStep() override
To be implemented in derived classes.
CNavigatorManualSequence(CRobot2NavInterface &react_iterf_impl)
std::shared_ptr< CVehicleVelCmd > Ptr
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
This is the base class for any reactive/planned navigation system.
GLenum const GLfloat * params
Definition: glext.h:3534
std::map< double, TVelCmd > programmed_orders
map [time_in_secs_since_beginning] -> orders.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019