31 if (ptgClassName.size() == 1)
33 switch (ptgClassName[0])
36 ptgClassName =
"CPTG_DiffDrive_C";
39 ptgClassName =
"CPTG_DiffDrive_alpha";
42 ptgClassName =
"CPTG_DiffDrive_CCS";
45 ptgClassName =
"CPTG_DiffDrive_CC";
48 ptgClassName =
"CPTG_DiffDrive_CS";
59 "[CreatePTG] No PTG named `%s` is registered!",
60 ptgClassName.c_str());
69 "[CreatePTG] Object of type `%s` seems not to be a PTG!",
70 ptgClassName.c_str());
A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or sec...
void registerAllPendingClasses()
Register all pending classes - to be called just before de-serializing an object, for example...
void setPrefixes(const std::string &prefix_sections, const std::string &prefix_keys)
Change the prefix for sections and keys.
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
This class allows loading and storing values and vectors of different types from a configuration text...
virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) override
Parameters accepted by this base class:
This is the base class for any user-defined PTG.
mrpt::utils::CObject * createObject() const
GLsizei const GLchar ** string
const TRuntimeClassId * findRegisteredClass(const std::string &className)
Return info about a given class by its name, or nullptr if the class is not registered.
std::string trim(const std::string &str)
Removes leading and trailing spaces.
A structure that holds runtime class type information.
static CParameterizedTrajectoryGenerator * CreatePTG(const std::string &ptgClassName, const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection, const std::string &sKeyPrefix)
The class factory for creating a PTG from a list of parameters in a section of a given config file (p...
void bind(const CConfigFileBase &o)
Make this object to wrap the given existing CConfigFileBase object.