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 bool logging_enable_console_output {true}; bool logging_enable_keep_record {false}; TAbstractNavigatorParams params_abstract_navigator; mrpt::system::CTimeLogger m_navProfiler {false, "mrpt::nav::CAbstractNavigator"}; // methods void logStr(const VerbosityLevel level, std::string_view msg_str) const; void logFmt(const VerbosityLevel level, const char* fmt, ...) const; void void logCond(const VerbosityLevel level, bool cond, const std::string& msg_str) const; void setLoggerName(const std::string& name); std::string getLoggerName() const; void setVerbosityLevel(const VerbosityLevel level); void setVerbosityLevelForCallbacks(const VerbosityLevel level); void setMinLoggingLevel(const VerbosityLevel level); VerbosityLevel getMinLoggingLevel() const; VerbosityLevel getMinLoggingLevelForCallbacks() const; bool isLoggingLevelVisible(VerbosityLevel level) const; void getLogAsString(std::string& log_contents) const; std::string getLogAsString() const; void writeLogToFile(const std::optional<std::string>& fname_in = std::nullopt) const; void dumpLogToConsole() const; std::string getLoggerLastMsg() const; void getLoggerLastMsg(std::string& msg_str) const; void loggerReset(); void logRegisterCallback(output_logger_callback_t userFunc); bool logDeregisterCallback(output_logger_callback_t userFunc); COutputLogger& operator = (const COutputLogger&); COutputLogger& operator = (COutputLogger&&); static std::array<mrpt::system::ConsoleForegroundColor, NUMBER_OF_VERBOSITY_LEVELS>& logging_levels_to_colors(); static const std::array<const char*, NUMBER_OF_VERBOSITY_LEVELS>& logging_levels_to_names(); 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); bool isRethrowNavExceptionsEnabled() const; 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 navigator parameters from a config file.
Must be called before initialize(). Derived classes must call the parent implementation after loading their own parameters.
Parameters:
c |
The configuration source to read from. |
virtual void saveConfigFile(mrpt::config::CConfigFileBase& c) const
Saves all current navigator parameters to a config file.
Derived classes must call the parent implementation after saving their own parameters.
Parameters:
c |
The configuration file to write to. |
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