mars
IMU.hpp
Go to the documentation of this file.
1 /* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */
2 
3 #ifndef SIMULATION_MARSIMU_TASK_HPP
4 #define SIMULATION_MARSIMU_TASK_HPP
5 
6 #include "mars/IMUBase.hpp"
7 #include <boost/random/normal_distribution.hpp>
8 #include <boost/random/mersenne_twister.hpp>
9 
10 namespace mars {
11 
12  class IMUPlugin;
13 
28  class IMU : public IMUBase
29  {
30  friend class IMUBase;
31 
32  protected:
33 
34  /* Normally triggers bias estimation on the xsens imu, in simulation thios does nothing
35  */
36  virtual bool estimate_bias(boost::uint16_t duration){};
37 
38  long node_id;
39  base::samples::RigidBodyState rbs;
40  base::samples::IMUSensors imusens;
41  boost::mt19937 rnd_generator;
42  boost::normal_distribution<double> translation_noise;
43  boost::normal_distribution<double> rotation_noise;
44  boost::normal_distribution<double> velocity_noise;
45  boost::normal_distribution<double> angular_velocity_noise;
46  void update( double time );
47 
48 
49  public:
54  IMU(std::string const& name = "mars::IMU");
55 
61  IMU(std::string const& name, RTT::ExecutionEngine* engine);
62 
65  ~IMU();
66 
81  // bool configureHook();
82 
88  bool startHook();
89 
104  void updateHook();
105 
112  // void errorHook();
113 
117  void stopHook();
118 
123  // void cleanupHook();
124  };
125 }
126 
127 #endif
128 
The task context provides and requires services. It uses an ExecutionEngine to perform its functions...
Definition: IMU.hpp:28
long node_id
Definition: IMU.hpp:36
boost::normal_distribution< double > angular_velocity_noise
Definition: IMU.hpp:45
boost::normal_distribution< double > velocity_noise
Definition: IMU.hpp:44
void updateHook()
Definition: IMU.cpp:77
void update(double time)
Definition: IMU.cpp:94
base::samples::IMUSensors imusens
Definition: IMU.hpp:40
void stopHook()
Definition: IMU.cpp:85
bool startHook()
The following lines are template definitions for the various state machine.
Definition: IMU.cpp:38
virtual bool estimate_bias(boost::uint16_t duration)
Definition: IMU.hpp:36
Definition: jointTypes.hpp:9
friend class IMUBase
Definition: IMU.hpp:30
~IMU()
Definition: IMU.cpp:22
boost::normal_distribution< double > rotation_noise
Definition: IMU.hpp:43
IMU(std::string const &name="mars::IMU")
Definition: IMU.cpp:12
boost::mt19937 rnd_generator
Definition: IMU.hpp:41
boost::normal_distribution< double > translation_noise
Definition: IMU.hpp:42
base::samples::RigidBodyState rbs
Definition: IMU.hpp:39