class mrpt::nav::CNavigatorManualSequence
Overview
“Fake navigator” for tests: it just sends out a pre-programmed sequence of commands to the robot.
For a short discussion of the API, see CNavigatorVirtualBase
#include <mrpt/nav/reactive/CNavigatorManualSequence.h> class CNavigatorManualSequence: public mrpt::nav::CAbstractNavigator { public: // structs struct TVelCmd; // fields std::map<double, TVelCmd> programmed_orders; // construction CNavigatorManualSequence(CRobot2NavInterface& react_iterf_impl); // methods virtual void loadConfigFile(const mrpt::config::CConfigFileBase& c); virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const; virtual void initialize(); virtual void navigationStep(); };
Inherited Members
public: // enums enum TErrorCode; enum TState; // structs struct TMsg; struct TAbstractNavigatorParams; struct TErrorReason; struct TNavigationParams; struct TNavigationParamsBase; struct TRobotPoseVel; struct TargetInfo; // fields mrpt::system::CTimeLogger m_navProfiler { false, "mrpt::nav::CAbstractNavigator"}; // methods virtual void loadConfigFile(const mrpt::config::CConfigFileBase& c); virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const; virtual void initialize() = 0; virtual void navigationStep(); virtual void navigate(const TNavigationParams* params); virtual void cancel(); virtual void resume(); virtual void suspend(); virtual void resetNavError(); TState getCurrentState() const; const TErrorReason& getErrorReason() const; void setFrameTF(const std::weak_ptr<mrpt::poses::FrameTransformer<2>>& frame_tf); std::weak_ptr<mrpt::poses::FrameTransformer<2>> getFrameTF() const; void enableRethrowNavExceptions(const bool enable); const mrpt::system::CTimeLogger& getDelaysTimeLogger() const;
Fields
std::map<double, TVelCmd> programmed_orders
map [time_in_secs_since_beginning] -> orders.
Methods
virtual void loadConfigFile(const mrpt::config::CConfigFileBase& c)
Loads all params from a file.
To be called before initialize(). Each derived class MUST load its own parameters, and then call ITS PARENT’S overriden method to ensure all params are loaded.
virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const
Saves all current options to a config file.
Each derived class MUST save its own parameters, and then call ITS PARENT’S overriden method to ensure all params are saved.
virtual void initialize()
Must be called for loading collision grids, etc.
before invoking any navigation command
virtual void navigationStep()
Overriden in this class to ignore the cancel/pause/…
commands