7 #ifndef ISEEML_FSC_PATH_HH
8 #define ISEEML_FSC_PATH_HH
12 #include <iSeeML/rob/DubinsLikePath.hpp>
30 double MaximumCurvDerivative;
93 LimDefl(0), TurnRadius(-1), TurnAngle(-M_PI) {}
110 const double&
maxCurv,
const double& maxCDer,
111 const double& length1,
const double& length2,
112 const double& length3) :
115 MaximumCurvDerivative( fabs(maxCDer) ) {
118 LimDefl, TurnRadius, TurnAngle);
144 const double&
maxCurv,
const double& maxCDer,
145 const double&
limDefl,
const double& turnRad,
146 const double& turnAng,
const double& length1,
147 const double& length2,
const double& length3) :
150 MaximumCurvDerivative(fabs(maxCDer)), LimDefl( fabs(
limDefl) ),
151 TurnRadius( fabs(turnRad) ), TurnAngle( fabs(turnAng) ) {
167 const double&
maxCurv,
const double& maxCDer) :
170 MaximumCurvDerivative( fabs(maxCDer) ) {
173 LimDefl, TurnRadius, TurnAngle);
198 const double&
maxCurv,
const double& maxCDer,
200 const double& turnRad,
const double& turnAng) :
203 MaximumCurvDerivative(fabs(maxCDer)), LimDefl( fabs(
limDefl) ),
204 TurnRadius( fabs(turnRad) ), TurnAngle( fabs(turnAng) )
240 const double& maxCDer,
double&
limDefl,
241 double& turnRad,
double& turnAng);
263 void writeTo(ostream& O)
const;
325 {
return( fabs(defl) <=
limDefl() ); }
358 double&
length,
double& angle)
const;
399 TurnAngle = other.
turnAngle();
return *
this; }
428 computationArray[i] = *
this;
454 #ifdef ISEEML_CHECK_FSC_PATH_PRECOND
456 cerr <<
ClassName <<
"::getConnection: abnormal index"
457 <<
" parameter (" << index <<
")!" << endl;
460 #ifdef ISEEML_CHECK_ARRAY_ELEMT
468 #endif // end of definition
void computeCenters(const iSeeML::rob::OrPtConfig &start, const iSeeML::rob::OrPtConfig &goal, iSeeML::geom::Point centers[nbTurningCircles]) const
Various method, computing the set of circle centers used to turn from starting configuration of the c...
double limDefl() const
Description method, giving the limit deflection: a turn of lower (but not zero) deflection is degener...
Definition: FscPath.hpp:288
void definePieces(const iSeeML::rob::OrPtConfig &start, const double &defl1, const double &lenDefl, const double &defl3)
double length() const
Description method, giving the path's length (sum of the pieces' length).
Definition: CompoundPath.hpp:126
FscPath(const iSeeML::rob::OrPtConfig &start, const iSeeML::rob::OrPtConfig &goal, const double &maxCurv, const double &maxCDer)
The 'goto' constructor: a FSC path is built, starting from a given iSeeML::rob::OrPtConfig and reachi...
Definition: FscPath.hpp:165
double turnRadius() const
Description method, giving the radius of the turning circle (the circle of all the configurations whi...
Definition: FscPath.hpp:300
iSeeML::Object & clone() const
Description method, giving a copy of the current FSC path.
Definition: FscPath.hpp:251
iSeeML::rob::DubinsLikePath * connectArray() const
Various method, returning an array of nbPossiblePaths Dubins-like paths, initialised as clones of the...
Definition: FscPath.hpp:425
void connect(const iSeeML::rob::OrPtConfig &start, const iSeeML::rob::OrPtConfig &goal)
Modification method, defining type and pieces of a Dubins' like path in order to connect two given co...
int turnNbPieces(const double &defl) const
Description method, computing the number of pieces needed for a turn of given deflection.
Definition: FscPath.hpp:335
DubinsLikePath & operator=(const DubinsLikePath &other)
Copy operator (default one is not correct).
Definition: DubinsLikePath.hpp:471
FscPath(const iSeeML::rob::OrPtConfig &start, const Type &type, const double &maxCurv, const double &maxCDer, const double &limDefl, const double &turnRad, const double &turnAng, const double &length1, const double &length2, const double &length3)
The complete 'forward' constructor: a FSC path is built from its starting oriented point,...
Definition: FscPath.hpp:143
This class defines a standard robotic configuration, containing the position of a reference point and...
Definition: OrPtConfig.hpp:45
@ nbTurningCircles
the number of usefull turning circles (4).
Definition: DubinsLikePath.hpp:66
FscPath(const iSeeML::rob::OrPtConfig &start, const Type &type, const double &maxCurv, const double &maxCDer, const double &length1, const double &length2, const double &length3)
The 'forward' constructor: a FSC path is built from its starting oriented point, its type,...
Definition: FscPath.hpp:109
FscPath(const FscPath &other)
The copy constructor.
Definition: FscPath.hpp:213
virtual bool getConnection(const double &dist, double &length, double &angle) const
Description method, trying to compute the length of the line segment connecting the turning circles a...
double turnAngle() const
Description method, giving the constant angle between the turning circle's tangent and the orientatio...
Definition: FscPath.hpp:313
FscPath()
The default constructor should only be used for array initializations: it generates a path starting f...
Definition: FscPath.hpp:92
Type
Dubins-like paths can be of six types: their first and last parts are turns, their middle part is tan...
Definition: DubinsLikePath.hpp:47
bool isShortTurn(const double &defl) const
Description method, checking whether the given length is too short with respect to the maximum curvat...
Definition: FscPath.hpp:324
double maxCurvDeriv() const
Description method, giving the path's maximum curvature's derivative.
Definition: FscPath.hpp:271
const Type & type() const
Description method, giving the path's type (from lsl to rlr).
Definition: DubinsLikePath.hpp:171
static bool isZero(const double &x)
Method comparing a double to zero.
Definition: Object.hpp:292
FscPath & operator=(const FscPath &other)
Copy operator (default one is not correct).
Definition: FscPath.hpp:395
This class defines Dubins like paths, which are similar to Dubins paths.
Definition: DubinsLikePath.hpp:33
static void computeValues(const double &maxCurv, const double &maxCDer, double &limDefl, double &turnRad, double &turnAng)
Description method, computing from maximum curvature and maximum curvature's derivative the values of...
const iSeeML::rob::OrPtConfig & start() const
Description method, giving the path's starting configuration (first piece's starting configuration).
Definition: CompoundPath.hpp:79
This class is the base class of ISeeML: every class of ISeeML inherits this one.
Definition: Object.hpp:47
iSeeML::rob::DubinsLikePath & getSolution(iSeeML::rob::DubinsLikePath *paths, const int index) const
Various method, getting in an array of Dubins-like paths the element of given index.
Definition: FscPath.hpp:452
This class defines 2D geometric points, defined by their Cartesian coordinates.
Definition: Point.hpp:29
@ lsl
Path made of a left turn, a straight line and a left turn.
Definition: DubinsLikePath.hpp:49
void writeTo(ostream &O) const
Description method, writing a description of the path in a given output stream.
void addTurn(int &index, const iSeeML::rob::OrPtConfig **start, const double &defl)
Modification method, adding to the pieces of a path a turn starting at a given configuration,...
static const string ClassName
The class name is public, as this class can be instanced.
Definition: FscPath.hpp:75
const double & maxCurv() const
Description method, giving the path's maximum curvature.
Definition: DubinsLikePath.hpp:177
Objects of this class are Forward-only Sub-optimal Continuous-curvature (FSC) paths,...
Definition: FscPath.hpp:26
@ nbPossiblePaths
the number of possible paths (6).
Definition: DubinsLikePath.hpp:64
FscPath(const iSeeML::rob::OrPtConfig &start, const iSeeML::rob::OrPtConfig &goal, const double &maxCurv, const double &maxCDer, const double &limDefl, const double &turnRad, const double &turnAng)
The complete 'goto' constructor: a FSC path is built, starting from a given iSeeML::rob::OrPtConfig a...
Definition: FscPath.hpp:196