Go to the documentation of this file.
52 :
Path(_start, _end, _kappa, _sigma, _length)
79 cout <<
"CC_Dubins_Path: type ";
109 cout <<
", length " <<
length <<
", configurations ";
143 :
Path(_start, _end, _kappa, _sigma, _length)
170 cout <<
"HC_CC_RS_Path: type ";
233 cout <<
", length " <<
length <<
", configurations ";
297 controls.push_back(control);
303 double dot_product = cos(q1.
theta) * (q2.
x - q1.
x) + sin(q1.
theta) * (q2.
y - q1.
y);
304 int d =
sgn(dot_product);
309 controls.push_back(control);
314 if ((forward && order) || (!forward && !order))
332 controls.push_back(arc);
348 clothoid.
kappa = 0.0;
350 controls.push_back(clothoid);
356 controls.push_back(arc);
363 controls.push_back(clothoid);
369 vector<Control> &controls)
374 double length = sqrt(delta / fabs(sigma0));
379 clothoid1.
kappa = 0.0;
380 clothoid1.
sigma = sigma0;
381 controls.push_back(clothoid1);
385 clothoid2.
sigma = -sigma0;
386 controls.push_back(clothoid2);
393 vector<Control> &controls)
399 Control clothoid1, arc, clothoid2;
401 clothoid1.
kappa = 0.0;
403 controls.push_back(clothoid1);
408 controls.push_back(arc);
413 controls.push_back(clothoid2);
433 vector<Control> controls_elementary, controls_default;
437 double length_elementary =
438 accumulate(controls_elementary.begin(), controls_elementary.end(), 0.0,
439 [](
double sum,
const Control &control) { return sum + fabs(control.delta_s); });
440 double length_default =
441 accumulate(controls_default.begin(), controls_default.end(), 0.0,
442 [](
double sum,
const Control &control) { return sum + fabs(control.delta_s); });
443 (length_elementary < length_default) ?
444 controls.insert(controls.end(), controls_elementary.begin(), controls_elementary.end()) :
445 controls.insert(controls.end(), controls_default.begin(), controls_default.end());
void rs_turn_controls(const HC_CC_Circle &c, const Configuration &q, bool order, std::vector< Control > &controls)
Appends controls with a rs-turn.
double length
Path length.
Description of a kinematic car's state.
bool cc_elementary_sharpness(const Configuration &q, double delta, double &sigma0) const
Computation of an elementary path's sharpness.
double point_distance(double x1, double y1, double x2, double y2)
Cartesian distance between two points.
double cc_circular_deflection(double delta) const
Computation of a cc-turn's circular deflection.
hc_cc_rs::path_type type
Path type.
HC_CC_Circle * cstart
Start, end and intermediate circles.
double sigma
Sharpness (derivative of curvature with respect to arc length) of a segment.
double theta
Orientation of the robot.
void empty_controls(std::vector< Control > &controls)
Appends controls with 0 input.
double kappa
Curvature at position (x,y)
double delta_min
Minimal deflection.
~CC_Dubins_Path()
Destructor.
void print(bool eol) const
Alphanumeric display.
double y
Position in y of the robot.
double kappa
Curvature at the beginning of a segment.
void print(bool eol) const
Alphanumeric display.
Description of a path segment with its corresponding control inputs.
bool state_equal(const State &state1, const State &state2)
Checks whether two states are equal.
HC_CC_RS_Path(const Configuration &_start, const Configuration &_end, hc_cc_rs::path_type _type, double _kappa, double _sigma, Configuration *_qi1, Configuration *_qi2, Configuration *_qi3, Configuration *_qi4, HC_CC_Circle *_cstart, HC_CC_Circle *_cend, HC_CC_Circle *_ci1, HC_CC_Circle *_ci2, double _length)
Constructor.
double deflection(const Configuration &q) const
Computation of deflection (angle between start configuration of circle and configuration q)
double rs_circular_deflection(double delta) const
Computation of a rs-turn's circular deflection.
bool forward
Driving direction: forwards/backwards.
void hc_turn_controls(const HC_CC_Circle &c, const Configuration &q, bool order, std::vector< Control > &controls)
Appends controls with a hc-turn.
void reverse_control(Control &control)
Reverses a control.
Configuration * qi1
Intermediate configurations.
int direction(bool forward, bool order)
double x
Position in x of the robot.
void straight_controls(const Configuration &q1, const Configuration &q2, std::vector< Control > &controls)
Appends controls with a straight line.
void cc_default_controls(const HC_CC_Circle &c, const Configuration &q, double delta, bool order, std::vector< Control > &controls)
Appends controls with a default cc-turn consisting of two clothoids and a circular arc.
double delta_s
Signed arc length of a segment.
double hc_circular_deflection(double delta) const
Computation of a hc-turn's circular deflection.
bool cc_elementary_controls(const HC_CC_Circle &c, const Configuration &q, double delta, bool order, std::vector< Control > &controls)
Appends controls with an elementary path if one exists.
double get_epsilon()
Return value of epsilon.
~HC_CC_RS_Path()
Destructor.
double kappa
Max. curvature, inverse of max. curvature, max. sharpness.
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
Configuration * qi1
Intermediate configurations.
HC_CC_Circle * cstart
Start, end and intermediate circles.
void cc_turn_controls(const HC_CC_Circle &c, const Configuration &q, bool order, std::vector< Control > &controls)
Appends controls with a cc-turn.
double sgn(double x)
Return sign of a number.
cc_dubins::path_type type
Path type.
void print(bool eol) const
Alphanumeric display.
Control subtract_control(const Control &control1, const Control &control2)
Subtracts control2 from control1.
double twopify(double alpha)
Conversion of arbitrary angle given in [rad] to [0, 2*pi[.
Configuration start
Start and end configuration.
Configuration start
Start configuration.
double theta
Orientation in rad between [0, 2*pi[.