This class gives the abstract definition of a feature. More...
#include <sot/core/feature-abstract.hh>
Public Member Functions | |
virtual const std::string & | getClassName (void) const |
Returns the name class. | |
void | featureRegistration (void) |
Register the feature in the stack of tasks. | |
void | initCommands (void) |
FeatureAbstract (const std::string &name) | |
Default constructor: the name of the class should be given. | |
virtual | ~FeatureAbstract (void) |
Default destructor. | |
Methods returning the dimension of the feature. | |
virtual unsigned int & | getDimension (unsigned int &res, int time)=0 |
Verbose method. | |
unsigned int | getDimension (int time) |
Short method. | |
unsigned int | getDimension (void) const |
Shortest method. | |
Methods to control internal computation. | |
The main idea is that some feature may have a lower frequency than the internal control loop. In this case, the methods for computation are called only when needed. | |
virtual ml::Vector & | computeError (ml::Vector &res, int time)=0 |
Compute the error between the desired feature and the current value of the feature measured or deduced from the robot state. | |
virtual ml::Matrix & | computeJacobian (ml::Matrix &res, int time)=0 |
Compute the Jacobian of the error according the robot state. | |
virtual ml::Vector & | computeErrorDot (ml::Vector &res, int time) |
Callback for signal errordotSOUT. | |
Reference | |
virtual void | setReference (FeatureAbstract *sdes)=0 |
virtual void | unsetReference (void) |
virtual const FeatureAbstract * | getReferenceAbstract (void) const =0 |
virtual FeatureAbstract * | getReferenceAbstract (void)=0 |
virtual bool | isReferenceSet (void) const |
virtual void | addDependenciesFromReference (void)=0 |
virtual void | removeDependenciesFromReference (void)=0 |
void | setReferenceByName (const std::string &name) |
std::string | getReferenceByName (void) const |
Public Attributes | |
Input signals: | |
SignalPtr< Flags, int > | selectionSIN |
This vector specifies which dimension are used to perform the computation. For instance let us assume that the feature is a 3D point. If only the Y-axis should be used for computing error, activation and Jacobian, then the vector to specify is . | |
SignalPtr< ml::Vector, int > | errordotSIN |
Derivative of the reference value. | |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Store the name of the class. | |
Output signals: | |
SignalTimeDependent < ml::Vector, int > | errorSOUT |
This signal returns the error between the desired value and the current value : . | |
SignalTimeDependent < ml::Vector, int > | errordotSOUT |
Derivative of the reference value. | |
SignalTimeDependent < ml::Matrix, int > | jacobianSOUT |
This signal returns the Jacobian of the current value according to the robot state: . | |
SignalTimeDependent< unsigned int, int > | dimensionSOUT |
Returns the dimension of the feature as an output signal. | |
virtual std::ostream & | writeGraph (std::ostream &os) const |
This method write a graph description on the file named FileName. | |
virtual bool | withErrorDot (void) const SOT_CORE_DEPRECATED |
Return true for children that provide the errordot output signal. | |
virtual SignalTimeDependent < ml::Vector, int > & | getErrorDot () |
This class gives the abstract definition of a feature.
In short, a feature is a data evolving according to time. It is defined by a vector where is the time. By default a feature has a desired . is provided by another feature of the same type called reference. The feature is in charge of collecting its own current state. A feature is supposed to compute an error between its current state and the desired one: . A feature is supposed to compute a Jacobian according to the robot state vector .
The task is in general computed from the value of the feature at the current instant , the Jacobian and evolution of the feature with respect to time: .
dynamicgraph::sot::FeatureAbstract::FeatureAbstract | ( | const std::string & | name | ) |
Default constructor: the name of the class should be given.
virtual dynamicgraph::sot::FeatureAbstract::~FeatureAbstract | ( | void | ) | [inline, virtual] |
Default destructor.
virtual void dynamicgraph::sot::FeatureAbstract::addDependenciesFromReference | ( | void | ) | [pure virtual] |
virtual ml::Vector& dynamicgraph::sot::FeatureAbstract::computeError | ( | ml::Vector & | res, |
int | time | ||
) | [pure virtual] |
Compute the error between the desired feature and the current value of the feature measured or deduced from the robot state.
Implemented in dynamicgraph::sot::FeatureGeneric, dynamicgraph::sot::Feature1D, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePosture, and dynamicgraph::sot::FeaturePosture.
virtual ml::Vector& dynamicgraph::sot::FeatureAbstract::computeErrorDot | ( | ml::Vector & | res, |
int | time | ||
) | [virtual] |
Callback for signal errordotSOUT.
Copy components of the input signal errordotSIN defined by selection flag selectionSIN.
Reimplemented in dynamicgraph::sot::FeaturePoint6dRelative.
virtual ml::Matrix& dynamicgraph::sot::FeatureAbstract::computeJacobian | ( | ml::Matrix & | res, |
int | time | ||
) | [pure virtual] |
Compute the Jacobian of the error according the robot state.
Implemented in dynamicgraph::sot::FeatureGeneric, dynamicgraph::sot::Feature1D, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePosture, and dynamicgraph::sot::FeaturePosture.
void dynamicgraph::sot::FeatureAbstract::featureRegistration | ( | void | ) |
Register the feature in the stack of tasks.
virtual const std::string& dynamicgraph::sot::FeatureAbstract::getClassName | ( | void | ) | const [inline, virtual] |
Returns the name class.
Implements dynamicgraph::Entity.
Reimplemented in dynamicgraph::sot::FeatureGeneric, dynamicgraph::sot::Feature1D, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureTask, and dynamicgraph::sot::FeaturePosture.
virtual unsigned int& dynamicgraph::sot::FeatureAbstract::getDimension | ( | unsigned int & | res, |
int | time | ||
) | [pure virtual] |
Verbose method.
Implemented in dynamicgraph::sot::FeatureGeneric, dynamicgraph::sot::Feature1D, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePosture, and dynamicgraph::sot::FeaturePosture.
unsigned int dynamicgraph::sot::FeatureAbstract::getDimension | ( | int | time | ) | [inline] |
Short method.
References getDimension().
Referenced by getDimension().
unsigned int dynamicgraph::sot::FeatureAbstract::getDimension | ( | void | ) | const [inline] |
Shortest method.
virtual SignalTimeDependent<ml::Vector,int>& dynamicgraph::sot::FeatureAbstract::getErrorDot | ( | ) | [inline, virtual] |
virtual const FeatureAbstract* dynamicgraph::sot::FeatureAbstract::getReferenceAbstract | ( | void | ) | const [pure virtual] |
virtual FeatureAbstract* dynamicgraph::sot::FeatureAbstract::getReferenceAbstract | ( | void | ) | [pure virtual] |
std::string dynamicgraph::sot::FeatureAbstract::getReferenceByName | ( | void | ) | const |
void dynamicgraph::sot::FeatureAbstract::initCommands | ( | void | ) |
Reimplemented in dynamicgraph::sot::FeaturePoint6dRelative.
virtual bool dynamicgraph::sot::FeatureAbstract::isReferenceSet | ( | void | ) | const [inline, virtual] |
virtual void dynamicgraph::sot::FeatureAbstract::removeDependenciesFromReference | ( | void | ) | [pure virtual] |
virtual void dynamicgraph::sot::FeatureAbstract::setReference | ( | FeatureAbstract * | sdes | ) | [pure virtual] |
void dynamicgraph::sot::FeatureAbstract::setReferenceByName | ( | const std::string & | name | ) |
virtual void dynamicgraph::sot::FeatureAbstract::unsetReference | ( | void | ) | [inline, virtual] |
virtual bool dynamicgraph::sot::FeatureAbstract::withErrorDot | ( | void | ) | const [inline, virtual] |
Return true for children that provide the errordot output signal.
virtual std::ostream& dynamicgraph::sot::FeatureAbstract::writeGraph | ( | std::ostream & | os | ) | const [virtual] |
This method write a graph description on the file named FileName.
Reimplemented from dynamicgraph::Entity.
const std::string dynamicgraph::sot::FeatureAbstract::CLASS_NAME [static] |
Store the name of the class.
Reimplemented in dynamicgraph::sot::FeatureGeneric, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::Feature1D, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureTask, and dynamicgraph::sot::FeaturePosture.
SignalTimeDependent<unsigned int,int> dynamicgraph::sot::FeatureAbstract::dimensionSOUT |
Returns the dimension of the feature as an output signal.
Derivative of the reference value.
Derivative of the reference value.
This signal returns the error between the desired value and the current value : .
This signal returns the Jacobian of the current value according to the robot state: .
This vector specifies which dimension are used to perform the computation. For instance let us assume that the feature is a 3D point. If only the Y-axis should be used for computing error, activation and Jacobian, then the vector to specify is .