Go to the documentation of this file.
23 const std::string& ptgClassName_,
25 const std::string& sKeyPrefix)
33 if (ptgClassName.size() == 1)
35 switch (ptgClassName[0])
38 ptgClassName =
"CPTG_DiffDrive_C";
41 ptgClassName =
"CPTG_DiffDrive_alpha";
44 ptgClassName =
"CPTG_DiffDrive_CCS";
47 ptgClassName =
"CPTG_DiffDrive_CC";
50 ptgClassName =
"CPTG_DiffDrive_CS";
61 "[CreatePTG] No PTG named `%s` is registered!",
62 ptgClassName.c_str());
70 "[CreatePTG] Object of type `%s` seems not to be a PTG!",
71 ptgClassName.c_str());
79 ptg->loadFromConfigFile(cfp, sSection);
A structure that holds runtime class type information.
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,...)
void bind(const CConfigFileBase &o)
Make this object to wrap the given existing CConfigFileBase object.
const TRuntimeClassId * findRegisteredClass(const std::string &className, const bool allow_ignore_namespace=true)
Return info about a given class by its name, or nullptr if the class is not registered.
static CAST_TO::Ptr from(const CAST_FROM_PTR &ptr)
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...
std::shared_ptr< CParameterizedTrajectoryGenerator > Ptr
static CParameterizedTrajectoryGenerator::Ptr 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...
std::shared_ptr< CObject > createObject() const
std::string trim(const std::string &str)
Removes leading and trailing spaces.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020 | |