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 angular_velocity_[3]
Pre-allocated angular velocities as array, 3 entries ordered (x,y,z).
void unlock()
Unlock data,.
Thread aspect to access to BlackBoard.
double orientation_covariance_[9]
Pre-allocated orientation covariance, row major matrix ordered x, y, z.
Thread aspect that allows to obtain the current time from the clock.
float orientation_[4]
Pre-allocated orientation quaternion as array, 4 entries ordered (x,y,z,w).
virtual void init()
Initialize the thread.
const double * get_orientation_covariance()
Get orientation covariance.
Fawkes library namespace.
const float * get_linear_acceleration()
Get linear acceleration data.
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 lock_if_new_data()
Lock data if fresh.
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.
virtual void loop()
Code to execute in the thread.
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.
double angular_velocity_covariance_[9]
Pre-allocated angular velocity covariance, row major matrix ordered x, y, z.
fawkes::Mutex * data_mutex_
Lock while writing to distances or echoes array or marking new data.
virtual void finalize()
Finalize the thread.
double linear_acceleration_covariance_[9]
Pre-allocated linear acceleration covariance, row major matrix ordered x, y, z.
bool cfg_continuous_
True if running continuous.
Mutex mutual exclusion lock.
float linear_acceleration_[3]
Pre-allocated linear acceleration as array, 3 entries ordered (x,y,z).
const double * get_linear_acceleration_covariance()
Get linera acceleration covariance.
const fawkes::Time * get_timestamp()
Get time of data set.
IMUAcquisitionThread(const char *thread_name, bool continuous, const std::string &cfg_name, const std::string &cfg_prefix)
Constructor.