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