23#include "sensor_thread.h"
25#include "acquisition_thread.h"
27#include <interfaces/IMUInterface.h>
44 std::string & cfg_prefix,
46:
Thread(
"IMUSensorThread",
Thread::OPMODE_WAITFORWAKEUP),
49 set_name(
"IMUSensorThread(%s)", cfg_name.c_str());
52 cfg_prefix_ = cfg_prefix;
62 std::string if_id =
"IMU " + cfg_name_;
const fawkes::Time * get_timestamp()
Get time of data set.
const float * get_angular_velocity()
Get angular velocity data.
const double * get_linear_acceleration_covariance()
Get linera acceleration covariance.
void unlock()
Unlock data,.
bool lock_if_new_data()
Lock data if fresh.
const float * get_orientation()
Get orientation data.
const double * get_angular_velocity_covariance()
Get angular velocity covariance.
const double * get_orientation_covariance()
Get orientation covariance.
const float * get_linear_acceleration()
Get linear acceleration data.
IMUSensorThread(std::string &cfg_name, std::string &cfg_prefix, IMUAcquisitionThread *aqt)
Constructor.
virtual void init()
Initialize the thread.
virtual void finalize()
Finalize the thread.
virtual void loop()
Code to execute in the thread.
BlackBoard * blackboard
This is the BlackBoard instance you can use to interact with the BlackBoard.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for writing.
virtual void close(Interface *interface)=0
Close interface.
Thread aspect to use blocked timing.
Configuration * config
This is the Configuration member used to access the configuration.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.
IMUInterface Fawkes BlackBoard Interface.
void set_frame(const char *new_frame)
Set frame value.
void set_angular_velocity_covariance(unsigned int index, const double new_angular_velocity_covariance)
Set angular_velocity_covariance value at given index.
void set_orientation_covariance(unsigned int index, const double new_orientation_covariance)
Set orientation_covariance value at given index.
void set_orientation(unsigned int index, const float new_orientation)
Set orientation value at given index.
void set_linear_acceleration(unsigned int index, const float new_linear_acceleration)
Set linear_acceleration value at given index.
void set_angular_velocity(unsigned int index, const float new_angular_velocity)
Set angular_velocity value at given index.
void set_linear_acceleration_covariance(unsigned int index, const double new_linear_acceleration_covariance)
Set linear_acceleration_covariance value at given index.
void set_auto_timestamping(bool enabled)
Enable or disable automated timestamping.
void write()
Write from local copy into BlackBoard memory.
void set_timestamp(const Time *t=NULL)
Set timestamp.
Thread class encapsulation of pthreads.
void set_name(const char *format,...)
Set name of thread.
Fawkes library namespace.