sot-core  4.11.2
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 
50 public:
51  static const std::string CLASS_NAME;
52  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
53 
54 protected:
55  double threshold;
56  const static double THRESHOLD_DEFAULT; // = .9;
57 
58  /* unsigned int freeFloatingIndex,freeFloatingSize; */
59  /* static const unsigned int FREE_FLOATING_INDEX = 0; */
60  /* static const unsigned int FREE_FLOATING_SIZE = 5; */
61 
62  /* --- SIGNALS ------------------------------------------------------------ */
63 public:
64  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> jointSIN;
65  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> upperJlSIN;
66  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> lowerJlSIN;
67  dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> widthJlSINTERN;
68 
70 
73 
80 public:
81  FeatureJointLimits(const std::string &name);
82  virtual ~FeatureJointLimits(void) {}
83 
84  virtual unsigned int &getDimension(unsigned int &dim, int time);
85 
86  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
87  int time);
88  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
89  int time);
90  dynamicgraph::Vector &computeWidthJl(dynamicgraph::Vector &res,
91  const int &time);
92 
94  inline static Flags selectActuated(void);
95 
96  virtual void display(std::ostream &os) const;
97 };
98 
99 } /* namespace sot */
100 } /* namespace dynamicgraph */
101 
102 #endif // #ifndef __SOT_FEATURE_JOINTLIMITS_HH__
103 
104 /*
105  * Local variables:
106  * c-basic-offset: 2
107  * End:
108  */
static const std::string CLASS_NAME
Definition: feature-joint-limits.hh:51
virtual const std::string & getClassName(void) const
Returns the name class.
Definition: feature-joint-limits.hh:52
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > widthJlSINTERN
Definition: feature-joint-limits.hh:67
virtual ~FeatureJointLimits(void)
Definition: feature-joint-limits.hh:82
SignalPtr< Flags, int > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
Definition: feature-abstract.hh:172
Definition: feature-abstract.hh:227
static const double THRESHOLD_DEFAULT
Definition: feature-joint-limits.hh:56
SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
Jacobian of the error wrt the robot state: .
Definition: feature-abstract.hh:192
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > lowerJlSIN
Definition: feature-joint-limits.hh:66
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > upperJlSIN
Definition: feature-joint-limits.hh:65
Definition: flags.hh:32
Class that defines gradient vector for jl avoidance.
Definition: feature-joint-limits.hh:46
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:75
double threshold
Definition: feature-joint-limits.hh:55
#define SOTFEATUREJOINTLIMITS_EXPORT
Definition: feature-joint-limits.hh:32
#define DECLARE_REFERENCE_FUNCTIONS(FeatureSpecialized)
Definition: feature-abstract.hh:249
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > jointSIN
Definition: feature-joint-limits.hh:64
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : . ...
Definition: feature-abstract.hh:184
Definition: abstract-sot-external-interface.hh:17