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 {
62  double amplitude;
63  double initAmplitude;
64  };
65 
66  std::size_t size;
67  std::vector<sotMotionParam> motionParams;
68 
69  void resize(const std::size_t &size);
70 
71  /* --- SIGNALS ------------------------------------------------------------ */
72  public:
74 
75  public:
76  MotionPeriod(const std::string &name);
77  virtual ~MotionPeriod(void) {}
78 
79  dynamicgraph::Vector &computeMotion(dynamicgraph::Vector &res,
80  const sigtime_t &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  */
dynamicgraph::sot::MotionPeriod::motionParams
std::vector< sotMotionParam > motionParams
Definition: motion-period.hh:67
dynamicgraph::sot::MotionPeriod::MotionPeriodType
MotionPeriodType
Definition: motion-period.hh:56
dynamicgraph
SOTMOTIONPERIOD_EXPORT
#define SOTMOTIONPERIOD_EXPORT
Definition: motion-period.hh:37
dynamicgraph::sot::MotionPeriod::getClassName
virtual const std::string & getClassName(void) const
Definition: motion-period.hh:53
dynamicgraph::Entity
dynamicgraph::sot::MotionPeriod::sotMotionParam
Definition: motion-period.hh:58
dynamicgraph::sot::MotionPeriod::CLASS_NAME
static const std::string CLASS_NAME
Definition: motion-period.hh:52
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::sot::MotionPeriod
Definition: motion-period.hh:50
dynamicgraph::sot::MotionPeriod::motionSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > motionSOUT
Definition: motion-period.hh:73
size
FCL_REAL size() const
dynamicgraph::sot::MotionPeriod::~MotionPeriod
virtual ~MotionPeriod(void)
Definition: motion-period.hh:77
all-signals.h
display
dynamicgraph::Vector
Eigen::VectorXd Vector
dynamicgraph::sot::MotionPeriod::sotMotionParam::initAmplitude
double initAmplitude
Definition: motion-period.hh:63
linear-algebra.h
dynamicgraph::sot::MotionPeriod::sotMotionParam::amplitude
double amplitude
Definition: motion-period.hh:62
exception-task.hh
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t >
dynamicgraph::sot::MotionPeriod::size
std::size_t size
Definition: motion-period.hh:66
dynamicgraph::sot::MotionPeriod::sotMotionParam::initPeriod
sigtime_t initPeriod
Definition: motion-period.hh:61
dynamicgraph::sot::MotionPeriod::sotMotionParam::motionType
MotionPeriodType motionType
Definition: motion-period.hh:59
dynamicgraph::sot::MotionPeriod::sotMotionParam::period
sigtime_t period
Definition: motion-period.hh:60
compile.name
name
Definition: compile.py:23


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31