KDL  1.4.0
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
KDL::Path_RoundedComposite Class Reference

The specification of a path, composed of way-points with rounded corners. More...

#include <src/path_roundedcomposite.hpp>

Inheritance diagram for KDL::Path_RoundedComposite:
Inheritance graph
[legend]
Collaboration diagram for KDL::Path_RoundedComposite:
Collaboration graph
[legend]

Public Types

enum  IdentifierType {
  ID_LINE =1, ID_CIRCLE =2, ID_COMPOSITE =3, ID_ROUNDED_COMPOSITE =4,
  ID_POINT =5, ID_CYCLIC_CLOSED =6
}
 

Public Member Functions

 Path_RoundedComposite (double radius, double eqradius, RotationalInterpolation *orient, bool aggregate=true)
 
void Add (const Frame &F_base_point)
 Adds a point to this rounded composite, between to adjecent points a Path_Line will be created, between two lines there will be rounding with the given radius with a Path_Circle. More...
 
void Finish ()
 to be called after the last line is added to finish up the work More...
 
virtual double LengthToS (double length)
 LengthToS() converts a physical length along the trajectory to the parameter s used in Pos, Vel and Acc. More...
 
virtual double PathLength ()
 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. More...
 
virtual Frame Pos (double s) const
 Returns the Frame at the current path length s. More...
 
virtual Twist Vel (double s, double sd) const
 Returns the velocity twist at path length s theta and with derivative of s == sd. More...
 
virtual Twist Acc (double s, double sd, double sdd) const
 Returns the acceleration twist at path length s and with derivative of s == sd, and 2nd derivative of s == sdd. More...
 
virtual PathClone ()
 virtual constructor, constructing by copying. More...
 
virtual void Write (std::ostream &os)
 Writes one of the derived objects to the stream. More...
 
virtual int GetNrOfSegments ()
 returns the number of underlying segments. More...
 
virtual PathGetSegment (int i)
 returns a pointer to the underlying Path of the given segment number i. More...
 
virtual double GetLengthToEndOfSegment (int i)
 gets the length to the end of the given segment. More...
 
virtual void GetCurrentSegmentLocation (double s, int &segment_number, double &inner_s)
 
virtual IdentifierType getIdentifier () const
 gets an identifier indicating the type of this Path object More...
 
virtual ~Path_RoundedComposite ()
 

Static Public Member Functions

static PathRead (std::istream &is)
 Reads one of the derived objects from the stream and returns a pointer (factory method) More...
 

Private Member Functions

 Path_RoundedComposite (Path_Composite *comp, double radius, double eqradius, RotationalInterpolation *orient, bool aggregate, int nrofpoints)
 

Private Attributes

Path_Compositecomp
 a Path_Composite is aggregated to hold the rounded trajectory with circles and lines More...
 
double radius
 
double eqradius
 
RotationalInterpolationorient
 
Frame F_base_start
 
Frame F_base_via
 
int nrofpoints
 
bool aggregate
 

Detailed Description

The specification of a path, composed of way-points with rounded corners.

Member Enumeration Documentation

§ IdentifierType

enum KDL::Path::IdentifierType
inherited
Enumerator
ID_LINE 
ID_CIRCLE 
ID_COMPOSITE 
ID_ROUNDED_COMPOSITE 
ID_POINT 
ID_CYCLIC_CLOSED 

Constructor & Destructor Documentation

§ Path_RoundedComposite() [1/2]

KDL::Path_RoundedComposite::Path_RoundedComposite ( Path_Composite comp,
double  radius,
double  eqradius,
RotationalInterpolation orient,
bool  aggregate,
int  nrofpoints 
)
private

Referenced by Clone().

§ Path_RoundedComposite() [2/2]

KDL::Path_RoundedComposite::Path_RoundedComposite ( double  radius,
double  eqradius,
RotationalInterpolation orient,
bool  aggregate = true 
)
Parameters
radius: radius of the rounding circles
eqradius: equivalent radius to compare rotations/velocities
orient: method of rotational_interpolation interpolation
aggregate: if true, this object will own the _orient pointer, i.e. it will delete the _orient pointer when the destructor of this object is called.

References eqradius, and nrofpoints.

§ ~Path_RoundedComposite()

KDL::Path_RoundedComposite::~Path_RoundedComposite ( )
virtual

References aggregate, comp, and orient.

Referenced by getIdentifier().

Member Function Documentation

§ Acc()

Twist KDL::Path_RoundedComposite::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.

References KDL::Path_Composite::Acc(), and comp.

§ Add()

void KDL::Path_RoundedComposite::Add ( const Frame F_base_point)

Adds a point to this rounded composite, between to adjecent points a Path_Line will be created, between two lines there will be rounding with the given radius with a Path_Circle.

