sot-core  4.11.6
Hierarchical task solver plug-in for dynamic-graph.
task-conti.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_TASKCONTI_H__
11 #define __SOT_TASKCONTI_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 
20 /* STD */
21 #include <string>
22 
23 /* SOT */
25 #include <sot/core/flags.hh>
26 #include <sot/core/task.hh>
27 
29 
30 /* --------------------------------------------------------------------- */
31 /* --- API ------------------------------------------------------------- */
32 /* --------------------------------------------------------------------- */
33 
34 #if defined(WIN32)
35 #if defined(task_conti_EXPORTS)
36 #define SOTTASKCONTI_EXPORT __declspec(dllexport)
37 #else
38 #define SOTTASKCONTI_EXPORT __declspec(dllimport)
39 #endif
40 #else
41 #define SOTTASKCONTI_EXPORT
42 #endif
43 
44 /* --------------------------------------------------------------------- */
45 /* --- CLASS ----------------------------------------------------------- */
46 /* --------------------------------------------------------------------- */
47 
48 namespace dynamicgraph {
49 namespace sot {
50 
52 protected:
53  enum TimeRefValues { TIME_REF_UNSIGNIFICANT = -1, TIME_REF_TO_BE_SET = -2 };
54 
55  int timeRef;
56  double mu;
57  dynamicgraph::Vector q0;
58 
59 public:
60  static const std::string CLASS_NAME;
61  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
62 
63 public:
64  TaskConti(const std::string &n);
65 
66  void referenceTime(const unsigned int &t) { timeRef = t; }
67  const int &referenceTime(void) { return timeRef; }
68 
69  /* --- COMPUTATION --- */
70  VectorMultiBound &computeContiDesiredVelocity(VectorMultiBound &task,
71  const int &time);
72 
73  /* --- SIGNALS ------------------------------------------------------------ */
74 public:
75  dynamicgraph::SignalPtr<dynamicgraph::Vector, int> controlPrevSIN;
76 
77  /* --- DISPLAY ------------------------------------------------------------ */
78  void display(std::ostream &os) const;
79 };
80 
81 } /* namespace sot */
82 } /* namespace dynamicgraph */
83 
84 #endif /* #ifndef __SOT_TASKCONTI_H__ */
TimeRefValues
Definition: task-conti.hh:53
#define SOTTASKCONTI_EXPORT
Definition: task-conti.hh:41
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:69
double mu
Definition: task-conti.hh:56
virtual const std::string & getClassName(void) const
Definition: task-conti.hh:61
void referenceTime(const unsigned int &t)
Definition: task-conti.hh:66
dynamicgraph::Vector q0
Definition: task-conti.hh:57
int timeRef
Definition: task-conti.hh:55
static const std::string CLASS_NAME
Definition: task-conti.hh:60
Definition: task-conti.hh:51
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > controlPrevSIN
Definition: task-conti.hh:75
Class that defines the basic elements of a task.
Definition: task.hh:73
const int & referenceTime(void)
Definition: task-conti.hh:67
Definition: abstract-sot-external-interface.hh:17