22 #ifndef __PLUGINS_IMU_ACQUISITION_THREAD_H_ 23 #define __PLUGINS_IMU_ACQUISITION_THREAD_H_ 25 #include <core/threading/thread.h> 26 #include <aspect/logging.h> 27 #include <aspect/configurable.h> 28 #include <aspect/clock.h> 29 #include <aspect/blackboard.h> 48 std::string &cfg_name, std::string &cfg_prefix);
51 bool lock_if_new_data();
57 virtual void finalize();
62 {
return orientation_; }
67 {
return orientation_covariance_; }
72 {
return angular_velocity_; }
77 {
return angular_velocity_covariance_; }
82 {
return linear_acceleration_; }
87 {
return linear_acceleration_covariance_; }
92 {
return timestamp_; }
108 float orientation_[4];
109 double orientation_covariance_[9];
110 float angular_velocity_[3];
111 double angular_velocity_covariance_[9];
112 float linear_acceleration_[3];
113 double linear_acceleration_covariance_[9];
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
const double * get_orientation_covariance()
Get orientation covariance.
Fawkes library namespace.
const float * get_linear_acceleration()
Get linear acceleration data.
virtual void run()
Code to execute in the thread.
std::string cfg_name_
Configuration name (third element in config path).
A class for handling time.
fawkes::Time * timestamp_
Time when the most recent data was received.
Thread class encapsulation of pthreads.
const float * get_angular_velocity()
Get angular velocity data.
const float * get_orientation()
Get orientation data.
bool new_data_
Set to true in your loop if new data is available.
std::string cfg_frame_
Coordinate frame for sensor.
std::string cfg_prefix_
Configuration path prefix.
const double * get_angular_velocity_covariance()
Get angular velocity covariance.
Thread aspect to log output.
Thread aspect to access configuration data.
IMUInterface Fawkes BlackBoard Interface.
virtual void run()
Stub to see name in backtrace for easier debugging.
fawkes::Mutex * data_mutex_
Lock while writing to distances or echoes array or marking new data.
bool cfg_continuous_
True if running continuous.
Mutex mutual exclusion lock.
const double * get_linear_acceleration_covariance()
Get linera acceleration covariance.
const fawkes::Time * get_timestamp()
Get time of data set.