EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TrajectoryGenerator.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_CONTROL_TRAJECTORYGENERATOR_HPP_
2 #define ORG_EEROS_CONTROL_TRAJECTORYGENERATOR_HPP_
3 
4 #include <array>
5 
6 namespace eeros {
7  namespace control {
8 
9  template<typename T, int N = 1>
11 
12  public:
14  for(auto& e : last) {
15  e = 0;
16  }
17  }
18 
19  virtual bool finished() = 0;
20 
21  virtual std::array<T, N> get(double dt) = 0;
22 
23  virtual bool push(std::array<T, N> start, std::array<T, N> end) = 0;
24 
25  virtual bool push(T end) {
26  std::array<T, N> e;
27  for(auto& i : e) i = 0;
28  e[0] = end;
29  return push(last, e);
30  }
31 
32  virtual bool push(std::array<T, N> end) {
33  return push(last, end);
34  }
35 
36  virtual bool push(T start, T end) {
37  std::array<T, N> s, e;
38  for(auto& i : e) i = 0; for(auto& i : s) i = 0;
39  s[0] = start; e[0] = end;
40  return push(s, e);
41  }
42 
43  virtual void reset(std::array<T, N> last) = 0;
44 
45  protected:
46  std::array<T, N> last;
47  };
48 
49  };
50 };
51 
52 #endif /* ORG_EEROS_CONTROL_TRAJECTORYGENERATOR_HPP_ */
53 
Definition: TrajectoryGenerator.hpp:10
std::array< T, N > last
Definition: TrajectoryGenerator.hpp:46
virtual bool push(T end)
Definition: TrajectoryGenerator.hpp:25
TrajectoryGenerator()
Definition: TrajectoryGenerator.hpp:13
virtual void reset(std::array< T, N > last)=0
virtual bool push(std::array< T, N > start, std::array< T, N > end)=0
int i
Definition: RingBufferTest.cpp:12
virtual bool push(T start, T end)
Definition: TrajectoryGenerator.hpp:36
virtual bool push(std::array< T, N > end)
Definition: TrajectoryGenerator.hpp:32