Fawkes API
Fawkes Development Version
|
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_;
void set_orientation_covariance(unsigned int index, const double new_orientation_covariance)
Set orientation_covariance value at given index.
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.
IMUSensorThread(std::string &cfg_name, std::string &cfg_prefix, IMUAcquisitionThread *aqt)
Constructor.
const float * get_linear_acceleration()
Get linear acceleration data.
void set_timestamp(const Time *t=NULL)
Set timestamp.
const double * get_orientation_covariance()
Get orientation covariance.
void set_linear_acceleration(unsigned int index, const float new_linear_acceleration)
Set linear_acceleration value at given index.
virtual void close(Interface *interface)=0
virtual void finalize()
Finalize the thread.
const float * get_orientation()
Get orientation data.
void set_orientation(unsigned int index, const float new_orientation)
Set orientation value at given index.
const fawkes::Time * get_timestamp()
Get time of data set.
void set_auto_timestamping(bool enabled)
Enable or disable automated timestamping.
bool lock_if_new_data()
Lock data if fresh.
virtual void loop()
Code to execute in the thread.
virtual std::string get_string(const char *path)=0
const double * get_angular_velocity_covariance()
Get angular velocity covariance.
const float * get_angular_velocity()
Get angular velocity data.
void set_linear_acceleration_covariance(unsigned int index, const double new_linear_acceleration_covariance)
Set linear_acceleration_covariance value at given index.
void write()
Write from local copy into BlackBoard memory.
void unlock()
Unlock data,.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
const double * get_linear_acceleration_covariance()
Get linera acceleration covariance.
void set_name(const char *format,...)
Set name of thread.
void set_angular_velocity(unsigned int index, const float new_angular_velocity)
Set angular_velocity value at given index.
virtual void init()
Initialize the thread.