Loading...
Searching...
No Matches
cubic-interpolation.hh
Go to the documentation of this file.
1//
2// Copyright (C) 2012 LAAS-CNRS
3//
4// Author: Florent Lamiraux
5//
6
7#ifndef SOT_TOOLS_CUBIC_INTERPOLATION_HH
8#define SOT_TOOLS_CUBIC_INTERPOLATION_HH
9
10#include <dynamic-graph/entity.h>
11#include <dynamic-graph/linear-algebra.h>
12#include <dynamic-graph/signal-ptr.h>
13#include <dynamic-graph/signal-time-dependent.h>
14
15namespace dynamicgraph {
16namespace sot {
17namespace tools {
18class CubicInterpolation : public Entity {
19 DYNAMIC_GRAPH_ENTITY_DECL();
20
21 public:
22 virtual ~CubicInterpolation();
23 CubicInterpolation(const std::string& name);
25 void start(const double& duration);
27 void reset();
29 virtual std::string getDocString() const;
31 void setSamplingPeriod(const double& period);
32
33 protected:
34 virtual void doStart(const double& duration);
35 dynamicgraph::Signal<Vector, int> soutSOUT_;
36 dynamicgraph::Signal<Vector, int> soutdotSOUT_;
37 dynamicgraph::SignalPtr<Vector, int> initSIN_;
38 dynamicgraph::SignalPtr<Vector, int> goalSIN_;
39
40 Vector& computeSout(Vector& sout, const int& inTime);
41 Vector& computeSoutdot(Vector& sout, const int& inTime);
42
45 double duration_;
46 // 0: motion not started, 1: motion in progress, 2: motion finished
47 unsigned state_;
48
49 Vector p0_;
50 Vector p1_;
51 Vector p2_;
52 Vector p3_;
53}; // class CubicInterpolation
54} // namespace tools
55} // namespace sot
56} // namespace dynamicgraph
57
58#endif // SOT_TOOLS_CUBIC_INTERPOLATION_SE3_HH
Definition cubic-interpolation.hh:18
virtual std::string getDocString() const
Documentation.
Definition cubic-interpolation.cc:72
Vector p0_
Definition cubic-interpolation.hh:49
double samplingPeriod_
Definition cubic-interpolation.hh:44
virtual void doStart(const double &duration)
Definition cubic-interpolation.cc:135
double duration_
Definition cubic-interpolation.hh:45
dynamicgraph::Signal< Vector, int > soutSOUT_
Definition cubic-interpolation.hh:35
Vector p1_
Definition cubic-interpolation.hh:50
Vector p3_
Definition cubic-interpolation.hh:52
dynamicgraph::Signal< Vector, int > soutdotSOUT_
Definition cubic-interpolation.hh:36
Vector & computeSoutdot(Vector &sout, const int &inTime)
Definition cubic-interpolation.cc:107
unsigned state_
Definition cubic-interpolation.hh:47
dynamicgraph::SignalPtr< Vector, int > initSIN_
Definition cubic-interpolation.hh:37
void start(const double &duration)
Start tracking.
Definition cubic-interpolation.cc:133
dynamicgraph::SignalPtr< Vector, int > goalSIN_
Definition cubic-interpolation.hh:38
void setSamplingPeriod(const double &period)
Set sampling period of control discretization.
Definition cubic-interpolation.cc:129
CubicInterpolation(const std::string &name)
Definition cubic-interpolation.cc:18
Vector & computeSout(Vector &sout, const int &inTime)
Definition cubic-interpolation.cc:86
int startTime_
Definition cubic-interpolation.hh:43
void reset()
Reset state to 0 before starting a new motion.
Definition cubic-interpolation.cc:84
Vector p2_
Definition cubic-interpolation.hh:51
virtual ~CubicInterpolation()
Definition cubic-interpolation.cc:70
Definition cubic-interpolation-se3.hh:16