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 }
std::shared_ptr< CVehicleVelCmd > Ptr
This is the base class for any reactive/planned navigation system.
"Fake navigator" for tests: it just sends out a pre-programmed sequence of commands to the robot.
void initialize() override
Must be called for loading collision grids, etc.
virtual void navigate(const TNavigationParams *params) override
Navigation request to a single target location.
virtual void loadConfigFile(const mrpt::utils::CConfigFileBase &c) override
Loads all params from a file.
virtual void performNavigationStep() override
To be implemented in derived classes.
std::map< double, TVelCmd > programmed_orders
map [time_in_secs_since_beginning] -> orders.
virtual void saveConfigFile(mrpt::utils::CConfigFileBase &c) const override
Saves all current options to a config file.
void navigationStep() override
Overriden in this class to ignore the cancel/pause/...
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
CNavigatorManualSequence(CRobot2NavInterface &react_iterf_impl)
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
This class allows loading and storing values and vectors of different types from a configuration text...
const GLubyte * c
Definition: glext.h:6313
GLenum const GLfloat * params
Definition: glext.h:3534
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The struct for configuring navigation requests.
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel
all with the same meaning than in CRobot2NavInterface::changeSpeeds()



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 63ea9d1f1 Thu Nov 23 00:06:53 2017 +0100 at mar 26 may 2026 12:19:29 CEST