sot-core  4.11.8
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 <dynamic-graph/signal-ptr.h>
14 #include <dynamic-graph/signal-time-dependent.h>
15 #include <dynamic-graph/value.h>
16 
17 #include "sot/core/api.hh"
19 /* --------------------------------------------------------------------- */
20 /* --- API ------------------------------------------------------------- */
21 /* --------------------------------------------------------------------- */
22 
23 #if defined(WIN32)
24 #if defined(feature_posture_EXPORTS)
25 #define SOTFEATUREPOSTURE_EXPORT __declspec(dllexport)
26 #else
27 #define SOTFEATUREPOSTURE_EXPORT __declspec(dllimport)
28 #endif
29 #else
30 #define SOTFEATUREPOSTURE_EXPORT
31 #endif
32 
33 namespace dynamicgraph {
34 namespace sot {
35 using command::Command;
36 using command::Value;
37 
50  class SelectDof;
51  friend class SelectDof;
52 
53  DYNAMIC_GRAPH_ENTITY_DECL();
54 
55  public:
56  typedef dynamicgraph::SignalPtr<dynamicgraph::Vector, int> signalIn_t;
57  typedef dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int>
59 
61 
62  explicit FeaturePosture(const std::string &name);
63  virtual ~FeaturePosture();
64  virtual unsigned int &getDimension(unsigned int &res, int);
65  void selectDof(unsigned dofId, bool control);
66 
67  protected:
68  virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, int);
69  virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, int);
70  virtual dynamicgraph::Vector &computeErrorDot(dynamicgraph::Vector &res,
71  int time);
72 
77 
78  private:
79  std::vector<bool> activeDofs_;
80  std::size_t nbActiveDofs_;
81 }; // class FeaturePosture
82 } // namespace sot
83 } // namespace dynamicgraph
84 
85 #endif // SOT_CORE_FEATURE_POSTURE_HH
dynamicgraph::sot::FeaturePosture::posture_
signalIn_t posture_
Definition: feature-posture.hh:74
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
feature-abstract.hh
dynamicgraph::sot::FeatureAbstract
This class gives the abstract definition of a feature.
Definition: feature-abstract.hh:76
SOTFEATUREPOSTURE_EXPORT
#define SOTFEATUREPOSTURE_EXPORT
Definition: feature-posture.hh:30
dynamicgraph::sot::FeaturePosture::signalOut_t
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > signalOut_t
Definition: feature-posture.hh:58
api.hh
dynamicgraph::sot::FeaturePosture
Definition: feature-posture.hh:49
dynamicgraph::sot::FeaturePosture::DECLARE_NO_REFERENCE
DECLARE_NO_REFERENCE
Definition: feature-posture.hh:60
dynamicgraph::sot::FeaturePosture::error_
signalOut_t error_
Definition: feature-posture.hh:76
dynamicgraph::sot::FeaturePosture::state_
signalIn_t state_
Definition: feature-posture.hh:73
dynamicgraph::sot::FeaturePosture::signalIn_t
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > signalIn_t
Definition: feature-posture.hh:56
dynamicgraph::sot::FeaturePosture::postureDot_
signalIn_t postureDot_
Definition: feature-posture.hh:75