The Error_MotionPlanning_Not_Feasible has a type (obtained by GetType) of:

  • 3101 if the eq. radius <= 0
  • 3102 if the first segment in a rounding has zero length.
  • 3103 if the second segment in a rounding has zero length.
  • 3104 if the angle between the first and the second segment is close to M_PI. (meaning that the segments are on top of each other)
  • 3105 if the distance needed for the rounding is larger then the first segment.
  • 3106 if the distance needed for the rounding is larger then the second segment.
Parameters
F_base_pointthe pose of a new via point.
Warning
Can throw Error_MotionPlanning_Not_Feasible object handle the case of error type 3105 and 3106 by skipping segments, such that the class could be applied with points that are very close to each other.

References KDL::Path_Composite::Add(), KDL::RotationalInterpolation::Clone(), comp, KDL::dot(), eqradius, F_base_start, F_base_via, KDL::Frame::M, KDL::Vector::Norm(), KDL::Vector::Normalize(), nrofpoints, orient, KDL::Frame::p, and radius.

§ Clone()

Path * KDL::Path_RoundedComposite::Clone ( )
virtual

virtual constructor, constructing by copying.

In this case it returns the Clone() of the aggregated Path_Composite because this is all one ever will need.

Implements KDL::Path.

References KDL::RotationalInterpolation::Clone(), KDL::Path_Composite::Clone(), comp, eqradius, nrofpoints, orient, Path_RoundedComposite(), and radius.

§ Finish()

void KDL::Path_RoundedComposite::Finish ( )

to be called after the last line is added to finish up the work

References KDL::Path_Composite::Add(), KDL::RotationalInterpolation::Clone(), comp, eqradius, F_base_start, F_base_via, nrofpoints, and orient.

§ GetCurrentSegmentLocation()

void KDL::Path_RoundedComposite::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.

References comp, and KDL::Path_Composite::GetCurrentSegmentLocation().

§ getIdentifier()

virtual IdentifierType KDL::Path_RoundedComposite::getIdentifier ( ) const
inlinevirtual

gets an identifier indicating the type of this Path object

Implements KDL::Path.

References KDL::Path::ID_ROUNDED_COMPOSITE, and ~Path_RoundedComposite().

§ GetLengthToEndOfSegment()

double KDL::Path_RoundedComposite::GetLengthToEndOfSegment ( int  i)
virtual

gets the length to the end of the given segment.

Parameters
isegment number
Returns
length to the end of the segment, i.e. the value for s corresponding to the end of this segment.

References comp, and KDL::Path_Composite::GetLengthToEndOfSegment().

§ GetNrOfSegments()

int KDL::Path_RoundedComposite::GetNrOfSegments ( )
virtual

returns the number of underlying segments.

References comp, and KDL::Path_Composite::GetNrOfSegments().

§ GetSegment()

Path * KDL::Path_RoundedComposite::GetSegment ( int  i)
virtual

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

Parameters
isegment 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.

References comp, and KDL::Path_Composite::GetSegment().

§ LengthToS()

double KDL::Path_RoundedComposite::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.

References comp, and KDL::Path_Composite::LengthToS().

§ PathLength()

double KDL::Path_RoundedComposite::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.

References comp, and KDL::Path_Composite::PathLength().

§ Pos()

Frame KDL::Path_RoundedComposite::Pos ( double  s) const
virtual

Returns the Frame at the current path length s.

Implements KDL::Path.

References comp, and KDL::Path_Composite::Pos().

§ Read()

Path * KDL::Path::Read ( std::istream &  is)
staticinherited

Reads one of the derived objects from the stream and returns a pointer (factory method)

References KDL::RotationalInterpolation::Read().

Referenced by KDL::Trajectory::Read().

§ Vel()

Twist KDL::Path_RoundedComposite::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.

References comp, and KDL::Path_Composite::Vel().

§ Write()

void KDL::Path_RoundedComposite::Write ( std::ostream &  os)
virtual

Writes one of the derived objects to the stream.

Implements KDL::Path.

References comp, and KDL::Path_Composite::Write().

Member Data Documentation

§ aggregate

bool KDL::Path_RoundedComposite::aggregate
private

Referenced by ~Path_RoundedComposite().

§ comp

Path_Composite* KDL::Path_RoundedComposite::comp
private

§ eqradius

double KDL::Path_RoundedComposite::eqradius
private

§ F_base_start

Frame KDL::Path_RoundedComposite::F_base_start
private

Referenced by Add(), and Finish().

§ F_base_via

Frame KDL::Path_RoundedComposite::F_base_via
private

Referenced by Add(), and Finish().

§ nrofpoints

int KDL::Path_RoundedComposite::nrofpoints
private

§ orient

RotationalInterpolation* KDL::Path_RoundedComposite::orient
private

§ radius

double KDL::Path_RoundedComposite::radius
private

Referenced by Add(), and Clone().


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