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());
void registerAllPendingClasses()
Register all pending classes - to be called just before de-serializing an object, for example...
static CParameterizedTrajectoryGenerator * CreatePTG(const std::string &ptgClassName, const mrpt::config::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...
A structure that holds runtime class type information.
This is the base class for any user-defined PTG.
This class allows loading and storing values and vectors of different types from a configuration text...
A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or sec...
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.
void bind(const CConfigFileBase &o)
Make this object to wrap the given existing CConfigFileBase object.
virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase &cfg, const std::string &sSection) override
Parameters accepted by this base class:
std::string trim(const std::string &str)
Removes leading and trailing spaces.
void setPrefixes(const std::string &prefix_sections, const std::string &prefix_keys)
Change the prefix for sections and keys.
mrpt::rtti::CObject * createObject() const
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)