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