Curves
A library for curves generation.
Curve.hpp
Go to the documentation of this file.
1 /*
2  * Curve.hpp
3  *
4  * Created on: Mar 5, 2015
5  * Author: Paul Furgale, Abel Gawel, Renaud Dube, P├ęter Fankhauser
6  * Institute: ETH Zurich, Autonomous Systems Lab
7  */
8 
9 #pragma once
10 
11 namespace curves {
12 
13 typedef double Time;
14 typedef size_t Key;
15 
16 template<typename CurveConfig>
17 class Curve
18 {
19  public:
20 
23 
26 
27  Curve() { }
28  virtual ~Curve() { }
29 
33 
35  virtual void print(const std::string& str = "") const = 0;
36 
38  //size_t dim() const; // get this form the curve's value type
39 
41  virtual Time getMinTime() const = 0;
42 
44  virtual Time getMaxTime() const = 0;
46 
49 
51  virtual bool evaluate(ValueType& value, Time time) const = 0;
52 
53 // /// Evaluate the curve derivatives.
54  virtual bool evaluateDerivative(DerivativeType& derivative, Time time, unsigned derivativeOrder) const = 0;
55 
57 
60 
64  virtual void extend(const std::vector<Time>& times,
65  const std::vector<ValueType>& values,
66  std::vector<Key>* outKeys = NULL) = 0;
67 
72  virtual void fitCurve(const std::vector<Time>& times,
73  const std::vector<ValueType>& values,
74  std::vector<Key>* outKeys = NULL) = 0;
75 
77 
79  virtual void clear() = 0;
80 
82  virtual void transformCurve(const ValueType T) = 0;
83 };
84 
85 } // namespace
virtual bool evaluate(ValueType &value, Time time) const =0
Evaluate the ambient space of the curve.
SE3Curve::DerivativeType DerivativeType
virtual ~Curve()
Definition: Curve.hpp:28
CurveConfig::DerivativeType DerivativeType
The curve&#39;s derivative type.
Definition: Curve.hpp:25
virtual void fitCurve(const std::vector< Time > &times, const std::vector< ValueType > &values, std::vector< Key > *outKeys=NULL)=0
Fit a new curve to these data points.
virtual void extend(const std::vector< Time > &times, const std::vector< ValueType > &values, std::vector< Key > *outKeys=NULL)=0
SE3Curve::ValueType ValueType
virtual Time getMinTime() const =0
The dimension of the underlying manifold.
virtual void print(const std::string &str="") const =0
Print the value of the coefficient, for debugging and unit tests.
virtual bool evaluateDerivative(DerivativeType &derivative, Time time, unsigned derivativeOrder) const =0
double Time
Definition: Curve.hpp:13
virtual Time getMaxTime() const =0
The one past the last valid time for the curve.
virtual void clear()=0
Clear all the curve coefficients.
CurveConfig::ValueType ValueType
The value type of the curve.
Definition: Curve.hpp:22
size_t Key
Definition: Curve.hpp:14
virtual void transformCurve(const ValueType T)=0
Perform a rigid transformation on the left side of the curve.