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

#include <GaussianKernelApproximator.hpp>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW GaussianKernelApproximator ()
 
 ~GaussianKernelApproximator ()
 
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 propagateStep (bool &movement_finished)
 
bool propagateStep (bool &movement_finished, const double sampling_duration, const int num_samples)
 
bool getCurrentPosition (Eigen::VectorXd &current_position)
 
int getNumSystems () const
 
double getProgress () 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 time_
 
double duration_
 
double deltaT_
 
int sampleIndex_
 
int numSystems_
 
std::vector< Eigen::VectorXd > coordinates_
 
boost::ptr_vector< GaussianKernelgaussianKernelModels_
 

Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW dmp::GaussianKernelApproximator::GaussianKernelApproximator ( )

constructor

dmp::GaussianKernelApproximator::~GaussianKernelApproximator ( )

destructor

Member Function Documentation

bool dmp::GaussianKernelApproximator::getBasisFunctions ( const int  num_time_steps,
std::vector< Eigen::MatrixXd > &  basis_functions 
)
Parameters
num_time_steps
basis_functions
Returns
bool dmp::GaussianKernelApproximator::getBasisFunctionsValues ( const double  x_input,
std::vector< Eigen::VectorXd > &  currentBasisFunctionsValues 
)
Parameters
x_input
currentBasisFunctionsValues
Returns
std::string dmp::GaussianKernelApproximator::getClassName ( )
inline
Returns
bool dmp::GaussianKernelApproximator::getCurrentPosition ( Eigen::VectorXd &  current_position)
std::string dmp::GaussianKernelApproximator::getInfoString ( )
bool dmp::GaussianKernelApproximator::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::GaussianKernelApproximator::getNumRFS ( std::vector< int > &  num_rfs)

Gets the number of receptive fields for each transformation system

Parameters
num_rfs
Returns
int dmp::GaussianKernelApproximator::getNumSystems ( ) const
inline
double dmp::GaussianKernelApproximator::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::GaussianKernelApproximator::getThetas ( std::vector< Eigen::VectorXd > &  thetas)

Gets the parameters of each system

Parameters
thetas
Returns
bool dmp::GaussianKernelApproximator::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::GaussianKernelApproximator::getWidthsAndCenters ( const int  system_index,
Eigen::VectorXd &  widths,
Eigen::VectorXd &  centers 
)
Parameters
widths
centers
Returns
bool dmp::GaussianKernelApproximator::initialize ( int  numSystems,
const Eigen::VectorXd  num_rfs,
const double  activation,
const double  duration,
const double  sampling_frequency 
)
void dmp::GaussianKernelApproximator::initialize ( )
private
bool dmp::GaussianKernelApproximator::integrate ( const double  dt_total,
const int  num_iteration 
)
private
bool dmp::GaussianKernelApproximator::isInitialized ( ) const
inline
bool dmp::GaussianKernelApproximator::isSetup ( ) const
bool dmp::GaussianKernelApproximator::learnFromThetas ( const std::vector< Eigen::VectorXd > &  thetas)
bool dmp::GaussianKernelApproximator::propagateStep ( bool &  movement_finished)
Parameters
desired_coordinates
finished
current_position
movement_duration
Returns
bool dmp::GaussianKernelApproximator::propagateStep ( bool &  movement_finished,
const double  sampling_duration,
const int  num_samples 
)
Parameters
desired_coordinates
movement_finished
sampling_duration
num_samples
Returns
bool dmp::GaussianKernelApproximator::reset ( )
bool dmp::GaussianKernelApproximator::setThetas ( const std::vector< Eigen::VectorXd > &  thetas)

Sets the parameters of each transformation system

Parameters
thetas
Returns

Member Data Documentation

std::vector<Eigen::VectorXd> dmp::GaussianKernelApproximator::coordinates_
private
double dmp::GaussianKernelApproximator::deltaT_
private
double dmp::GaussianKernelApproximator::duration_
private
boost::ptr_vector<GaussianKernel> dmp::GaussianKernelApproximator::gaussianKernelModels_
private
bool dmp::GaussianKernelApproximator::initialized_
private
bool dmp::GaussianKernelApproximator::isLearned_
private
int dmp::GaussianKernelApproximator::numSystems_
private
int dmp::GaussianKernelApproximator::sampleIndex_
private
double dmp::GaussianKernelApproximator::time_
private

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