Loading...
Searching...
No Matches
step-observer.h
Go to the documentation of this file.
1/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 * Copyright Projet JRL-Japan, 2007
3 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 *
5 * File: StepComputer.h
6 * Project: SOT
7 * Author: Paul Evrard, Nicolas Mansard
8 *
9 * Version control
10 * ===============
11 *
12 * $Id$
13 *
14 * Description
15 * ============
16 *
17 * Computes reference signals for the stepper.
18 *
19 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
20
21#ifndef __SOT_STEP_OBSERVER_H__
22#define __SOT_STEP_OBSERVER_H__
23
24/* --------------------------------------------------------------------- */
25/* --- INCLUDE --------------------------------------------------------- */
26/* --------------------------------------------------------------------- */
27
28#include <dynamic-graph/entity.h>
29#include <dynamic-graph/signal-ptr.h>
30#include <dynamic-graph/signal-time-dependent.h>
31
32#include <sot/core/matrix-geometry.hh>
33
34/* --------------------------------------------------------------------- */
35/* --- API ------------------------------------------------------------- */
36/* --------------------------------------------------------------------- */
37
38#if defined(WIN32)
39#if defined(step_observer_EXPORTS)
40#define StepObserver_EXPORT __declspec(dllexport)
41#else
42#define StepObserver_EXPORT __declspec(dllimport)
43#endif
44#else
45#define StepObserver_EXPORT
46#endif
47
48namespace dynamicgraph {
49namespace sot {
50
51/* --------------------------------------------------------------------- */
52/* --- CLASS ----------------------------------------------------------- */
53/* --------------------------------------------------------------------- */
54
59class StepObserver_EXPORT StepObserver : public Entity {
60 public:
61 static const std::string CLASS_NAME;
62 virtual const std::string &getClassName(void) const { return CLASS_NAME; }
63
64 public:
65 SignalPtr<MatrixHomogeneous, int> leftHandPositionSIN;
66 SignalPtr<MatrixHomogeneous, int> rightHandPositionSIN;
67
68 SignalPtr<MatrixHomogeneous, int> leftFootPositionSIN;
69 SignalPtr<MatrixHomogeneous, int> rightFootPositionSIN;
70 SignalPtr<MatrixHomogeneous, int> waistPositionSIN;
71
73 SignalTimeDependent<MatrixHomogeneous, int> referencePositionLeftSOUT;
74
76 SignalTimeDependent<MatrixHomogeneous, int> referencePositionRightSOUT;
77
79 SignalTimeDependent<MatrixHomogeneous, int> referencePositionWaistSOUT;
80
81 public: // methods
82 StepObserver(const std::string &name);
83
84 SignalArray<int> getSignals(void);
85 operator SignalArray<int>();
86
87 public: // signal callbacks
88 MatrixHomogeneous &computeReferencePositionLeft(MatrixHomogeneous &res,
89 int timeCurr);
90 MatrixHomogeneous &computeReferencePositionRight(MatrixHomogeneous &res,
91 int timeCurr);
92 MatrixHomogeneous &computeReferencePositionWaist(MatrixHomogeneous &res,
93 int timeCurr);
94
95 public: // Entity
96 virtual void display(std::ostream &os) const;
97 virtual void commandLine(const std::string &cmdLine,
98 std::istringstream &cmdArgs, std::ostream &os);
99
100 private: // helpers
101 MatrixHomogeneous &computeRefPos(MatrixHomogeneous &res, int timeCurr,
102 const MatrixHomogeneous &wMref);
103};
104
105} // namespace sot
106} // namespace dynamicgraph
107
108#endif
Definition step-observer.h:59
virtual void display(std::ostream &os) const
MatrixHomogeneous & computeReferencePositionWaist(MatrixHomogeneous &res, int timeCurr)
SignalTimeDependent< MatrixHomogeneous, int > referencePositionWaistSOUT
Reference frame in the waist coordinates.
Definition step-observer.h:79
SignalTimeDependent< MatrixHomogeneous, int > referencePositionLeftSOUT
Reference frame in left foot coordinates.
Definition step-observer.h:73
SignalTimeDependent< MatrixHomogeneous, int > referencePositionRightSOUT
Reference frame in right foot coordinates.
Definition step-observer.h:76
SignalPtr< MatrixHomogeneous, int > rightFootPositionSIN
Definition step-observer.h:69
MatrixHomogeneous & computeReferencePositionLeft(MatrixHomogeneous &res, int timeCurr)
SignalPtr< MatrixHomogeneous, int > leftHandPositionSIN
Definition step-observer.h:65
SignalPtr< MatrixHomogeneous, int > waistPositionSIN
Definition step-observer.h:70
static const std::string CLASS_NAME
Definition step-observer.h:61
SignalPtr< MatrixHomogeneous, int > rightHandPositionSIN
Definition step-observer.h:66
virtual void commandLine(const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os)
MatrixHomogeneous & computeReferencePositionRight(MatrixHomogeneous &res, int timeCurr)
StepObserver(const std::string &name)
virtual const std::string & getClassName(void) const
Definition step-observer.h:62
SignalArray< int > getSignals(void)
SignalPtr< MatrixHomogeneous, int > leftFootPositionSIN
Definition step-observer.h:68
Definition exception-pg.h:47
#define StepObserver_EXPORT
Definition step-observer.h:45