1 |
|
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 |
|
|
* Copyright Projet JRL-Japan, 2007 |
3 |
|
|
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
4 |
|
|
* |
5 |
|
|
* File: NextStep.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_NextStep_OHRP_H__ |
21 |
|
|
#define __SOT_NextStep_OHRP_H__ |
22 |
|
|
|
23 |
|
|
/* --------------------------------------------------------------------- */ |
24 |
|
|
/* --- INCLUDE --------------------------------------------------------- */ |
25 |
|
|
/* --------------------------------------------------------------------- */ |
26 |
|
|
|
27 |
|
|
/* SOT */ |
28 |
|
|
#include <sot/pattern-generator/next-step.h> |
29 |
|
|
#include <sot/pattern-generator/pg.h> |
30 |
|
|
|
31 |
|
|
/* STD */ |
32 |
|
|
#include <deque> |
33 |
|
|
#include <string> |
34 |
|
|
|
35 |
|
|
/* --------------------------------------------------------------------- */ |
36 |
|
|
/* --- API ------------------------------------------------------------- */ |
37 |
|
|
/* --------------------------------------------------------------------- */ |
38 |
|
|
|
39 |
|
|
#if defined(WIN32) |
40 |
|
|
#if defined(next_step_pg_sot_EXPORTS) |
41 |
|
|
#define NextStepPGSOT_EXPORT __declspec(dllexport) |
42 |
|
|
#else |
43 |
|
|
#define NextStepPGSOT_EXPORT __declspec(dllimport) |
44 |
|
|
#endif |
45 |
|
|
#else |
46 |
|
|
#define NextStepPGSOT_EXPORT |
47 |
|
|
#endif |
48 |
|
|
|
49 |
|
|
/* --------------------------------------------------------------------- */ |
50 |
|
|
/* --- CLASS ----------------------------------------------------------- */ |
51 |
|
|
/* --------------------------------------------------------------------- */ |
52 |
|
|
|
53 |
|
|
namespace dynamicgraph { |
54 |
|
|
namespace sot { |
55 |
|
|
|
56 |
|
|
class NextStepPGSOT_EXPORT NextStepPgSot : public NextStep { |
57 |
|
|
public: |
58 |
|
|
DYNAMIC_GRAPH_ENTITY_DECL(); |
59 |
|
|
static const unsigned int ADDING_STEP = 0; |
60 |
|
|
static const unsigned int CHANGING_STEP = 1; |
61 |
|
|
|
62 |
|
|
protected: |
63 |
|
|
typedef std::pair<unsigned int, PatternGeneratorJRL::FootAbsolutePosition> |
64 |
|
|
FootPrint_t; |
65 |
|
|
std::vector<FootPrint_t> stepbuf; |
66 |
|
|
|
67 |
|
|
Entity *pgEntity; |
68 |
|
|
unsigned int m_StepModificationMode; |
69 |
|
|
double m_NextStepTime; |
70 |
|
|
unsigned int m_NbOfFirstSteps; |
71 |
|
|
|
72 |
|
|
/*! \brief Pointer towards the interface of the pattern generator. */ |
73 |
|
|
pg::PatternGeneratorInterface *m_PGI; |
74 |
|
|
|
75 |
|
|
/*! \brief Pointer towards the entity |
76 |
|
|
which handle the pattern generator. */ |
77 |
|
|
PatternGenerator *m_sPG; |
78 |
|
|
|
79 |
|
|
public: /* --- CONSTRUCTION --- */ |
80 |
|
|
NextStepPgSot(const std::string &name); |
81 |
|
|
virtual ~NextStepPgSot(void) {} |
82 |
|
|
|
83 |
|
|
public: /* --- FUNCTIONS --- */ |
84 |
|
|
virtual void starter(const int &timeCurr); |
85 |
|
|
virtual void stoper(const int &timeCurr); |
86 |
|
|
virtual void introductionCallBack(const int &timeCurr); |
87 |
|
|
|
88 |
|
|
public: /* --- ENTITY INHERITANCE --- */ |
89 |
|
|
virtual void commandLine(const std::string &cmdLine, |
90 |
|
|
std::istringstream &cmdArgs, std::ostream &os); |
91 |
|
|
}; |
92 |
|
|
|
93 |
|
|
} // namespace sot |
94 |
|
|
} // namespace dynamicgraph |
95 |
|
|
|
96 |
|
|
#endif // #ifndef __SOT_NextStep_OHRP_H__ |