22 #ifndef _PLUGINS_IMU_ACQUISITION_THREAD_H_
23 #define _PLUGINS_IMU_ACQUISITION_THREAD_H_
25 #include <aspect/blackboard.h>
26 #include <aspect/clock.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <core/threading/thread.h>
48 const std::string &cfg_name,
49 const std::string &cfg_prefix);
float linear_acceleration_[3]
Pre-allocated linear acceleration as array, 3 entries ordered (x,y,z).
fawkes::Mutex * data_mutex_
Lock while writing to distances or echoes array or marking new data.
std::string cfg_frame_
Coordinate frame for sensor.
void unlock()
Unlock data,.
const double * get_orientation_covariance()
Get orientation covariance.
double linear_acceleration_covariance_[9]
Pre-allocated linear acceleration covariance, row major matrix ordered x, y, z.
IMUAcquisitionThread(const char *thread_name, bool continuous, const std::string &cfg_name, const std::string &cfg_prefix)
Constructor.
double angular_velocity_covariance_[9]
Pre-allocated angular velocity covariance, row major matrix ordered x, y, z.
double orientation_covariance_[9]
Pre-allocated orientation covariance, row major matrix ordered x, y, z.
const float * get_orientation()
Get orientation data.
virtual void loop()
Code to execute in the thread.
const double * get_linear_acceleration_covariance()
Get linera acceleration covariance.
virtual void run()
Stub to see name in backtrace for easier debugging.
float orientation_[4]
Pre-allocated orientation quaternion as array, 4 entries ordered (x,y,z,w).
const fawkes::Time * get_timestamp()
Get time of data set.
bool lock_if_new_data()
Lock data if fresh.
virtual void finalize()
Finalize the thread.
const float * get_linear_acceleration()
Get linear acceleration data.
std::string cfg_prefix_
Configuration path prefix.
const float * get_angular_velocity()
Get angular velocity data.
bool cfg_continuous_
True if running continuous.
std::string cfg_name_
Configuration name (third element in config path).
float angular_velocity_[3]
Pre-allocated angular velocities as array, 3 entries ordered (x,y,z).
bool new_data_
Set to true in your loop if new data is available.
virtual void init()
Initialize the thread.
const double * get_angular_velocity_covariance()
Get angular velocity covariance.
fawkes::Time * timestamp_
Time when the most recent data was received.
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
IMUInterface Fawkes BlackBoard Interface.
Thread aspect to log output.
Mutex mutual exclusion lock.
Thread class encapsulation of pthreads.
A class for handling time.
Fawkes library namespace.