00001 /* 00002 * IMUDataProcessor.hpp 00003 * 00004 * Created on: Aug 16, 2012 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef IMUDATAPROCESSOR_HPP_ 00009 #define IMUDATAPROCESSOR_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <telekyb_base/Options.hpp> 00014 00015 #include <telekyb_base/Time.hpp> 00016 00017 #include "SerialIMUDevice.hpp" 00018 #include "IMUDataProcessorOptions.hpp" 00019 #include "IMUCalibrator.hpp" 00020 00021 // IMU Message 00022 #include <tk_draft_msgs/TKSmallImu.h> 00023 00024 namespace TELEKYB_NAMESPACE { 00025 00026 class IMUDataProcessor : public RawImuDataListener { 00027 private: 00028 IMUDataProcessorOptions options; 00029 00030 IMUCalibrator calibrator; 00031 00032 // Publisher 00033 ros::Publisher imuPublisher; 00034 00035 bool driftEstimRunning; 00036 00037 // predefined msg to not place it on the stack all the time. 00038 tk_draft_msgs::TKSmallImu rosMsg; 00039 00040 public: 00041 IMUDataProcessor(); 00042 virtual ~IMUDataProcessor(); 00043 00044 bool init(); 00045 00046 void processRawIMUData(const RawImuData& data); 00047 void attitudeEstimation(const RawImuData& data); 00048 }; 00049 00050 } /* namespace telekyb */ 00051 #endif /* IMUDATAPROCESSOR_HPP_ */