MRPT  2.0.0
CNavigatorManualSequence.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 #include <mrpt/system/CTicTac.h>
13 #include <map>
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  ~CNavigatorManualSequence() override;
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  void onStartNewNavigation() override {}
53 
54  private:
55  // Not used in this class:
56  void navigate(const TNavigationParams* params) override {}
57  void performNavigationStep() override {}
58 };
59 } // namespace mrpt::nav
mrpt::kinematics::CVehicleVelCmd::Ptr cmd_vel
all with the same meaning than in CRobot2NavInterface::changeSpeeds()
void performNavigationStep() override
To be implemented in derived classes.
"Fake navigator" for tests: it just sends out a pre-programmed sequence of commands to the robot...
mrpt::vision::TStereoCalibParams params
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/...
void navigate(const TNavigationParams *params) override
Navigation request to a single target location.
void saveConfigFile(mrpt::config::CConfigFileBase &c) const override
Saves all current options to a config file.
void onStartNewNavigation() override
Called whenever a new navigation has been started.
void initialize() override
Must be called for loading collision grids, etc.
CNavigatorManualSequence(CRobot2NavInterface &react_iterf_impl)
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.
std::map< double, TVelCmd > programmed_orders
map [time_in_secs_since_beginning] -> orders.



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020