Go to the documentation of this file.
41 const int WN = 25, WV = 30;
44 sSection,
"robot_radius",
m_robotRadius, WN, WV,
"Robot radius [m].");
55 for (
int i = 0; i < N; i++)
58 R * cos(i * 2 *
M_PI / (N - 1)),
R * sin(i * 2 *
M_PI / (N - 1)), 0,
59 shap_x[i], shap_y[i], shap_z[i]);
63 origin.
x(), origin.
y(), .0, shap_x[0], shap_y[0], shap_z[0]);
64 for (
int i = 1; i <= shap_x.size(); i++)
66 const int idx = i % shap_x.size();
71 origin.
x() -
R * 0.02, origin.
y(), .0, origin.
x() +
R * 0.02,
74 origin.
x(), origin.
y() -
R * 0.02, .0, origin.
x(),
75 origin.
y() +
R * 0.02, .0);
109 const double x,
const double y)
const
115 const double ox,
const double oy)
const
T hypot_fast(const T x, const T y)
Faster version of std::hypot(), to use when overflow is not an issue and we prefer fast code.
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())
virtual double evalClearanceToRobotShape(const double ox, const double oy) const override
Evals the clearance from an obstacle (ox,oy) in coordinates relative to the robot center.
void loadShapeFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion)
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction.
void setRobotShapeRadius(const double robot_radius)
Robot shape must be set before initialization, either from ctor params or via this method.
virtual ~CPTG_RobotShape_Circular()
A set of independent lines (or segments), one line with its own start and end positions (X,...
virtual void internal_processNewRobotShape()=0
Will be called whenever the robot shape is set / updated.
void composePoint(double lx, double ly, double &gx, double &gy) const
An alternative, slightly more efficient way of doing with G and L being 2D points and P this 2D pose...
Virtual base class for "archives": classes abstracting I/O streams.
void saveToConfigFile(mrpt::config::CConfigFileBase &cfg, const std::string &sSection) const override
This method saves the options to a ".ini"-like file or memory-stored string list.
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line to the set.
void appendLineStrip(float x, float y, float z)
Appends a line whose starting point is the end point of the last line (similar to OpenGL's GL_LINE_ST...
#define MRPT_LOAD_HERE_CONFIG_VAR( variableName, variableType, targetVariable, configFileObject, sectionNameStr)
This class allows loading and storing values and vectors of different types from a configuration text...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
double x() const
Common members of all points & poses classes.
void loadDefaultParams() override
Loads a set of default parameters; provided exclusively for the PTG-configurator tool.
bool isPointInsideRobotShape(const double x, const double y) const override
Returns true if the point lies within the robot shape.
double getMaxRobotRadius() const override
Returns an approximation of the robot radius.
void internal_shape_saveToStream(mrpt::serialization::CArchive &out) const
void add_robotShape_to_setOfLines(mrpt::opengl::CSetOfLines &gl_shape, const mrpt::poses::CPose2D &origin=mrpt::poses::CPose2D()) const override
Auxiliary function for rendering.
CPTG_RobotShape_Circular()
GLsizei const GLchar ** string
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void internal_shape_loadFromStream(mrpt::serialization::CArchive &in)
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |