sot-core
4.11.8
Hierarchical task solver plug-in for dynamic-graph.
|
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. More... | |
void | featureRegistration (void) |
Register the feature in the stack of tasks. More... | |
void | initCommands (void) |
FeatureAbstract (const std::string &name) | |
Default constructor: the name of the class should be given. More... | |
virtual | ~FeatureAbstract (void) |
Default destructor. More... | |
Methods returning the dimension of the feature. | |
virtual unsigned int & | getDimension (unsigned int &res, int time)=0 |
Verbose method. More... | |
unsigned int | getDimension (int time) |
Short method. More... | |
unsigned int | getDimension (void) const |
Shortest method. More... | |
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 dynamicgraph::Vector & | computeError (dynamicgraph::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. More... | |
virtual dynamicgraph::Matrix & | computeJacobian (dynamicgraph::Matrix &res, int time)=0 |
Compute the Jacobian of the error according the robot state. More... | |
virtual dynamicgraph::Vector & | computeErrorDot (dynamicgraph::Vector &res, int time) |
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 \( [ 0 1 0] \). More... | |
SignalPtr< dynamicgraph::Vector, int > | errordotSIN |
Derivative of the reference value. More... | |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Store the name of the class. More... | |
Output signals: | |
SignalTimeDependent< dynamicgraph::Vector, int > | errorSOUT |
This signal returns the error between the desired value and the current value : \( E(t) = {\bf s}(t) - {\bf s}^*(t)\). More... | |
SignalTimeDependent< dynamicgraph::Vector, int > | errordotSOUT |
Derivative of the error with respect to time: \( \frac{\partial e}{\partial t} = - \frac{d{\bf s}^*}{dt} \). More... | |
SignalTimeDependent< dynamicgraph::Matrix, int > | jacobianSOUT |
Jacobian of the error wrt the robot state: \( J = \frac{\partial {\bf s}}{\partial {\bf q}}\). More... | |
SignalTimeDependent< unsigned int, int > | dimensionSOUT |
Returns the dimension of the feature as an output signal. More... | |
virtual std::ostream & | writeGraph (std::ostream &os) const |
This method write a graph description on the file named FileName. More... | |
virtual SignalTimeDependent< dynamicgraph::Vector, int > & | getErrorDot () |
This class gives the abstract definition of a feature.
A feature computes:
The task is in general computed from the value of the feature at the current instant \(E(t) = e({\bf q},t)\). The derivative of \( E \) is:
\[ \frac{dE}{dt} = J({\bf q}) \dot{q} + \frac{\partial e}{\partial t} \]
FeatureAbstract. Each feature has a reference of the same type and compute an error by comparing errorSIN signals from itself and from the reference."
dynamicgraph::sot::FeatureAbstract::FeatureAbstract | ( | const std::string & | name | ) |
Default constructor: the name of the class should be given.
|
inlinevirtual |
Default destructor.
|
pure virtual |
|
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::FeaturePosture, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePose< representation >, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureGeneric, and dynamicgraph::sot::Feature1D.
|
virtual |
Callback for signal errordotSOUT
Copy components of the input signal errordotSIN defined by selection flag selectionSIN.
Reimplemented in dynamicgraph::sot::FeaturePosture, dynamicgraph::sot::FeaturePose< representation >, and dynamicgraph::sot::FeaturePoint6dRelative.
|
pure virtual |
Compute the Jacobian of the error according the robot state.
Implemented in dynamicgraph::sot::FeaturePosture, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePose< representation >, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureGeneric, and dynamicgraph::sot::Feature1D.
void dynamicgraph::sot::FeatureAbstract::featureRegistration | ( | void | ) |
Register the feature in the stack of tasks.
|
inlinevirtual |
Returns the name class.
Reimplemented in dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeatureTask, dynamicgraph::sot::FeaturePose< representation >, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeaturePoint6dRelative, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureGeneric, and dynamicgraph::sot::Feature1D.
|
inline |
Short method.
|
pure virtual |
Verbose method.
Implemented in dynamicgraph::sot::FeaturePosture, dynamicgraph::sot::FeatureVisualPoint, dynamicgraph::sot::FeatureVector3, dynamicgraph::sot::FeaturePose< representation >, dynamicgraph::sot::FeaturePoint6d, dynamicgraph::sot::FeatureLineDistance, dynamicgraph::sot::FeatureJointLimits, dynamicgraph::sot::FeatureGeneric, and dynamicgraph::sot::Feature1D.
|
inline |
Shortest method.
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
std::string dynamicgraph::sot::FeatureAbstract::getReferenceByName | ( | void | ) | const |
void dynamicgraph::sot::FeatureAbstract::initCommands | ( | void | ) |
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
void dynamicgraph::sot::FeatureAbstract::setReferenceByName | ( | const std::string & | name | ) |
|
inlinevirtual |
|
virtual |
This method write a graph description on the file named FileName.
|
static |
Store the name of the class.
SignalTimeDependent<unsigned int, int> dynamicgraph::sot::FeatureAbstract::dimensionSOUT |
Returns the dimension of the feature as an output signal.
SignalPtr<dynamicgraph::Vector, int> dynamicgraph::sot::FeatureAbstract::errordotSIN |
Derivative of the reference value.
SignalTimeDependent<dynamicgraph::Vector, int> dynamicgraph::sot::FeatureAbstract::errordotSOUT |
Derivative of the error with respect to time: \( \frac{\partial e}{\partial t} = - \frac{d{\bf s}^*}{dt} \).
SignalTimeDependent<dynamicgraph::Vector, int> dynamicgraph::sot::FeatureAbstract::errorSOUT |
This signal returns the error between the desired value and the current value : \( E(t) = {\bf s}(t) - {\bf s}^*(t)\).
SignalTimeDependent<dynamicgraph::Matrix, int> dynamicgraph::sot::FeatureAbstract::jacobianSOUT |
Jacobian of the error wrt the robot state: \( J = \frac{\partial {\bf s}}{\partial {\bf q}}\).
SignalPtr<Flags, int> dynamicgraph::sot::FeatureAbstract::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 \( [ 0 1 0] \).