gramods
Loading...
Searching...
No Matches
EFHOAW.hh
1
5#ifndef GRAMODS_MISC_EFHOAW
6#define GRAMODS_MISC_EFHOAW
7
8#include <gmMisc/config.hh>
9
10#ifdef gramods_ENABLE_Eigen3
11
12#include <Eigen/Eigen>
13
14#include <memory>
15
16BEGIN_NAMESPACE_GMMISC
17
24class EFHOAW {
25
26public:
27
30 typedef Eigen::Matrix<double, 3, Eigen::Dynamic> polco;
31
34 EFHOAW();
35
36 ~EFHOAW();
37
42 void setHistoryLength(size_t N);
43
46 size_t getHistoryLength() const;
47
52 void setHistoryDuration(double t);
53
56 double getHistoryDuration() const;
57
63 double getLastSampleTime(size_t id);
64
80 void addSample(size_t id, Eigen::Vector3d position, double time, bool replace = true);
81
98 polco estimateCoefficients
99 (size_t id, double error, size_t order = 2, size_t *samples = nullptr);
100
107 Eigen::Vector3d getPolynomialPosition(int id, double t) const;
108
115 Eigen::Vector3d getPolynomialVelocity(int id, double t) const;
116
125 void cleanup(double time = -1);
126
127private:
128
129 struct Impl;
130 std::unique_ptr<Impl> _impl;
131
132};
133
134END_NAMESPACE_GMMISC
135
136#endif
137#endif
This is an end-fitting higher-order adaptive window estimator of velocity from samples allowing jitte...
Definition EFHOAW.hh:24
Eigen::Matrix< double, 3, Eigen::Dynamic > polco
Matrix holding the polynomial coefficients, one row for each dimension.
Definition EFHOAW.hh:30
Definition EFHOAW.cpp:15