waist-attitude-from-sensor.h
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_WAISTATTITUDEFROMSENSOR_H__
11 #define __SOT_WAISTATTITUDEFROMSENSOR_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 
20 /* SOT */
21 #include <dynamic-graph/entity.h>
22 #include <dynamic-graph/signal-ptr.h>
23 #include <dynamic-graph/signal-time-dependent.h>
24 #include <sot/core/matrix-geometry.hh>
25 
26 /* STD */
27 #include <string>
28 
29 /* --------------------------------------------------------------------- */
30 /* --- API ------------------------------------------------------------- */
31 /* --------------------------------------------------------------------- */
32 
33 #if defined(WIN32)
34 #if defined(waist_attitude_from_sensor_EXPORTS)
35 #define SOTWAISTATTITUDEFROMSENSOR_EXPORT __declspec(dllexport)
36 #else
37 #define SOTWAISTATTITUDEFROMSENSOR_EXPORT __declspec(dllimport)
38 #endif
39 #else
40 #define SOTWAISTATTITUDEFROMSENSOR_EXPORT
41 #endif
42 
43 namespace dynamicgraph {
44 namespace sot {
45 namespace dg = dynamicgraph;
46 
47 /* --------------------------------------------------------------------- */
48 /* --- CLASS ----------------------------------------------------------- */
49 /* --------------------------------------------------------------------- */
50 
52  public:
53  static const std::string CLASS_NAME;
54  virtual const std::string& getClassName(void) const { return CLASS_NAME; }
55 
56  public: /* --- CONSTRUCTION --- */
57  WaistAttitudeFromSensor(const std::string& name);
58  virtual ~WaistAttitudeFromSensor(void);
59 
60  public: /* --- SIGNAL --- */
61  VectorRollPitchYaw& computeAttitudeWaist(VectorRollPitchYaw& res, const int& time);
62 
63  dg::SignalPtr<MatrixRotation, int> attitudeSensorSIN;
64  dg::SignalPtr<MatrixHomogeneous, int> positionSensorSIN;
65  dg::SignalTimeDependent<VectorRollPitchYaw, int> attitudeWaistSOUT;
66 };
67 
69  public:
70  static const std::string CLASS_NAME;
71 
72  protected:
73  void fromSensor(const bool& inFromSensor) { fromSensor_ = inFromSensor; }
74  bool fromSensor() const { return fromSensor_; }
75 
76  private:
77  bool fromSensor_;
78 
79  public: /* --- CONSTRUCTION --- */
80  WaistPoseFromSensorAndContact(const std::string& name);
81  virtual ~WaistPoseFromSensorAndContact(void);
82 
83  public: /* --- SIGNAL --- */
84  dynamicgraph::Vector& computePositionWaist(dynamicgraph::Vector& res, const int& time);
85 
86  dg::SignalPtr<MatrixHomogeneous, int> positionContactSIN;
87  dg::SignalTimeDependent<dynamicgraph::Vector, int> positionWaistSOUT;
88 };
89 
90 } /* namespace sot */
91 } /* namespace dynamicgraph */
92 
93 #endif // #ifndef __SOT_WAISTATTITUDEFROMSENSOR_H__
virtual const std::string & getClassName(void) const
Definition: waist-attitude-from-sensor.h:54
Definition: waist-attitude-from-sensor.h:51
bool fromSensor() const
Definition: waist-attitude-from-sensor.h:74
Definition: waist-attitude-from-sensor.h:68
static const std::string CLASS_NAME
Definition: waist-attitude-from-sensor.h:70
dg::SignalPtr< MatrixHomogeneous, int > positionSensorSIN
Definition: waist-attitude-from-sensor.h:64
static const std::string CLASS_NAME
Definition: waist-attitude-from-sensor.h:53
void fromSensor(const bool &inFromSensor)
Definition: waist-attitude-from-sensor.h:73
dg::SignalTimeDependent< dynamicgraph::Vector, int > positionWaistSOUT
Definition: waist-attitude-from-sensor.h:87
dg::SignalPtr< MatrixHomogeneous, int > positionContactSIN
Definition: waist-attitude-from-sensor.h:86
#define SOTWAISTATTITUDEFROMSENSOR_EXPORT
Definition: waist-attitude-from-sensor.h:40
dg::SignalTimeDependent< VectorRollPitchYaw, int > attitudeWaistSOUT
Definition: waist-attitude-from-sensor.h:65
Definition: angle-estimator.h:42
dg::SignalPtr< MatrixRotation, int > attitudeSensorSIN
Definition: waist-attitude-from-sensor.h:63