40 c.getAllKeys(
s, lstKeys);
42 for (
size_t i=0;i<lstKeys.size();i++)
45 std::vector<std::string> toks;
47 ASSERTMSG_(toks.size()>2,
std::string(
"Wrong format while parsing CNavigatorManualSequence cfg file in entry: ")+lstKeys[i]);
49 const double t = atof(toks[0].c_str());
52 const size_t nComps = toks.size() - 1;
61 for (
size_t i=0;i<nComps;i++)
62 krc.
cmd_vel->setVelCmdElement(i, atof(toks[i+1].c_str() ));
87 logFmt( mrpt::utils::LVL_DEBUG,
"[CNavigatorManualSequence] Sending cmd: t=%f\n",
programmed_orders.begin()->first);
92 logFmt( mrpt::utils::LVL_ERROR,
"[CNavigatorManualSequence] **ERROR** sending cmd to robot.");
virtual void saveConfigFile(mrpt::utils::CConfigFileBase &c) const MRPT_OVERRIDE
Saves all current options to a config file.
static CVehicleVelCmd_DiffDrivenPtr Create()
void navigationStep() MRPT_OVERRIDE
Overriden in this class to ignore the cancel/pause/...
virtual void resetNavigationTimer()
see getNavigationTime()
#define THROW_EXCEPTION(msg)
virtual double getNavigationTime()
Returns the number of seconds ellapsed since the constructor of this class was invoked, or since the last call of resetNavigationTimer().
virtual ~CNavigatorManualSequence()
virtual bool changeSpeeds(const mrpt::kinematics::CVehicleVelCmd &vel_cmd)
Default: forward call to m_robot.changeSpeed(). Can be overriden.
This class allows loading and storing values and vectors of different types from a configuration text...
void initialize() MRPT_OVERRIDE
Must be called for loading collision grids, etc. before invoking any navigation command.
GLsizei const GLchar ** string
std::map< double, TVelCmd > programmed_orders
map [time_in_secs_since_beginning] -> orders.
CRobot2NavInterface & m_robot
The navigator-robot interface.
mrpt::kinematics::CVehicleVelCmdPtr cmd_vel
all with the same meaning than in CRobot2NavInterface::changeSpeeds()
static CVehicleVelCmd_HoloPtr Create()
CNavigatorManualSequence(CRobot2NavInterface &react_iterf_impl)
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
std::vector< std::string > vector_string
A type for passing a vector of strings.
#define ASSERTMSG_(f, __ERROR_MSG)
This is the base class for any reactive/planned navigation system.
void BASE_IMPEXP tokenize(const std::string &inString, const std::string &inDelimiters, std::deque< std::string > &outTokens, bool skipBlankTokens=true) MRPT_NO_THROWS
Tokenizes a string according to a set of delimiting characters.
virtual bool stop(bool isEmergencyStop)
Default: forward call to m_robot.stop(). Can be overriden.
virtual void loadConfigFile(const mrpt::utils::CConfigFileBase &c) MRPT_OVERRIDE
Loads all params from a file.