Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
ParabolicRamp::ParabolicRamp1D Class Reference

Stores optimal trajectores for an acceleration and velocity-bounded 1D system. More...

#include <ParabolicRamp.h>

Public Member Functions

void SetConstant (Real x, Real t=0)
 Sets the ramp to a constant function for time t.
 
void SetLinear (Real x0, Real x1, Real t)
 Sets the ramp to a linear function from x0 to x1 with time t.
 
bool SolveMinTime (Real amax, Real vmax)
 Solves for minimum time given acceleration and velocity bounds.
 
bool SolveMinTime2 (Real amax, Real vmax, Real tLowerBound)
 Solves for minimum time given acceleration and velocity bounds, min time.
 
bool SolveMinAccel (Real endTime, Real vmax)
 Solves for minimum acceleration given end time and velocity bounds.
 
Real SolveMinAccel2 (Real endTime, Real vmax)
 Same, but if fails, returns the minimum time > endTime.
 
void SolveBraking (Real amax)
 Solves for the minimum-time braking trajectory starting from x0,dx0.
 
Real Evaluate (Real t) const
 Evaluates the trajectory.
 
Real Derivative (Real t) const
 Evaluates the derivative of the trajectory.
 
Real Accel (Real t) const
 Evaluates the second derivative of the trajectory.
 
Real EndTime () const
 Returns the time at which x1 is reached.
 
void Dilate (Real timeScale)
 Scales time to slow down (value > 1) or speed up (< 1) the trajectory.
 
void TrimFront (Real tcut)
 Trims off the front [0,tcut] of the trajectory.
 
void TrimBack (Real tcut)
 Trims off the front [T-tcut,T] of the trajectory.
 
void Bounds (Real &xmin, Real &xmax) const
 Returns the x bounds on the path.
 
void Bounds (Real ta, Real tb, Real &xmin, Real &xmax) const
 Returns the x bounds for the given time interval.
 
void DerivBounds (Real &vmin, Real &vmax) const
 Returns the v bounds on the path.
 
void DerivBounds (Real ta, Real tb, Real &vmin, Real &vmax) const
 Returns the v bounds for the given time interval.
 
bool IsValid () const
 Sanity check.
 

Public Attributes

Real x0
 Input.
 
Real dx0
 
Real x1
 
Real dx1
 
Real tswitch1
 Calculated upon SolveX.
 
Real tswitch2
 
Real ttotal
 
Real a1
 
Real v
 
Real a2
 

Detailed Description

Stores optimal trajectores for an acceleration and velocity-bounded 1D system.

Initialize the members x0 (start position), x1 (end position), dx0 (start velocity), and dx1 (end velocity) before calling the SolveX functions.


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