KrisLibrary  1.0.0
Classes | Typedefs | Functions
ParabolicRamp.h File Reference

Functions for optimal acceleration-bounded trajectories. More...

#include <KrisLibrary/math/math.h>
#include <vector>

Go to the source code of this file.

Classes

class  ParabolicRamp::ParabolicRamp1D
 Stores optimal trajectores for an acceleration and velocity-bounded 1D system. More...
 
class  ParabolicRamp::ParabolicRampND
 Solves for optimal trajectores for a velocity-bounded ND system. More...
 

Typedefs

typedef Math::Real ParabolicRamp::Real
 
typedef std::vector< Real > ParabolicRamp::Vector
 

Functions

bool ParabolicRamp::SolveMinTimeBounded (Real x0, Real v0, Real x1, Real v1, Real amax, Real vmax, Real xmin, Real xmax, ParabolicRamp1D &ramp)
 
bool ParabolicRamp::SolveMinAccelBounded (Real x0, Real v0, Real x1, Real v1, Real endTime, Real vmax, Real xmin, Real xmax, std::vector< ParabolicRamp1D > &ramps)
 
Real ParabolicRamp::SolveMinTimeBounded (const Vector &x0, const Vector &v0, const Vector &x1, const Vector &v1, const Vector &amax, const Vector &vmax, const Vector &xmin, const Vector &xmax, std::vector< std::vector< ParabolicRamp1D > > &ramps)
 
bool ParabolicRamp::SolveMinAccelBounded (const Vector &x0, const Vector &v0, const Vector &x1, const Vector &v1, Real endTime, const Vector &vmax, const Vector &xmin, const Vector &xmax, std::vector< std::vector< ParabolicRamp1D > > &ramps)
 
void ParabolicRamp::CombineRamps (const std::vector< std::vector< ParabolicRamp1D > > &ramps, std::vector< ParabolicRampND > &ndramps)
 Combines an array of 1-d ramp sequences into a sequence of N-d ramps.
 

Detailed Description

Functions for optimal acceleration-bounded trajectories.

Function Documentation

bool ParabolicRamp::SolveMinAccelBounded ( const Vector &  x0,
const Vector &  v0,
const Vector &  x1,
const Vector &  v1,
Real  endTime,
const Vector &  vmax,
const Vector &  xmin,
const Vector &  xmax,
std::vector< std::vector< ParabolicRamp1D > > &  ramps 
)
bool ParabolicRamp::ParabolicRamp::SolveMinAccelBounded ( Real  x0,
Real  v0,
Real  x1,
Real  v1,
Real  endTime,
Real  vmax,
Real  xmin,
Real  xmax,
std::vector< ParabolicRamp1D > &  ramps 
)

Computes a sequence of up to three ramps connecting (x0,v0) to (x1,v1) in minimum-acceleration fashion with a fixed end time, under the given velocity and x bounds. Returns true if successful.

Real ParabolicRamp::SolveMinTimeBounded ( const Vector &  x0,
const Vector &  v0,
const Vector &  x1,
const Vector &  v1,
const Vector &  amax,
const Vector &  vmax,
const Vector &  xmin,
const Vector &  xmax,
std::vector< std::vector< ParabolicRamp1D > > &  ramps 
)

Vector version of above. Returns the time of the minimum time trajectory, or -1 on failure

References Math::FuzzyEquals().

bool ParabolicRamp::ParabolicRamp::SolveMinTimeBounded ( Real  x0,
Real  v0,
Real  x1,
Real  v1,
Real  amax,
Real  vmax,
Real  xmin,
Real  xmax,
ParabolicRamp1D ramp 
)

Computes a min-time ramp from (x0,v0) to (x1,v1) under the given acceleration, velocity, and x bounds. Returns true if successful.