sot-core  4.11.2
Hierarchical task solver plug-in for dynamic-graph.
feature-posture.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * Florent Lamiraux
4  * Thomas Moulard,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef SOT_CORE_FEATURE_POSTURE_HH
11 #define SOT_CORE_FEATURE_POSTURE_HH
12 
13 #include "sot/core/api.hh"
15 #include <dynamic-graph/signal-ptr.h>
16 #include <dynamic-graph/signal-time-dependent.h>
17 #include <dynamic-graph/value.h>
18 /* --------------------------------------------------------------------- */
19 /* --- API ------------------------------------------------------------- */
20 /* --------------------------------------------------------------------- */
21 
22 #if defined(WIN32)
23 #if defined(feature_posture_EXPORTS)
24 #define SOTFEATUREPOSTURE_EXPORT __declspec(dllexport)
25 #else
26 #define SOTFEATUREPOSTURE_EXPORT __declspec(dllimport)
27 #endif
28 #else
29 #define SOTFEATUREPOSTURE_EXPORT
30 #endif
31 
32 namespace dynamicgraph {
33 namespace sot {
34 using command::Command;
35 using command::Value;
36 
49  class SelectDof;
50  friend class SelectDof;
51 
52  DYNAMIC_GRAPH_ENTITY_DECL();
53 
54 public:
55  typedef dynamicgraph::SignalPtr<dynamicgraph::Vector, int> signalIn_t;
56  typedef dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int>
58 
60 
61  explicit FeaturePosture(const std::string &name);
62  virtual ~FeaturePosture();
63  virtual unsigned int &getDimension(unsigned int &res, int);
64  void selectDof(unsigned dofId, bool control);
65 
66 protected:
67  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, int);
68  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, int);
69  virtual dynamicgraph::Vector &computeErrorDot(dynamicgraph::Vector &res,
70  int time);
71 
72  signalIn_t state_;
73  signalIn_t posture_;
74  signalIn_t postureDot_;
76 
77 private:
78  std::vector<bool> activeDofs_;
79  std::size_t nbActiveDofs_;
80 }; // class FeaturePosture
81 } // namespace sot
82 } // namespace dynamicgraph
83 
84 #endif // SOT_CORE_FEATURE_POSTURE_HH
Definition: feature-posture.hh:48
signalOut_t error_
Definition: feature-posture.hh:75
signalIn_t posture_
Definition: feature-posture.hh:73
signalIn_t state_
Definition: feature-posture.hh:72
signalIn_t postureDot_
Definition: feature-posture.hh:74
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > signalIn_t
Definition: feature-posture.hh:55
#define SOTFEATUREPOSTURE_EXPORT
Definition: feature-posture.hh:29
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > signalOut_t
Definition: feature-posture.hh:57
DECLARE_NO_REFERENCE
Definition: feature-posture.hh:59
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:75
Definition: abstract-sot-external-interface.hh:17