7 #ifndef ISEEML_COMP_PATH_HH 8 #define ISEEML_COMP_PATH_HH 12 #include <iSeeML/rob/CurvConfig.hpp> 14 #include <iSeeML/rob/BasicPath.hpp> 39 static const string ClassName;
54 #define ISEEML_ROB_COMPATH_forall_pieces(i) \ 55 int i; for(i = 1; i <= nbPieces(); i++) 68 O <<
'{'; ISEEML_ROB_COMPATH_forall_pieces(i)
127 double res = 0; ISEEML_ROB_COMPATH_forall_pieces(i)
138 double res = 0; ISEEML_ROB_COMPATH_forall_pieces(i)
194 #ifdef ISEEML_CHECK_COMP_PATH_PRECOND 195 if (s < 0) cerr << ClassName <<
"::operator[]:" 196 <<
" negative arc length " << s << endl;
199 while (arcLength > l)
200 #ifdef ISEEML_CHECK_COMP_PATH_PRECOND 202 cerr << ClassName <<
"::operator[]:" 203 <<
" arc length " << s << endl
204 <<
" bigger than length " <<
length() << endl;
208 #ifdef ISEEML_CHECK_ARRAY_ELEMT 209 if ( pieceNb ==
nbPieces() ) l = arcLength;
214 return(
piece(pieceNb)[arcLength] ); }
239 #ifdef ISEEML_CHECK_COMP_PATH_PRECOND 241 cerr << ClassName <<
"::piece: no pieces!!!" << endl;
242 else if ( (index < 1) || ( index >
nbPieces() ) )
243 cerr << ClassName <<
"::piece: abnormal index " 244 << index <<
", not in 1.." <<
nbPieces() << endl;
247 #ifdef ISEEML_CHECK_ARRAY_ELEMT 250 index;
return _piece(nb); }
267 #endif // end of definition void writeTo(ostream &O) const
Description method, writing a description of the path in a given output stream (the array of pieces i...
Definition: CompoundPath.hpp:67
virtual double deflection() const =0
Description method, giving the path's deflection (change of orientation).
This class defines compound (or complex, or composed) paths, which are made of a set of basic paths...
Definition: CompoundPath.hpp:28
This class defines superclass of basic paths, from which compound paths can be built.
Definition: BasicPath.hpp:21
const iSeeML::rob::OrPtConfig & end() const
Description method, giving the path's final configuration (last piece's starting configuration).
Definition: CompoundPath.hpp:88
const iSeeML::rob::OrPtConfig & start() const
Description method, giving the path's starting configuration (first piece's starting configuration)...
Definition: CompoundPath.hpp:79
double deflection() const
Description method, giving the path's deflection (sum of the pieces' deflection). ...
Definition: CompoundPath.hpp:137
virtual double length() const =0
Description method, giving the path's length.
This class defines a standard robotic configuration, containing the position of a reference point and...
Definition: OrPtConfig.hpp:45
iSeeML::rob::BasicPath & piece(const int index)
Modification method, returning (for modification) the basic path of given index in the list of which ...
Definition: CompoundPath.hpp:166
iSeeML::rob::CurvConfig operator[](const double &s) const
Description method, giving a configuration at a given arc length along the path.
Definition: CompoundPath.hpp:191
double length() const
Description method, giving the path's length (sum of the pieces' length).
Definition: CompoundPath.hpp:126
virtual const iSeeML::rob::OrPtConfig & start() const =0
Description method, giving the path's starting configuration.
virtual iSeeML::rob::BasicPath & _piece(const int index) const =0
Virtual method returning the basic path of given index in the list of which this compound path is mad...
virtual int nbPieces() const =0
Description method, giving the number of pieces of the path.
This class is the base class of all robotic paths in ISeeML.
Definition: Path.hpp:51
iSeeML::rob::BasicPath & getPiece(const int index) const
Method returning the basic path of given index in the list of which this compound path is made...
Definition: CompoundPath.hpp:237
This class defines a more precise configuration than classical ones for mobile robots.
Definition: CurvConfig.hpp:30
virtual const iSeeML::rob::OrPtConfig & end() const =0
Description method, giving the path's final configuration.
const iSeeML::rob::BasicPath & piece(const int index) const
Description method, returning the (constant) basic path of given index in the list of which this comp...
Definition: CompoundPath.hpp:114