pose_estimation
RBSFilter.hpp
Go to the documentation of this file.
1 /* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */
2 
3 #ifndef POSE_ESTIMATION_RBSFilter_TASK_HPP
4 #define POSE_ESTIMATION_RBSFilter_TASK_HPP
5 
6 #include "pose_estimation/RBSFilterBase.hpp"
7 
8 #include <boost/shared_ptr.hpp>
9 #include <pose_estimation/pose_with_velocity/PoseUKF.hpp>
10 #include <transformer/Transformer.hpp>
11 #include <pose_estimationTypes.hpp>
12 #include <pose_estimation/StreamAlignmentVerifier.hpp>
13 #include <base/samples/RigidBodyAcceleration.hpp>
14 
15 namespace pose_estimation {
16 
32  class RBSFilter : public RBSFilterBase
33  {
34  friend class RBSFilterBase;
35  protected:
36  States last_state;
37  States new_state;
38  std::string source_frame;
39  boost::shared_ptr<PoseUKF> pose_estimator;
40  boost::shared_ptr<StreamAlignmentVerifier> verifier;
41  base::Time last_sample_time;
44 
48  bool setupFilter();
49 
53  void predictionStep(const base::Time& sample_time);
54 
59  void writeCurrentState();
60 
63  virtual bool resetState();
64 
73  void verifyStreamAlignerStatus(transformer::Transformer &trans, double verification_interval = 2.0,
74  double drop_rate_warning = 0.5, double drop_rate_critical = 1.0)
75  {verifyStreamAlignerStatus(trans.getStreamAlignerStatus(), verification_interval, drop_rate_warning, drop_rate_critical);}
76  void verifyStreamAlignerStatus(const aggregator::StreamAlignerStatus &status, double verification_interval = 2.0,
77  double drop_rate_warning = 0.5, double drop_rate_critical = 1.0);
78 
82  bool getSensorInBodyPose(const transformer::Transformation& sensor2body_transformer, const base::Time &ts, Eigen::Affine3d& sensorInBody);
83 
84  public:
89  RBSFilter(std::string const& name = "pose_estimation::RBSFilter");
90 
96  RBSFilter(std::string const& name, RTT::ExecutionEngine* engine);
97 
100  ~RBSFilter();
101 
116  bool configureHook();
117 
123  bool startHook();
124 
139  void updateHook();
140 
147  void errorHook();
148 
152  void stopHook();
153 
158  void cleanupHook();
159  };
160 }
161 
162 #endif
163 
base::Time last_sample_time
Definition: RBSFilter.hpp:41
States last_state
Definition: RBSFilter.hpp:36
std::string source_frame
Definition: RBSFilter.hpp:38
RBSFilter(std::string const &name="pose_estimation::RBSFilter")
Definition: RBSFilter.cpp:8
virtual bool resetState()
Definition: RBSFilter.cpp:122
void updateHook()
Definition: RBSFilter.cpp:185
bool setupFilter()
Definition: RBSFilter.cpp:60
void writeCurrentState()
Definition: RBSFilter.cpp:35
void cleanupHook()
Definition: RBSFilter.cpp:198
void errorHook()
Definition: RBSFilter.cpp:190
unsigned aligner_stream_failures
Definition: RBSFilter.hpp:42
bool startHook()
Definition: RBSFilter.cpp:179
~RBSFilter()
Definition: RBSFilter.cpp:18
void stopHook()
Definition: RBSFilter.cpp:194
friend class RBSFilterBase
Definition: RBSFilter.hpp:34
States new_state
Definition: RBSFilter.hpp:37
boost::shared_ptr< PoseUKF > pose_estimator
Definition: RBSFilter.hpp:39
bool configureHook()
The following lines are template definitions for the various state machine.
Definition: RBSFilter.cpp:158
Definition: pose_estimationTypes.hpp:10
unsigned critical_aligner_stream_failures
Definition: RBSFilter.hpp:43
bool getSensorInBodyPose(const transformer::Transformation &sensor2body_transformer, const base::Time &ts, Eigen::Affine3d &sensorInBody)
Definition: RBSFilter.cpp:141
void verifyStreamAlignerStatus(transformer::Transformer &trans, double verification_interval=2.0, double drop_rate_warning=0.5, double drop_rate_critical=1.0)
Definition: RBSFilter.hpp:73
The task context provides and requires services. It uses an ExecutionEngine to perform its functions...
Definition: RBSFilter.hpp:32
boost::shared_ptr< StreamAlignmentVerifier > verifier
Definition: RBSFilter.hpp:40
void predictionStep(const base::Time &sample_time)
Definition: RBSFilter.cpp:22