Class that defines a generic implementation of the abstract interface for features. More...
#include <sot/core/feature-generic.hh>
Public Member Functions | |
virtual const std::string & | getClassName (void) const |
virtual void | display (std::ostream &os) const |
Display the information related to this generic implementation. | |
void | commandLine (const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os) |
Output signals | |
FeatureGeneric (const std::string &name) | |
Default constructor. | |
virtual | ~FeatureGeneric (void) |
Default destructor. | |
virtual unsigned int & | getDimension (unsigned int &dim, int time) |
Get the dimension of the feature. | |
Methods to trigger computation related to this feature. | |
virtual ml::Vector & | computeError (ml::Vector &res, int time) |
Compute the error between the desired value and the value itself. | |
virtual ml::Matrix & | computeJacobian (ml::Matrix &res, int time) |
Compute the Jacobian of the value according to the robot state.. | |
Dealing with the reference value to be reach with this feature. | |
DECLARE_REFERENCE_FUNCTIONS (FeatureGeneric) | |
Public Attributes | |
Input signals | |
dg::SignalPtr< ml::Vector, int > | errorSIN |
Input for the error. | |
dg::SignalPtr< ml::Matrix, int > | jacobianSIN |
Input for the Jacobian. | |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Protected Attributes | |
unsigned int | dimensionDefault |
Class that defines a generic implementation of the abstract interface for features.
This class is very useful if the feature can be easily computed using the basic operator provided. For instance a free space controller on a end-effector is basically directly computed from the Jacobian provided by dyn and some appropriate addition and soustraction. Instead of building a specific feature for this, it is possible to use the signals and plug the computed error, Jacobian and activation to the input of this generic feature implementation.
dynamicgraph::sot::FeatureGeneric::FeatureGeneric | ( | const std::string & | name | ) |
Default constructor.
virtual dynamicgraph::sot::FeatureGeneric::~FeatureGeneric | ( | void | ) | [inline, virtual] |
Default destructor.
void dynamicgraph::sot::FeatureGeneric::commandLine | ( | const std::string & | cmdLine, |
std::istringstream & | cmdArgs, | ||
std::ostream & | os | ||
) | [virtual] |
Reimplemented from dynamicgraph::Entity.
Reimplemented in dynamicgraph::sot::FeatureTask.
virtual ml::Vector& dynamicgraph::sot::FeatureGeneric::computeError | ( | ml::Vector & | res, |
int | time | ||
) | [virtual] |
Compute the error between the desired value and the value itself.
Implements dynamicgraph::sot::FeatureAbstract.
virtual ml::Matrix& dynamicgraph::sot::FeatureGeneric::computeJacobian | ( | ml::Matrix & | res, |
int | time | ||
) | [virtual] |
Compute the Jacobian of the value according to the robot state..
Implements dynamicgraph::sot::FeatureAbstract.
virtual void dynamicgraph::sot::FeatureGeneric::display | ( | std::ostream & | os | ) | const [virtual] |
Display the information related to this generic implementation.
Reimplemented from dynamicgraph::Entity.
Reimplemented in dynamicgraph::sot::FeatureTask.
virtual const std::string& dynamicgraph::sot::FeatureGeneric::getClassName | ( | void | ) | const [inline, virtual] |
Returns the name of the class.
Reimplemented from dynamicgraph::sot::FeatureAbstract.
Reimplemented in dynamicgraph::sot::FeatureTask.
virtual unsigned int& dynamicgraph::sot::FeatureGeneric::getDimension | ( | unsigned int & | dim, |
int | time | ||
) | [virtual] |
Get the dimension of the feature.
Implements dynamicgraph::sot::FeatureAbstract.
const std::string dynamicgraph::sot::FeatureGeneric::CLASS_NAME [static] |
Field storing the class name.
Reimplemented from dynamicgraph::sot::FeatureAbstract.
Reimplemented in dynamicgraph::sot::FeatureTask.
unsigned int dynamicgraph::sot::FeatureGeneric::dimensionDefault [protected] |
Input for the error.
Input for the Jacobian.