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-2018, 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/system/CTicTac.h>
14 
15 namespace mrpt::nav
16 {
17 /** "Fake navigator" for tests: it just sends out a pre-programmed sequence of
18  * commands to the robot.
19  * For a short discussion of the API, see CNavigatorVirtualBase
20  */
22 {
23  public:
25  virtual ~CNavigatorManualSequence();
26 
27  /** @name Initialization API
28  * @{ */
30  override; // See base class docs!
32  const override; // See base class docs!
33  /** Must be called for loading collision grids, etc. before invoking any
34  * navigation command */
35  void initialize() override;
36  /** @} */
37 
38  /** Overriden in this class to ignore the cancel/pause/... commands */
39  void navigationStep() override;
40 
41  struct TVelCmd
42  {
43  /** all with the same meaning than in
44  * CRobot2NavInterface::changeSpeeds() */
46  };
47 
48  /** map [time_in_secs_since_beginning] -> orders. */
49  std::map<double, TVelCmd> programmed_orders;
50 
51  protected:
52  virtual void onStartNewNavigation() override {}
53  private:
54  // Not used in this class:
55  virtual void navigate(const TNavigationParams* params) override {}
56  virtual void performNavigationStep() override {}
57 };
58 }
59 
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
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...
The struct for configuring navigation requests.
This class allows loading and storing values and vectors of different types from a configuration text...
void navigationStep() override
Overriden in this class to ignore the cancel/pause/...
const GLubyte * c
Definition: glext.h:6313
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const override
Saves all current options to a config file.
virtual void navigate(const TNavigationParams *params) override
Navigation request to a single target location.
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)
virtual void loadConfigFile(const mrpt::config::CConfigFileBase &c) override
Loads all params from a file.
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: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020