Public Member Functions

Segment::Spline Class Reference

Spline shaped segment. More...

#include <trgen.h>

Inherits TrajectorySegment.

Collaboration diagram for Segment::Spline:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Spline (Point *_p1, Point *_p2, Point *_corner)
virtual bool isSpline () const
virtual void setMaxV (const TrajectoryConstraints &constr)
 Finds maximal speeds vc, v1 and v2 (in the middle, in the beginning and at the end).
virtual double getLength () const
 Length of the segment in meters.
virtual double getDistance (double time) const
 return distance on the spline in a given time
virtual void getPointAt (double distance, Point *p)
 Returns the point of the segment, located at the specific distance from the beginning or end.
virtual void shortenBy (double distance, Point *newEnd)
 result is changed variable length and one of param0 and param1 changed is also p1 or p2, but they are no more utilized
virtual TrajectorySegmentsplitAtByTime (double time, Point *newEnd)
virtual TrajectorySegmentsplitAt (double distance, Point *newEnd)
 Splits the segment at the specified point.
virtual void getRefPos (double time, Pos &rp)
 Return the reference position at some time.
virtual double startAt (double time)
 Sets the starting time of the segment and calculates the ending time according to this.

Detailed Description

Spline shaped segment.

The spline is represented by x-axis polynom and y-axis polynom. Both have 5-th order. P_x(t) = A_x*t^5 + B_x*t^4 + C_x*t^3 + D_x*t^2 + E_x*t + F_x P_y(t) = A_y*t^5 + B_y*t^4 + C_y*t^3 + D_y*t^2 + E_y*t + F_y The parameter t goes from param0 to param1 (initially 0 and 1) We pressume that the parameter dt/ds = const (reasonable simplification)

TODO: comment


Constructor & Destructor Documentation

Segment::Spline::Spline ( Point _p1,
Point _p2,
Point _corner 
)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

double Segment::Spline::getDistance ( double  time  )  const [virtual]

return distance on the spline in a given time

Implements TrajectorySegment.

Here is the caller graph for this function:

virtual double Segment::Spline::getLength (  )  const [inline, virtual]

Length of the segment in meters.

Implements TrajectorySegment.

void Segment::Spline::getPointAt ( double  distance,
Point p 
) [virtual]

Returns the point of the segment, located at the specific distance from the beginning or end.

Parameters:
[in] distance Distance from the beginning (if positive) or end (if negative) of the segment in meters.
[out] p Pointer to the point to sore the result.

Implements TrajectorySegment.

Here is the caller graph for this function:

void Segment::Spline::getRefPos ( double  time,
Pos rp 
) [virtual]

Return the reference position at some time.

Parameters:
[in] time Time (within this segment time range).
[out] rp Reference position.

Implements TrajectorySegment.

Here is the call graph for this function:

virtual bool Segment::Spline::isSpline (  )  const [inline, virtual]

Reimplemented from TrajectorySegment.

void Segment::Spline::setMaxV ( const TrajectoryConstraints constr  )  [virtual]

Finds maximal speeds vc, v1 and v2 (in the middle, in the beginning and at the end).

The speed profile looks like a letter 'v' because of clothoid's curvature profile shape. This is a simplified approach, but quick. Other constraints play a significant role. display constraints with on-line speed and accs values

Implements TrajectorySegment.

void Segment::Spline::shortenBy ( double  distance,
Point newEnd 
) [virtual]

result is changed variable length and one of param0 and param1 changed is also p1 or p2, but they are no more utilized

Implements TrajectorySegment.

Here is the call graph for this function:

Here is the caller graph for this function:

TrajectorySegment * Segment::Spline::splitAt ( double  distance,
Point newEnd 
) [virtual]

Splits the segment at the specified point.

The result will be two segments following the same trajectory as the original one.

Parameters:
[in] distance Distance of the split from the beginning of the segment.
[in] newEnd Point which will be used as a middle point joining the two segments.
Returns:
Pointer to the newly created segment.

Implements TrajectorySegment.

Here is the call graph for this function:

TrajectorySegment * Segment::Spline::splitAtByTime ( double  time,
Point newEnd 
) [virtual]

Implements TrajectorySegment.

Here is the call graph for this function:

double Segment::Spline::startAt ( double  time  )  [virtual]

Sets the starting time of the segment and calculates the ending time according to this.

Also acceleration is calculated from these times and speed.

Parameters:
time Starting time relative to the start of the whole trajectory (in seconds).
Returns:
Ending time.

Reimplemented from TrajectorySegment.


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