LocalGuidance
A library that generates velocity references to follow a path.
robot_utils::GaussianBaseTrajectory Class Reference

#include <GaussianBaseTrajectory.hpp>

Public Types

typedef std::vector< double > Parameters
 
typedef std::vector< double > BaseValues
 

Public Member Functions

 GaussianBaseTrajectory ()
 
 ~GaussianBaseTrajectory ()
 
void initialize (const Parameters &par, double timeHorizon, double dt)
 
double advance ()
 
double next () const
 
double previous () const
 
double getCurrentSecondDerivative () const
 
double getCurrentDerivative () const
 
double getCurrentValue () const
 
double getValueAtTimeFromNow (double time, double dt) const
 
void reset ()
 
void setParameters (const Parameters &par)
 
void setSigmaOfBasisFunctions (double sigma)
 
void setNumberOfBasisFunctions (double numberOfBasisFunctions)
 
void setDurationOfTrajectory (double timeHorizon)
 
void setTimeStep (double dt)
 
double getLengthOfTrajectory () const
 
double getSigma () const
 
int getNumberOfBasisFunctions () const
 
Parameters getParameters () const
 

Protected Member Functions

void setScalingOfBasisFunctions ()
 
void generateValueVectors ()
 
double getValues (double &value, double &derivativeValue, double &secondDerivativeValue, double t) const
 
void generateBasisFunctionVectors (BaseValues &baseValues, BaseValues &baseDerivatives, BaseValues &baseSecondDerivatives, double time, double sigma, double timeBetweenFirstAndLastParametrizedBaseFunction, int numberOfBasisFunctions) const
 
double getValueOfGaussian (double x, double mu, double sigma) const
 
double calculateValuesOfTrajectory (const BaseValues &basisVector, const Parameters &parameters) const
 
Parameters elementWiseVectorMultiplication (const BaseValues &vecB, const Parameters &vecP) const
 
double sum (const Parameters &vec) const
 

Protected Attributes

double sigma_
 
double timeBetweenFirstAndLastParametrizedBaseFunction_
 
int numberOfBasisfunctions_
 
double basisScaling_
 
double timeStep_
 
Parameters parameters_
 
double currentTime_
 
double previousValue_
 
double currentValue_
 
double currentDerivativeValue_
 
double currentSecondDerivativeValue_
 
std::vector< double > values_
 
std::vector< double > derivativeValues_
 
std::vector< double > secondDerivativeValues_
 

Member Typedef Documentation

Constructor & Destructor Documentation

robot_utils::GaussianBaseTrajectory::GaussianBaseTrajectory ( )
robot_utils::GaussianBaseTrajectory::~GaussianBaseTrajectory ( )

Member Function Documentation

double robot_utils::GaussianBaseTrajectory::advance ( )
double robot_utils::GaussianBaseTrajectory::calculateValuesOfTrajectory ( const BaseValues basisVector,
const Parameters parameters 
) const
protected
Parameters robot_utils::GaussianBaseTrajectory::elementWiseVectorMultiplication ( const BaseValues vecB,
const Parameters vecP 
) const
protected
void robot_utils::GaussianBaseTrajectory::generateBasisFunctionVectors ( BaseValues baseValues,
BaseValues baseDerivatives,
BaseValues baseSecondDerivatives,
double  time,
double  sigma,
double  timeBetweenFirstAndLastParametrizedBaseFunction,
int  numberOfBasisFunctions 
) const
protected
void robot_utils::GaussianBaseTrajectory::generateValueVectors ( )
protected
double robot_utils::GaussianBaseTrajectory::getCurrentDerivative ( ) const
double robot_utils::GaussianBaseTrajectory::getCurrentSecondDerivative ( ) const
double robot_utils::GaussianBaseTrajectory::getCurrentValue ( ) const
double robot_utils::GaussianBaseTrajectory::getLengthOfTrajectory ( ) const
int robot_utils::GaussianBaseTrajectory::getNumberOfBasisFunctions ( ) const
Parameters robot_utils::GaussianBaseTrajectory::getParameters ( ) const
double robot_utils::GaussianBaseTrajectory::getSigma ( ) const
double robot_utils::GaussianBaseTrajectory::getValueAtTimeFromNow ( double  time,
double  dt 
) const
double robot_utils::GaussianBaseTrajectory::getValueOfGaussian ( double  x,
double  mu,
double  sigma 
) const
protected
double robot_utils::GaussianBaseTrajectory::getValues ( double &  value,
double &  derivativeValue,
double &  secondDerivativeValue,
double  t 
) const
protected
void robot_utils::GaussianBaseTrajectory::initialize ( const Parameters par,
double  timeHorizon,
double  dt 
)
double robot_utils::GaussianBaseTrajectory::next ( ) const
double robot_utils::GaussianBaseTrajectory::previous ( ) const
void robot_utils::GaussianBaseTrajectory::reset ( )
void robot_utils::GaussianBaseTrajectory::setDurationOfTrajectory ( double  timeHorizon)
void robot_utils::GaussianBaseTrajectory::setNumberOfBasisFunctions ( double  numberOfBasisFunctions)
void robot_utils::GaussianBaseTrajectory::setParameters ( const Parameters par)
void robot_utils::GaussianBaseTrajectory::setScalingOfBasisFunctions ( )
protected
void robot_utils::GaussianBaseTrajectory::setSigmaOfBasisFunctions ( double  sigma)
void robot_utils::GaussianBaseTrajectory::setTimeStep ( double  dt)
double robot_utils::GaussianBaseTrajectory::sum ( const Parameters vec) const
protected

Member Data Documentation

double robot_utils::GaussianBaseTrajectory::basisScaling_
protected
double robot_utils::GaussianBaseTrajectory::currentDerivativeValue_
protected
double robot_utils::GaussianBaseTrajectory::currentSecondDerivativeValue_
protected
double robot_utils::GaussianBaseTrajectory::currentTime_
protected
double robot_utils::GaussianBaseTrajectory::currentValue_
protected
std::vector<double> robot_utils::GaussianBaseTrajectory::derivativeValues_
protected
int robot_utils::GaussianBaseTrajectory::numberOfBasisfunctions_
protected
Parameters robot_utils::GaussianBaseTrajectory::parameters_
protected
double robot_utils::GaussianBaseTrajectory::previousValue_
protected
std::vector<double> robot_utils::GaussianBaseTrajectory::secondDerivativeValues_
protected
double robot_utils::GaussianBaseTrajectory::sigma_
protected
double robot_utils::GaussianBaseTrajectory::timeBetweenFirstAndLastParametrizedBaseFunction_
protected
double robot_utils::GaussianBaseTrajectory::timeStep_
protected
std::vector<double> robot_utils::GaussianBaseTrajectory::values_
protected

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