step-computer-pos.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  *
18  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
19 
20 #ifndef __SOT_StepComputer_FORCE_H__
21 #define __SOT_StepComputer_FORCE_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>
34 #include <sot/core/matrix-geometry.hh>
35 /* STD */
36 #include <deque>
37 #include <fstream>
38 #include <string>
39 
40 /* --------------------------------------------------------------------- */
41 /* --- API ------------------------------------------------------------- */
42 /* --------------------------------------------------------------------- */
43 
44 #if defined(WIN32)
45 #if defined(step_computer_pos_EXPORTS)
46 #define StepComputerFORCE_EXPORT __declspec(dllexport)
47 #else
48 #define StepComputerFORCE_EXPORT __declspec(dllimport)
49 #endif
50 #else
51 #define StepComputerFORCE_EXPORT
52 #endif
53 
54 namespace dynamicgraph {
55 namespace sot {
56 
57 /* --------------------------------------------------------------------- */
58 /* --- CLASS ----------------------------------------------------------- */
59 /* --------------------------------------------------------------------- */
60 
61 class StepQueue;
62 
65  public StepComputer {
66  public:
67  static const std::string CLASS_NAME;
68  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
69 
70  public: // Construction
71  StepComputerPos(const std::string &name);
72 
73  public: // Methods
74  void changeFirstStep(StepQueue &queue, int timeCurr);
75  void nextStep(StepQueue &queue, int timeCurr);
76 
77  public: // Signals
78  SignalPtr<MatrixHomogeneous, int> referencePositionLeftSIN;
79  SignalPtr<MatrixHomogeneous, int> referencePositionRightSIN;
80  SignalPtr<unsigned, int> contactFootSIN;
81 
82  public: // Entity
83  virtual void display(std::ostream &os) const;
84  virtual void commandLine(const std::string &cmdLine,
85  std::istringstream &cmdArgs, std::ostream &os);
86 
87  private: // Reference frame
88  MatrixHomogeneous rfMref0;
89  MatrixHomogeneous lfMref0;
90  StepObserver *twoHandObserver;
91  StepChecker checker;
92 
93  void thisIsZero();
94 
95  private: // Debug
96  std::ofstream logChanges;
97  std::ofstream logPreview;
98 };
99 
100 } // namespace sot
101 } // namespace dynamicgraph
102 
103 #endif // #ifndef __SOT_STEPCOMPUTER_H__
dynamicgraph::sot::StepComputerPos
Generates footsteps.
Definition: step-computer-pos.h:64
dynamicgraph
Definition: exception-pg.h:47
dynamicgraph::sot::StepComputerPos::referencePositionRightSIN
SignalPtr< MatrixHomogeneous, int > referencePositionRightSIN
Definition: step-computer-pos.h:79
dynamicgraph::sot::StepComputerPos::CLASS_NAME
static const std::string CLASS_NAME
Definition: step-computer-pos.h:67
step-checker.h
step-observer.h
dynamicgraph::sot::StepComputerPos::getClassName
virtual const std::string & getClassName(void) const
Definition: step-computer-pos.h:68
dynamicgraph::sot::StepComputerPos::contactFootSIN
SignalPtr< unsigned, int > contactFootSIN
Definition: step-computer-pos.h:80
dynamicgraph::sot::StepComputer
Generates footsteps.
Definition: step-computer.h:52
StepComputerFORCE_EXPORT
#define StepComputerFORCE_EXPORT
Definition: step-computer-pos.h:51
dynamicgraph::sot::StepChecker
Definition: step-checker.h:41
step-computer.h
dynamicgraph::sot::StepQueue
A step queue in the preview window.
Definition: step-queue.h:77
dynamicgraph::sot::StepObserver
Definition: step-observer.h:58
dynamicgraph::sot::StepComputerPos::referencePositionLeftSIN
SignalPtr< MatrixHomogeneous, int > referencePositionLeftSIN
Definition: step-computer-pos.h:78