gramods
Loading...
Searching...
No Matches
PoseSampleCollector.hh
1
2#ifndef GM_TRACK_POSESAMPLECOLLECTOR
3#define GM_TRACK_POSESAMPLECOLLECTOR
4
5#include <gmTrack/config.hh>
6
7#include <gmCore/io_eigen.hh>
8#include <gmCore/Object.hh>
9#include <gmTrack/Controller.hh>
10#include <gmCore/Updateable.hh>
11
12BEGIN_NAMESPACE_GMTRACK;
13
18 : public gmCore::Object,
19 public gmCore::Updateable {
20
21protected:
22 struct Impl;
23 std::unique_ptr<Impl> _impl;
24
25public:
26 PoseSampleCollector(Impl *impl = nullptr);
28
33 void update(clock::time_point time, size_t frame);
34
40 void setController(std::shared_ptr<Controller> controller);
41
47 void addTrackerPosition(Eigen::Vector3f p);
48
54 void addTrackerOrientation(Eigen::Quaternionf o);
55
63 void setSamplesPerSecond(float n);
64
71 void setWarningThreshold(float d);
72
78 void setInlierThreshold(float r);
79
86 void setOrientationWarningThreshold(float d);
87
93 void setOrientationInlierThreshold(float r);
94
98 const std::vector<Eigen::Vector3f> &getTrackerPositions() const;
99
103 const std::vector<Eigen::Quaternionf> &getTrackerOrientations() const;
104
116 static Eigen::Vector3f getAverage(std::vector<Eigen::Vector3f> samples,
117 float *stddev = nullptr,
118 float *maxdev = nullptr,
119 float inlier_dist = -1.f,
120 size_t *inlier_count = nullptr);
132 static Eigen::Quaternionf getAverage(std::vector<Eigen::Quaternionf> samples,
133 float *stddev = nullptr,
134 float *maxdev = nullptr,
135 float inlier_dist = -1.f,
136 size_t *inlier_count = nullptr);
137
143 void traverse(Visitor *visitor) override;
144
145 GM_OFI_DECLARE;
146
147};
148
149END_NAMESPACE_GMTRACK;
150
151#endif
Base type for objects in the Gramods package for standardized handling of construction,...
Definition Object.hh:42
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition Updateable.hh:18
The PoseSampleCollector is a utility for sampling tracker data.
Definition PoseSampleCollector.hh:19
The visitor of a design pattern for automatic traversal.
Definition Object.hh:75
Definition Updateable.cpp:9