motion-period.hh
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_JOINTLIMITS_HH__
11 #define __SOT_JOINTLIMITS_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
19 
20 /* SOT */
22 #include <dynamic-graph/entity.h>
23 
25 
26 /* --------------------------------------------------------------------- */
27 /* --- API ------------------------------------------------------------- */
28 /* --------------------------------------------------------------------- */
29 
30 #if defined(WIN32)
31 #if defined(motion_period_EXPORTS)
32 #define SOTMOTIONPERIOD_EXPORT __declspec(dllexport)
33 #else
34 #define SOTMOTIONPERIOD_EXPORT __declspec(dllimport)
35 #endif
36 #else
37 #define SOTMOTIONPERIOD_EXPORT
38 #endif
39 
40 /* --------------------------------------------------------------------- */
41 /* --- CLASS ----------------------------------------------------------- */
42 /* --------------------------------------------------------------------- */
43 
47 namespace dynamicgraph {
48 namespace sot {
49 
51  public:
52  static const std::string CLASS_NAME;
53  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
54 
55  protected:
56  enum MotionPeriodType { MOTION_CONSTANT, MOTION_SIN, MOTION_COS };
57 
58  struct sotMotionParam {
60  unsigned int period;
61  unsigned int initPeriod;
62  double amplitude;
63  double initAmplitude;
64  };
65 
66  unsigned int size;
67  std::vector<sotMotionParam> motionParams;
68 
69  void resize(const unsigned int &size);
70 
71  /* --- SIGNALS ------------------------------------------------------------ */
72  public:
74 
75  public:
76  MotionPeriod(const std::string &name);
77  virtual ~MotionPeriod(void) {}
78 
80  const int &time);
81 
82  virtual void display(std::ostream &os) const;
83 };
84 
85 } /* namespace sot */
86 } /* namespace dynamicgraph */
87 
88 #endif // #ifndef __SOT_JOINTLIMITS_HH__
89 
90 /*
91  * Local variables:
92  * c-basic-offset: 2
93  * End:
94  */
Eigen::VectorXd Vector
virtual const std::string & getClassName(void) const
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > motionSOUT
static const std::string CLASS_NAME
#define SOTMOTIONPERIOD_EXPORT
res
std::vector< sotMotionParam > motionParams


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26