40 accels({0.0, 0.0, 0.0, 0.0}),
69bool FakeIMU::threadInit()
77 static double count=10;
80 rpy[1] = count * 3.14/180;
84 accels = gravity * dcm;
107bool FakeIMU::genericGetSensorName(
size_t sens_index, std::string &name)
const
117bool FakeIMU::genericGetFrameName(
size_t sens_index, std::string &frameName)
const
139 return genericGetSensorName(
sens_index, name);
144 return genericGetFrameName(
sens_index, frameName);
154 out[0] = dummy_value;
155 out[1] = dummy_value;
156 out[2] = dummy_value;
177 return genericGetSensorName(
sens_index, name);
182 return genericGetFrameName(
sens_index, frameName);
215 return genericGetSensorName(
sens_index, name);
220 return genericGetFrameName(
sens_index, frameName);
230 out[0] = dummy_value;
231 out[1] = dummy_value;
232 out[2] = dummy_value;
253 return genericGetSensorName(
sens_index, name);
258 return genericGetFrameName(
sens_index, frameName);
const double DEFAULT_PERIOD
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
fakeIMU : fake device implementing the device interface typically implemented by an Inertial Measurem...
bool getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const override
Get the status of the specified sensor.
bool getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool getOrientationSensorFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
size_t getNrOfOrientationSensors() const override
Get the number of orientation sensors exposed by this device.
yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus(size_t sens_index) const override
Get the status of the specified sensor.
bool getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the gyroscope.
bool close() override
Close the DeviceDriver.
bool getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool getThreeAxisMagnetometerName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
size_t getNrOfThreeAxisLinearAccelerometers() const override
Get the number of three axis linear accelerometers exposed by this device.
bool getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
size_t getNrOfThreeAxisMagnetometers() const override
Get the number of magnetometers exposed by this device.
bool getOrientationSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getOrientationSensorMeasureAsRollPitchYaw(size_t sens_index, yarp::sig::Vector &rpy, double ×tamp) const override
Get the last reading of the orientation sensor as roll pitch yaw.
size_t getNrOfThreeAxisGyroscopes() const override
Get the number of three axis gyroscopes exposed by this sensor.
bool getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
A mini-server for performing network communication in the background.
An abstraction for a periodic thread.
bool setPeriod(double period)
Set the (new) period of the thread.
bool start()
Call this to start the thread.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.
void update()
Set the timestamp to the current time, and increment the sequence number (wrapping to 0 if the sequen...
void resize(size_t size) override
Resize the vector.
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
MAS_status
Status of a given analog sensor exposed by a multiple analog sensors interface.
@ MAS_ERROR
The sensor is in generic error state.
@ MAS_OK
The sensor is working correctly.
yarp::sig::Matrix rpy2dcm(const yarp::sig::Vector &rpy)
Converts roll-pitch-yaw angles in the corresponding dcm (direction cosine matrix) rotation matrix (de...
An interface to the operating system, including Port based communication.