Loading...
Searching...
No Matches
which-foot-upper.h
Go to the documentation of this file.
1/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 * Copyright Projet JRL-Japan, 2007
3 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 *
5 * File: WhichFootUpper.h
6 * Project: SOT
7 * Author: Nicolas Mansard
8 *
9 * Version control
10 * ===============
11 *
12 * $Id$
13 *
14 * Description
15 * ============
16 *
17 *
18 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
19
20#ifndef __SOT_WhichFootUpper_H__
21#define __SOT_WhichFootUpper_H__
22
23/* --------------------------------------------------------------------- */
24/* --- INCLUDE --------------------------------------------------------- */
25/* --------------------------------------------------------------------- */
26
27/* SOT */
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/* STD */
35#include <string>
36
37/* --------------------------------------------------------------------- */
38/* --- API ------------------------------------------------------------- */
39/* --------------------------------------------------------------------- */
40
41#if defined(WIN32)
42#if defined(which_foot_upper_EXPORTS)
43#define WhichFootUpper_EXPORT __declspec(dllexport)
44#else
45#define WhichFootUpper_EXPORT __declspec(dllimport)
46#endif
47#else
48#define WhichFootUpper_EXPORT
49#endif
50
51namespace dynamicgraph {
52namespace sot {
53
54/* --------------------------------------------------------------------- */
55/* --- CLASS ----------------------------------------------------------- */
56/* --------------------------------------------------------------------- */
57
59 public:
61
62 protected:
63 static const unsigned int INDEX_LEFT_FOOT_DEFAULT;
64 static const unsigned int INDEX_RIGHT_FOOT_DEFAULT;
65 unsigned int indexLeftFoot, indexRightFoot;
66
67 static const double TRIGGER_THRESHOLD_DEFAULT;
69
70 unsigned int lastFoot;
71
72 public: /* --- CONSTRUCTION --- */
73 WhichFootUpper(const std::string &name);
74 virtual ~WhichFootUpper(void);
75
76 public: /* --- SIGNAL --- */
77 SignalPtr<MatrixRotation, int> waistRsensorSIN;
78 SignalPtr<MatrixRotation, int> worldRsensorSIN;
79 SignalPtr<MatrixHomogeneous, int> waistMlfootSIN;
80 SignalPtr<MatrixHomogeneous, int> waistMrfootSIN;
81
82 SignalTimeDependent<MatrixHomogeneous, int> worldMlfootSOUT;
83 SignalTimeDependent<MatrixHomogeneous, int> worldMrfootSOUT;
84 SignalTimeDependent<unsigned int, int> whichFootSOUT;
85
86 SignalPtr<MatrixHomogeneous, int> waistMsensorSIN;
87 SignalTimeDependent<MatrixRotation, int> waistRsensorSOUT;
88
89 public: /* --- FUNCTIONS --- */
90 static MatrixHomogeneous &computeFootPosition(
91 const MatrixHomogeneous &waistMfoot, const MatrixRotation &waistRsensor,
92 const MatrixRotation &worldRsensor, MatrixHomogeneous &res);
93
94 MatrixRotation &computeRotationMatrix(MatrixRotation &rotMat, int time);
95
96 unsigned int &whichFoot(const MatrixHomogeneous &waistMlfoot,
97 const MatrixHomogeneous &waistMrfoot,
98 unsigned int &res);
99
100 public: /* --- PARAMS --- */
101 virtual void commandLine(const std::string &cmdLine,
102 std::istringstream &cmdArgs, std::ostream &os);
103};
104
105} // namespace sot
106} // namespace dynamicgraph
107
108#endif // #ifndef __SOT_WhichFootUpper_H__
Definition: which-foot-upper.h:58
static const double TRIGGER_THRESHOLD_DEFAULT
Definition: which-foot-upper.h:67
SignalPtr< MatrixHomogeneous, int > waistMsensorSIN
Definition: which-foot-upper.h:86
unsigned int & whichFoot(const MatrixHomogeneous &waistMlfoot, const MatrixHomogeneous &waistMrfoot, unsigned int &res)
SignalPtr< MatrixRotation, int > waistRsensorSIN
Definition: which-foot-upper.h:77
SignalTimeDependent< MatrixHomogeneous, int > worldMlfootSOUT
Definition: which-foot-upper.h:82
SignalPtr< MatrixHomogeneous, int > waistMlfootSIN
Definition: which-foot-upper.h:79
static const unsigned int INDEX_RIGHT_FOOT_DEFAULT
Definition: which-foot-upper.h:64
WhichFootUpper(const std::string &name)
unsigned int lastFoot
Definition: which-foot-upper.h:70
MatrixRotation & computeRotationMatrix(MatrixRotation &rotMat, int time)
unsigned int indexLeftFoot
Definition: which-foot-upper.h:65
virtual void commandLine(const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os)
SignalPtr< MatrixHomogeneous, int > waistMrfootSIN
Definition: which-foot-upper.h:80
SignalTimeDependent< MatrixRotation, int > waistRsensorSOUT
Definition: which-foot-upper.h:87
double triggerThreshold
Definition: which-foot-upper.h:68
SignalTimeDependent< MatrixHomogeneous, int > worldMrfootSOUT
Definition: which-foot-upper.h:83
SignalTimeDependent< unsigned int, int > whichFootSOUT
Definition: which-foot-upper.h:84
static const unsigned int INDEX_LEFT_FOOT_DEFAULT
Definition: which-foot-upper.h:63
static MatrixHomogeneous & computeFootPosition(const MatrixHomogeneous &waistMfoot, const MatrixRotation &waistRsensor, const MatrixRotation &worldRsensor, MatrixHomogeneous &res)
SignalPtr< MatrixRotation, int > worldRsensorSIN
Definition: which-foot-upper.h:78
Definition: exception-pg.h:47
#define WhichFootUpper_EXPORT
Definition: which-foot-upper.h:48