dg_tools
power_jump.hpp
Go to the documentation of this file.
1 
11 #ifndef __SOT__power_jump_control_HH__
12 #define __SOT__power_jump_control_HH__
13 
14 /* Matrix */
15 #include <dynamic-graph/linear-algebra.h>
16 namespace dg = dynamicgraph;
17 
18 /* SOT */
19 #include <dynamic-graph/signal-time-dependent.h>
20 #include <dynamic-graph/signal-ptr.h>
21 #include <dynamic-graph/entity.h>
22 
23 namespace dynamicgraph{
24  namespace sot {
25 /* ---------------------------------------------------------------------------*/
26 /* ---- CLASS ----------------------------------------------------------------*/
27 /* ---------------------------------------------------------------------------*/
28 
30  : public Entity
31  {
32  public:
33 
34  PowerJumpControl (const std::string &name);
35 
36  public:
37 
38  static const double TIME_STEP_DEFAULT;
39  void init( const double& step){};
40 
41 
42  public: /* ----- ENTITY INHERITANCE -----*/
43 
44  static const std::string CLASS_NAME;
45  virtual const std::string& getClassName( void ) const {return CLASS_NAME;}
46 
47  public: /* ------ SIGNALS ---------*/
48 
49  SignalPtr<dg::Vector, int> leg_lengthSIN; //current leg_length for trigger
50  SignalPtr<dg::Vector, int> cnt_sensorSIN; // contact sensor value
51  SignalPtr<dg::Vector, int> leg_length_triggerSIN; //position for trigger
52  SignalPtr<dg::Vector, int> leg_length_airSIN; // desired position for landing
53  SignalPtr<dg::Vector, int> des_fffSIN;
54  SignalPtr<dg::Vector, int> des_weight_fffSIN;
55  SignalPtr<dg::Vector, int> kp_groundSIN;
56  SignalPtr<dg::Vector, int> kp_airSIN;
57 
58  // SignalPtr<dg::Vector, int> kdSIN;
59 
60  SignalTimeDependent<dg::Vector, int> return_des_posSOUT;
61  SignalTimeDependent<dg::Vector, int> return_des_forceSOUT;
62  SignalTimeDependent<dg::Vector, int> return_des_kpSOUT;
63 
64  protected:
65 
66  double TimeStep;
67  dg::Vector& return_des_pos( dg::Vector &des_pos, int t);
68  dg::Vector& return_des_force( dg::Vector &des_force, int t);
69  dg::Vector& return_des_kp( dg::Vector &des_kp, int t);
70 
71 
72  int pos_trigger_flag_;
73  int force_trigger_flag_;
74  int kp_trigger_flag_;
75 
76 
77  };
78  }
79 }
80 
81 #endif
Definition: power_jump.hpp:29
dg::Vector & return_des_kp(dg::Vector &des_kp, int t)
Definition: power_jump.cpp:140
dg::Vector & return_des_pos(dg::Vector &des_pos, int t)
Definition: power_jump.cpp:58
dg::Vector & return_des_force(dg::Vector &des_force, int t)
Definition: power_jump.cpp:97
Definition: ComImpedanceController.hpp:31