22 #include <yarp/dev/DeviceDriver.h>
23 #include <yarp/dev/IGenericSensor.h>
24 #include <yarp/os/Stamp.h>
25 #include <yarp/dev/IPreciselyTimed.h>
26 #include <yarp/os/PeriodicThread.h>
51 public yarp::dev::IPreciselyTimed,
52 public yarp::dev::DeviceDriver,
53 public yarp::os::PeriodicThread
62 typedef std::map<int, imu_cmd_t*> cmd_map_t;
63 cmd_map_t cmd_ptr_map;
74 std::mutex data_mutex;
76 std::string comPortName;
78 yarp::os::Stamp lastStamp;
85 virtual bool read(yarp::sig::Vector &
out);
87 virtual bool open(yarp::os::Searchable &config);
100 void threadRelease();
104 void stop_continuous(
void);
110 void get_Acc_Ang_Mag(
float acc[3],
float angRate[3],
float mag[3], uint64_t *
time);
114 void get_Euler(
float euler[3], uint64_t *
time);
116 void get_Euler_AngularRate(
float euler[3],
float angRate[3], uint64_t *
time);
118 void get_Quaternion(
float quat[4], uint64_t *
time);
121 inline int flush() {
return tcflush(fd_ser, TCIOFLUSH);
Driver for 3DM_GX3 IMU unit from MicroStrain.
virtual bool calibrate(int ch, double v)
virtual bool getChannels(int *nc)
void sample_setting(void)
virtual yarp::os::Stamp getLastInputStamp()
bool open(const XSensMTxParameters &par)
virtual bool open(yarp::os::Searchable &config)
virtual bool read(yarp::sig::Vector &out)
Copyright (C) 2008 RobotCub Consortium.
std::string comPortString