37 const int WN = 25, WV = 30;
41 sSection,
"K", K, WN, WV,
42 "K=+1 forward paths; K=-1 for backwards paths.");
76 os::sprintf(str, 100,
"CPTG_DiffDrive_CS,K=%i", (
int)K);
81 float alpha,
float t,
float x,
float y,
float phi,
float&
v,
float&
w)
const
86 const float T = 0.847f * std::sqrt(std::abs(
alpha)) *
R / V_MAX;
111 if ((K *
x) < 0)
return false;
116 return (fabs(
x) >
R - 0.10f);
#define MRPT_LOAD_CONFIG_VAR_NO_DEFAULT( variableName, variableType, configFileObject, sectionNameStr)
IMPLEMENTS_SERIALIZABLE(CPTG_DiffDrive_CS, CParameterizedTrajectoryGenerator, mrpt::nav) void CPTG_DiffDrive_CS
A PTG for optimal paths of type "CS", as named in PTG papers.
bool PTG_IsIntoDomain(double x, double y) const override
Returns the same than inverseMap_WS2TP() but without any additional cost.
void loadDefaultParams() override
Loads a set of default parameters; provided exclusively for the PTG-configurator tool.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
virtual void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) const override
This method saves the options to a ".ini"-like file or memory-stored string list.
virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) override
Possible values in "params" (those in CParameterizedTrajectoryGenerator, which is called internally,...
std::string getDescription() const override
Gets a short textual description of the PTG and its parameters.
void ptgDiffDriveSteeringFunction(float alpha, float t, float x, float y, float phi, float &v, float &w) const override
The main method to be implemented in derived classes: it defines the differential-driven differential...
void internal_writeToStream(mrpt::utils::CStream &out) const override
void internal_readFromStream(mrpt::utils::CStream &in) override
virtual void loadDefaultParams() override
Loads a set of default parameters; provided exclusively for the PTG-configurator tool.
virtual void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) const override
This method saves the options to a ".ini"-like file or memory-stored string list.
virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) override
Possible values in "params" (those in CParameterizedTrajectoryGenerator, which is called internally,...
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...
void write(const std::string §ion, const std::string &name, enum_t value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string())
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLubyte GLubyte GLubyte GLubyte w
GLclampf GLclampf GLclampf alpha
GLsizei const GLchar ** string
int sprintf(char *buf, size_t bufSize, const char *format,...) noexcept MRPT_printf_format_check(3
An OS-independent version of sprintf (Notice the bufSize param, which may be ignored in some compiler...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
T square(const T x)
Inline function for the square of a number.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.