sot-core  4.11.8
Hierarchical task solver plug-in for dynamic-graph.
feature-joint-limits.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_FEATURE_JOINTLIMITS_HH__
11 #define __SOT_FEATURE_JOINTLIMITS_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
20 
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24 
25 #if defined(WIN32)
26 #if defined(feature_joint_limits_EXPORTS)
27 #define SOTFEATUREJOINTLIMITS_EXPORT __declspec(dllexport)
28 #else
29 #define SOTFEATUREJOINTLIMITS_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTFEATUREJOINTLIMITS_EXPORT
33 #endif
34 
35 /* --------------------------------------------------------------------- */
36 /* --- CLASS ----------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38 
39 namespace dynamicgraph {
40 namespace sot {
41 
47  : public FeatureAbstract,
48  FeatureReferenceHelper<FeatureJointLimits> {
49  public:
50  static const std::string CLASS_NAME;
51  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
52 
53  protected:
54  double threshold;
55  const static double THRESHOLD_DEFAULT; // = .9;
56 
57  /* unsigned int freeFloatingIndex,freeFloatingSize; */
58  /* static const unsigned int FREE_FLOATING_INDEX = 0; */
59  /* static const unsigned int FREE_FLOATING_SIZE = 5; */
60 
61  /* --- SIGNALS ------------------------------------------------------------ */
62  public:
63  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> jointSIN;
64  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> upperJlSIN;
65  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> lowerJlSIN;
66  dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> widthJlSINTERN;
67 
69 
72 
79  public:
80  FeatureJointLimits(const std::string &name);
81  virtual ~FeatureJointLimits(void) {}
82 
83  virtual unsigned int &getDimension(unsigned int &dim, int time);
84 
85  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
86  int time);
87  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
88  int time);
89  dynamicgraph::Vector &computeWidthJl(dynamicgraph::Vector &res,
90  const int &time);
91 
93  inline static Flags selectActuated(void);
94 
95  virtual void display(std::ostream &os) const;
96 };
97 
98 } /* namespace sot */
99 } /* namespace dynamicgraph */
100 
101 #endif // #ifndef __SOT_FEATURE_JOINTLIMITS_HH__
102 
103 /*
104  * Local variables:
105  * c-basic-offset: 2
106  * End:
107  */
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:193
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : .
Definition: feature-abstract.hh:185
SignalPtr< Flags, int > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
Definition: feature-abstract.hh:173
Class that defines gradient vector for jl avoidance.
Definition: feature-joint-limits.hh:48
dynamicgraph::Vector & computeWidthJl(dynamicgraph::Vector &res, const int &time)
virtual dynamicgraph::Matrix & computeJacobian(dynamicgraph::Matrix &res, int time)
Compute the Jacobian of the error according the robot state.
static const double THRESHOLD_DEFAULT
Definition: feature-joint-limits.hh:55
virtual dynamicgraph::Vector & computeError(dynamicgraph::Vector &res, int time)
Compute the error between the desired feature and the current value of the feature measured or deduce...
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > lowerJlSIN
Definition: feature-joint-limits.hh:65
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > upperJlSIN
Definition: feature-joint-limits.hh:64
DECLARE_REFERENCE_FUNCTIONS(FeatureJointLimits)
virtual unsigned int & getDimension(unsigned int &dim, int time)
Verbose method.
virtual const std::string & getClassName(void) const
Returns the name class.
Definition: feature-joint-limits.hh:51
double threshold
Definition: feature-joint-limits.hh:54
virtual void display(std::ostream &os) const
FeatureJointLimits(const std::string &name)
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > widthJlSINTERN
Definition: feature-joint-limits.hh:66
virtual ~FeatureJointLimits(void)
Definition: feature-joint-limits.hh:81
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > jointSIN
Definition: feature-joint-limits.hh:63
static const std::string CLASS_NAME
Definition: feature-joint-limits.hh:50
Definition: feature-abstract.hh:229
Definition: flags.hh:33
#define SOTFEATUREJOINTLIMITS_EXPORT
Definition: feature-joint-limits.hh:32
Definition: abstract-sot-external-interface.hh:17