KDL::Path_Composite Class Reference

`#include <path_composite.hpp>`

Inheritance diagram for KDL::Path_Composite:

## Public Member Functions | |

virtual Twist | Acc (double s, double sd, double sdd) const |

void | Add (Path *geom, bool aggregate=true) |

virtual Path * | Clone () |

virtual void | GetCurrentSegmentLocation (double s, int &segment_number, double &inner_s) |

virtual IdentifierType | getIdentifier () const |

virtual double | GetLengthToEndOfSegment (int i) |

virtual int | GetNrOfSegments () |

virtual Path * | GetSegment (int i) |

virtual double | LengthToS (double length) |

Path_Composite () | |

virtual double | PathLength () |

virtual Frame | Pos (double s) const |

virtual Twist | Vel (double s, double sd) const |

virtual void | Write (std::ostream &os) |

virtual | ~Path_Composite () |

## Private Types | |

typedef std::vector< double > | DoubleVector |

typedef std::vector< std::pair < Path *, bool > > | PathVector |

## Private Member Functions | |

double | Lookup (double s) const |

## Private Attributes | |

double | cached_ends |

int | cached_index |

double | cached_starts |

DoubleVector | dv |

PathVector | gv |

double | pathlength |

A Path being the composition of other Path objects.

For several of its methods, this class needs to lookup the segment corresponding to a value of the path variable s. To increase efficiency, this value is cached.

Currently a linear search is used to look up the segment. A binary search is more efficient. Can STL be used for this ? Increase the efficiency for caching for the common case of a fine grained monotonously increasing path variable s.

For all Path.., VelocityProfile.., Trajectory... check the bounds on the inputs with asserts.

explain this routine in the wiki.

Definition at line 69 of file path_composite.hpp.

typedef std::vector<double> KDL::Path_Composite::DoubleVector` [private]` |

Definition at line 72 of file path_composite.hpp.

typedef std::vector< std::pair<Path*,bool> > KDL::Path_Composite::PathVector` [private]` |

Definition at line 71 of file path_composite.hpp.

Definition at line 74 of file path_composite.cpp.

KDL::Path_Composite::~Path_Composite | ( | ) | ` [virtual]` |

Definition at line 152 of file path_composite.cpp.

Twist KDL::Path_Composite::Acc | ( | double | s, |

double | sd, |
||

double | sdd |
||

) | const` [virtual]` |

Returns the acceleration twist at path length s and with derivative of s == sd, and 2nd derivative of s == sdd

Implements KDL::Path.

Definition at line 107 of file path_composite.cpp.

void KDL::Path_Composite::Add | ( | Path * | geom, |

bool | aggregate = `true` |
||

) |

Adds a Path* to this composite

Definition at line 81 of file path_composite.cpp.

Path * KDL::Path_Composite::Clone | ( | ) | ` [virtual]` |

Virtual constructor, constructing by copying, Returns a deep copy of this Path Object

Implements KDL::Path.

Definition at line 112 of file path_composite.cpp.

void KDL::Path_Composite::GetCurrentSegmentLocation | ( | double | s, |

int & | segment_number, |
||

double & | inner_s |
||

) | ` [virtual]` |

**Parameters:**-
s [INPUT] path length variable for the composite. segment_number [OUTPUT] segments that corresponds to the path length variable s. inner_s [OUTPUT] path length to use within the segment.

Definition at line 145 of file path_composite.cpp.

virtual IdentifierType KDL::Path_Composite::getIdentifier | ( | ) | const` [inline, virtual]` |

gets an identifier indicating the type of this Path object

Implements KDL::Path.

Definition at line 159 of file path_composite.hpp.

double KDL::Path_Composite::GetLengthToEndOfSegment | ( | int | i | ) | ` [virtual]` |

gets the length to the end of the given segment.

**Parameters:**-
i segment number

**Returns:**- length to the end of the segment, i.e. the value for s corresponding to the end of this segment.

Definition at line 139 of file path_composite.cpp.

int KDL::Path_Composite::GetNrOfSegments | ( | ) | ` [virtual]` |

returns the number of underlying segments.

Definition at line 129 of file path_composite.cpp.

Path * KDL::Path_Composite::GetSegment | ( | int | i | ) | ` [virtual]` |

returns a pointer to the underlying Path of the given segment number i.

**Parameters:**-
i segment number

**Returns:**- pointer to the underlying Path

**Warning:**- The pointer is still owned by this class and is lifetime depends on the lifetime of this class.

Definition at line 133 of file path_composite.cpp.

double KDL::Path_Composite::LengthToS | ( | double | length | ) | ` [virtual]` |

LengthToS() converts a physical length along the trajectory to the parameter s used in Pos, Vel and Acc. This is used because in cases with large rotations the parameter s does NOT correspond to the lineair length along the trajectory. User should be sure that the lineair distance travelled by this path object is NOT zero, when using this method ! (e.g. the case of only rotational change) throws Error_MotionPlanning_Not_Applicable if used on composed path objects.

Implements KDL::Path.

Definition at line 87 of file path_composite.cpp.

double KDL::Path_Composite::Lookup | ( | double | s | ) | const` [private]` |

Definition at line 54 of file path_composite.cpp.

double KDL::Path_Composite::PathLength | ( | ) | ` [virtual]` |

Returns the total path length of the trajectory (has dimension LENGTH) This is not always a physical length , ie when dealing with rotations that are dominant.

Implements KDL::Path.

Definition at line 92 of file path_composite.cpp.

Frame KDL::Path_Composite::Pos | ( | double | s | ) | const` [virtual]` |

Returns the Frame at the current path length s

Implements KDL::Path.

Definition at line 97 of file path_composite.cpp.

Twist KDL::Path_Composite::Vel | ( | double | s, |

double | sd |
||

) | const` [virtual]` |

Returns the velocity twist at path length s theta and with derivative of s == sd

Implements KDL::Path.

Definition at line 102 of file path_composite.cpp.

void KDL::Path_Composite::Write | ( | std::ostream & | os | ) | ` [virtual]` |

Writes one of the derived objects to the stream

Implements KDL::Path.

Definition at line 120 of file path_composite.cpp.

double KDL::Path_Composite::cached_ends` [mutable, private]` |

Definition at line 80 of file path_composite.hpp.

int KDL::Path_Composite::cached_index` [mutable, private]` |

Definition at line 81 of file path_composite.hpp.

double KDL::Path_Composite::cached_starts` [mutable, private]` |

Definition at line 79 of file path_composite.hpp.

DoubleVector KDL::Path_Composite::dv` [private]` |

Definition at line 75 of file path_composite.hpp.

PathVector KDL::Path_Composite::gv` [private]` |

Definition at line 74 of file path_composite.hpp.

double KDL::Path_Composite::pathlength` [private]` |

Definition at line 76 of file path_composite.hpp.

The documentation for this class was generated from the following files:

orocos_kdl

Author(s): Ruben Smits, Erwin Aertbelien, Orocos Developers

autogenerated on Sat Dec 28 2013 17:17:26

Author(s): Ruben Smits, Erwin Aertbelien, Orocos Developers

autogenerated on Sat Dec 28 2013 17:17:26