3 #ifndef __embObjInertials_h__
4 #define __embObjInertials_h__
6 #include <yarp/dev/DeviceDriver.h>
7 #include <yarp/dev/IAnalogSensor.h>
8 #include <yarp/os/PeriodicThread.h>
21 #include "FeatureInterface.h"
22 #include "EoAnalogSensors.h"
25 #include <yarp/os/LogStream.h>
27 #include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
31 class embObjInertials;
38 #define EMBOBJINERTIALS_PUBLISH_OLDSTYLE
43 public yarp::dev::DeviceDriver,
44 public yarp::dev::IThreeAxisGyroscopes,
45 public yarp::dev::IThreeAxisLinearAccelerometers,
52 #if defined(EMBOBJINERTIALS_PUBLISH_OLDSTYLE)
66 bool open(yarp::os::Searchable &config);
70 virtual int read(yarp::sig::Vector &
out);
81 virtual bool update(eOprotID32_t id32,
double timestamp,
void* rxdata);
101 string boardIPstring;
103 eOipv4addr_t ipv4addr;
112 unsigned int counterSat;
113 unsigned int counterError;
114 unsigned int counterTimeout;
120 mutable std::mutex mtx;
122 vector<double> analogdata;
123 vector<uint16_t> gyrSensors;
124 vector<uint16_t> accSensors;
133 bool fromConfig(yarp::os::Searchable &config);
136 void printServiceConfig(
void);
139 bool sendConfig2MTBboards(yarp::os::Searchable &config);
143 void resetCounters();
144 void getCounters(
unsigned int &saturations,
unsigned int &errors,
unsigned int &timeouts);
Interface for a factory device; a device that can create objects.
virtual size_t getNrOfThreeAxisGyroscopes() const override
virtual eth::iethresType_t type()
virtual bool getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const override
virtual bool update(eOprotID32_t id32, double timestamp, void *rxdata)
virtual int calibrateSensor()
virtual size_t getNrOfThreeAxisLinearAccelerometers() const override
virtual int getChannels()
virtual int calibrateChannel(int ch, double v)
virtual int read(yarp::sig::Vector &out)
Read a vector from the sensor.
virtual yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus(size_t sens_index) const override
virtual yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const override
virtual bool getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const override
virtual bool getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
virtual bool getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const override
bool open(yarp::os::Searchable &config)
virtual int getState(int ch)
virtual bool getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
virtual bool getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const override
virtual bool initialised()
Copyright (C) 2008 RobotCub Consortium.