Go to the documentation of this file.
10 #ifndef __SOT_FEATURE_ABSTRACT_H__
11 #define __SOT_FEATURE_ABSTRACT_H__
22 #include <dynamic-graph/entity.h>
82 virtual const std::string &
getClassName(
void)
const {
return CLASS_NAME; }
85 void featureRegistration(
void);
87 void initCommands(
void);
113 getDimension(
res, time);
122 return dimensionSOUT.accessCopy();
200 virtual std::ostream &
writeGraph(std::ostream &os)
const;
219 virtual void addDependenciesFromReference(
void) = 0;
220 virtual void removeDependenciesFromReference(
void) = 0;
223 void setReferenceByName(
const std::string &
name);
224 std::string getReferenceByName(
void)
const;
228 template <
class FeatureSpecialized>
244 template <
class FeatureSpecialized>
247 ptr =
dynamic_cast<FeatureSpecialized *
>(sdes);
251 #define DECLARE_REFERENCE_FUNCTIONS(FeatureSpecialized) \
252 typedef FeatureReferenceHelper<FeatureSpecialized> SP; \
253 virtual void setReference(FeatureAbstract *sdes) { \
254 if (sdes == NULL) { \
256 if (SP::isReferenceSet()) removeDependenciesFromReference(); \
257 SP::unsetReference(); \
260 SP::setReference(sdes); \
261 if (SP::isReferenceSet()) addDependenciesFromReference(); \
264 virtual const FeatureAbstract *getReferenceAbstract(void) const { \
265 return SP::getReference(); \
267 virtual FeatureAbstract *getReferenceAbstract(void) { \
268 return (FeatureAbstract *)SP::getReference(); \
270 bool isReferenceSet(void) const { return SP::isReferenceSet(); } \
271 virtual void addDependenciesFromReference(void); \
272 virtual void removeDependenciesFromReference(void)
275 #define DECLARE_NO_REFERENCE \
276 virtual void setReference(FeatureAbstract *) {} \
277 virtual const FeatureAbstract *getReferenceAbstract(void) const { \
280 virtual FeatureAbstract *getReferenceAbstract(void) { return NULL; } \
281 virtual void addDependenciesFromReference(void) {} \
282 virtual void removeDependenciesFromReference(void) {} \
289 #endif // #ifndef __SOT_FEATURE_ABSTRACT_H__
virtual ~FeatureAbstract(void)
Default destructor.
SignalTimeDependent< dynamicgraph::Vector, sigtime_t > errorSOUT
This signal returns the error between the desired value and the current value : .
FeatureSpecialized * getReference(void)
virtual const std::string & getClassName(void) const
Returns the name class.
SignalPtr< Flags, sigtime_t > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
SignalTimeDependent< dynamicgraph::Matrix, sigtime_t > jacobianSOUT
Jacobian of the error wrt the robot state: .
virtual void unsetReference(void)
This class gives the abstract definition of a feature.
void setReference(FeatureAbstract *sdes)
FeatureReferenceHelper(void)
SignalTimeDependent< dynamicgraph::Vector, sigtime_t > errordotSOUT
Derivative of the error with respect to time: .
static const std::string CLASS_NAME
Store the name of the class.
void unsetReference(void)
const FeatureSpecialized * getReference(void) const
size_type getDimension(sigtime_t time)
Short method.
size_type getDimension(void) const
Shortest method.
virtual SignalTimeDependent< dynamicgraph::Vector, sigtime_t > & getErrorDot()
SignalTimeDependent< size_type, sigtime_t > dimensionSOUT
Returns the dimension of the feature as an output signal.
SignalPtr< dynamicgraph::Vector, sigtime_t > errordotSIN
Derivative of the reference value.
virtual bool isReferenceSet(void) const
void writeGraph(const char *filename)
bool isReferenceSet(void) const
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31