LocalGuidance
A library that generates velocity references to follow a path.
dmp::TimelessGaussianKernelApproximator Class Reference

#include <TimelessGaussianKernelApproximator.hpp>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW TimelessGaussianKernelApproximator ()
 
 ~TimelessGaussianKernelApproximator ()
 
bool initialize (int numSystems, const Eigen::VectorXd num_rfs, const double activation, const double duration, const double sampling_frequency)
 
bool isInitialized () const
 
bool isSetup () const
 
bool learnFromThetas (const std::vector< Eigen::VectorXd > &thetas)
 
std::string getInfoString ()
 
bool getThetas (std::vector< Eigen::VectorXd > &thetas)
 
bool setThetas (const std::vector< Eigen::VectorXd > &thetas)
 
bool getWidthsAndCenters (std::vector< Eigen::VectorXd > &widths, std::vector< Eigen::VectorXd > &centers)
 
bool getWidthsAndCenters (const int system_index, Eigen::VectorXd &widths, Eigen::VectorXd &centers)
 
bool getNumRFS (const int system_index, int &num_rfs)
 
bool getNumRFS (std::vector< int > &num_rfs)
 
bool getBasisFunctions (const int num_time_steps, std::vector< Eigen::MatrixXd > &basis_functions)
 
bool getBasisFunctionsValues (const double x_input, std::vector< Eigen::VectorXd > &currentBasisFunctionsValues)
 
bool update (const double progress)
 
double getProgress () const
 
bool getCurrentPosition (Eigen::VectorXd &current_position)
 
int getNumSystems () const
 
bool reset ()
 
std::string getClassName ()
 

Private Member Functions

bool integrate (const double dt_total, const int num_iteration)
 
void initialize ()
 

Private Attributes

bool initialized_
 
bool isLearned_
 
double progress_
 
int numSystems_
 
std::vector< Eigen::VectorXd > coordinates_
 
boost::ptr_vector< GaussianKernelgaussianKernelModels_
 

Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW dmp::TimelessGaussianKernelApproximator::TimelessGaussianKernelApproximator ( )

constructor

dmp::TimelessGaussianKernelApproximator::~TimelessGaussianKernelApproximator ( )

destructor

Member Function Documentation

bool dmp::TimelessGaussianKernelApproximator::getBasisFunctions ( const int  num_time_steps,
std::vector< Eigen::MatrixXd > &  basis_functions 
)
Parameters
num_time_steps
basis_functions
Returns
bool dmp::TimelessGaussianKernelApproximator::getBasisFunctionsValues ( const double  x_input,
std::vector< Eigen::VectorXd > &  currentBasisFunctionsValues 
)
Parameters
x_input
currentBasisFunctionsValues
Returns
std::string dmp::TimelessGaussianKernelApproximator::getClassName ( )
inline
Returns
bool dmp::TimelessGaussianKernelApproximator::getCurrentPosition ( Eigen::VectorXd &  current_position)
std::string dmp::TimelessGaussianKernelApproximator::getInfoString ( )
bool dmp::TimelessGaussianKernelApproximator::getNumRFS ( const int  system_index,
int &  num_rfs 
)

Gets the number of receptive field used by the system with id system_index

Parameters
trans_id
num_rfs
Returns
bool dmp::TimelessGaussianKernelApproximator::getNumRFS ( std::vector< int > &  num_rfs)

Gets the number of receptive fields for each transformation system

Parameters
num_rfs
Returns
int dmp::TimelessGaussianKernelApproximator::getNumSystems ( ) const
inline
double dmp::TimelessGaussianKernelApproximator::getProgress ( ) const

Returns the current progress based on the time and the duration Start value is 0 and final value is 1

Returns
progress
bool dmp::TimelessGaussianKernelApproximator::getThetas ( std::vector< Eigen::VectorXd > &  thetas)

Gets the parameters of each system

Parameters
thetas
Returns
bool dmp::TimelessGaussianKernelApproximator::getWidthsAndCenters ( std::vector< Eigen::VectorXd > &  widths,
std::vector< Eigen::VectorXd > &  centers 
)

Gets the widths and centers of each system

Parameters
widths,centers
Returns
bool dmp::TimelessGaussianKernelApproximator::getWidthsAndCenters ( const int  system_index,
Eigen::VectorXd &  widths,
Eigen::VectorXd &  centers 
)
Parameters
widths
centers
Returns
bool dmp::TimelessGaussianKernelApproximator::initialize ( int  numSystems,
const Eigen::VectorXd  num_rfs,
const double  activation,
const double  duration,
const double  sampling_frequency 
)
void dmp::TimelessGaussianKernelApproximator::initialize ( )
private
bool dmp::TimelessGaussianKernelApproximator::integrate ( const double  dt_total,
const int  num_iteration 
)
private
bool dmp::TimelessGaussianKernelApproximator::isInitialized ( ) const
inline
bool dmp::TimelessGaussianKernelApproximator::isSetup ( ) const
bool dmp::TimelessGaussianKernelApproximator::learnFromThetas ( const std::vector< Eigen::VectorXd > &  thetas)
bool dmp::TimelessGaussianKernelApproximator::reset ( )
bool dmp::TimelessGaussianKernelApproximator::setThetas ( const std::vector< Eigen::VectorXd > &  thetas)

Sets the parameters of each transformation system

Parameters
thetas
Returns
bool dmp::TimelessGaussianKernelApproximator::update ( const double  progress)

Update the system by setting the progress

Parameters
progress
Returns
true if successful

Member Data Documentation

std::vector<Eigen::VectorXd> dmp::TimelessGaussianKernelApproximator::coordinates_
private
boost::ptr_vector<GaussianKernel> dmp::TimelessGaussianKernelApproximator::gaussianKernelModels_
private
bool dmp::TimelessGaussianKernelApproximator::initialized_
private
bool dmp::TimelessGaussianKernelApproximator::isLearned_
private
int dmp::TimelessGaussianKernelApproximator::numSystems_
private
double dmp::TimelessGaussianKernelApproximator::progress_
private

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