YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
MultipleAnalogSensorsInterfaces.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_MULTIPLEANALOGSENSORSINTERFACES_H
7#define YARP_DEV_MULTIPLEANALOGSENSORSINTERFACES_H
8
9#include <cassert>
10#include <string>
11
13#include <yarp/dev/api.h>
14#include <yarp/sig/Vector.h>
17
18namespace yarp::dev {
19class IThreeAxisGyroscopes;
20class IThreeAxisLinearAccelerometers;
21class IThreeAxisAngularAccelerometers;
22class IThreeAxisMagnetometers;
23class IPositionSensors;
24class ILinearVelocitySensors;
25class IOrientationSensors;
26class ITemperatureSensors;
27class ISixAxisForceTorqueSensors;
28class IContactLoadCellArrays;
29class IEncoderArrays;
30class ISkinPatches;
31
34
47} // namespace yarp::dev
48
65{
66public:
70 virtual yarp::dev::ReturnValue getNrOfThreeAxisGyroscopes(size_t& num) const = 0;
71
77 virtual yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const = 0;
78
85 virtual yarp::dev::ReturnValue getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const = 0;
86
93 virtual yarp::dev::ReturnValue getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const = 0;
94
103 virtual yarp::dev::ReturnValue getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
104
106};
107
108
119{
120public:
125
130
135 virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const = 0;
136
141 virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const = 0;
142
151 virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
152
154};
155
157{
158public:
163
168
173 virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerName(size_t sens_index, std::string &name) const = 0;
174
179 virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerFrameName(size_t sens_index, std::string &frameName) const = 0;
180
189 virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
190
192};
193
204{
205public:
210
214 virtual yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const = 0;
215
220 virtual yarp::dev::ReturnValue getThreeAxisMagnetometerName(size_t sens_index, std::string &name) const = 0;
221
226 virtual yarp::dev::ReturnValue getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const = 0;
227
236 virtual yarp::dev::ReturnValue getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
237
239};
240
255{
256public:
260 virtual yarp::dev::ReturnValue getNrOfPositionSensors(size_t& num) const = 0;
261
265 virtual yarp::dev::MAS_status getPositionSensorStatus(size_t sens_index) const = 0;
266
271 virtual yarp::dev::ReturnValue getPositionSensorName(size_t sens_index, std::string& name) const = 0;
272
281 virtual yarp::dev::ReturnValue getPositionSensorFrameName(size_t sens_index, std::string& frameName) const = 0;
282
291 virtual yarp::dev::ReturnValue getPositionSensorMeasure(size_t sens_index, yarp::sig::Vector& xyz, double& timestamp) const = 0;
292
294 {
295 }
296};
297
299{
300public:
305
309 virtual yarp::dev::MAS_status getLinearVelocitySensorStatus(size_t sens_index) const = 0;
310
315 virtual yarp::dev::ReturnValue getLinearVelocitySensorName(size_t sens_index, std::string& name) const = 0;
316
325 virtual yarp::dev::ReturnValue getLinearVelocitySensorFrameName(size_t sens_index, std::string& frameName) const = 0;
326
335 virtual yarp::dev::ReturnValue getLinearVelocitySensorMeasure(size_t sens_index, yarp::sig::Vector& xyz, double& timestamp) const = 0;
336
338 {
339 }
340};
341
357{
358public:
362 virtual yarp::dev::ReturnValue getNrOfOrientationSensors(size_t& num) const = 0;
363
367 virtual yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const = 0;
368
373 virtual yarp::dev::ReturnValue getOrientationSensorName(size_t sens_index, std::string &name) const = 0;
374
383 virtual yarp::dev::ReturnValue getOrientationSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
384
432 virtual yarp::dev::ReturnValue getOrientationSensorMeasureAsRollPitchYaw(size_t sens_index, yarp::sig::Vector& rpy, double& timestamp) const = 0;
433
435};
436
437
448{
449public:
453 virtual yarp::dev::ReturnValue getNrOfTemperatureSensors(size_t& num) const = 0;
454
458 virtual yarp::dev::MAS_status getTemperatureSensorStatus(size_t sens_index) const = 0;
459
463 virtual yarp::dev::ReturnValue getTemperatureSensorName(size_t sens_index, std::string &name) const = 0;
464
468 virtual yarp::dev::ReturnValue getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
469
474 virtual yarp::dev::ReturnValue getTemperatureSensorMeasure(size_t sens_index, double& out, double& timestamp) const = 0;
475
484 virtual yarp::dev::ReturnValue getTemperatureSensorMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
485
486
488};
489
502{
503public:
508
512 virtual yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const = 0;
513
517 virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const = 0;
518
522 virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
523
532 virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
533
535};
536
550{
551public:
556
560 virtual yarp::dev::MAS_status getContactLoadCellArrayStatus(size_t sens_index) const = 0;
561
566 virtual yarp::dev::ReturnValue getContactLoadCellArrayName(size_t sens_index, std::string &name) const = 0;
567
577 virtual yarp::dev::ReturnValue getContactLoadCellArrayMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
578
582 virtual size_t getContactLoadCellArraySize(size_t sens_index) const = 0;
583
584
586};
587
603{
604public:
608 virtual yarp::dev::ReturnValue getNrOfEncoderArrays(size_t& num) const = 0;
609
613 virtual yarp::dev::MAS_status getEncoderArrayStatus(size_t sens_index) const = 0;
614
618 virtual yarp::dev::ReturnValue getEncoderArrayName(size_t sens_index, std::string &name) const = 0;
619
628 virtual yarp::dev::ReturnValue getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
629
633 virtual size_t getEncoderArraySize(size_t sens_index) const = 0;
634
635
636 virtual ~IEncoderArrays(){}
637};
638
652{
653public:
657 virtual yarp::dev::ReturnValue getNrOfSkinPatches(size_t& num) const = 0;
658
662 virtual yarp::dev::MAS_status getSkinPatchStatus(size_t sens_index) const = 0;
663
667 virtual yarp::dev::ReturnValue getSkinPatchName(size_t sens_index, std::string &name) const = 0;
668
677 virtual yarp::dev::ReturnValue getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
678
682 virtual size_t getSkinPatchSize(size_t sens_index) const = 0;
683
684
685 virtual ~ISkinPatches(){}
686};
687
688#endif
contains the definition of a Vector type
Device interface to one or multiple contact load cell arrays.
virtual yarp::dev::MAS_status getContactLoadCellArrayStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getContactLoadCellArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual size_t getContactLoadCellArraySize(size_t sens_index) const =0
Get the size of the specified contact load cell array.
virtual yarp::dev::ReturnValue getContactLoadCellArrayName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfContactLoadCellArrays(size_t &num) const =0
Get the number of contact load cell array exposed by this device.
Device interface to one or multiple arrays of encoders.
virtual yarp::dev::ReturnValue getEncoderArrayName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfEncoderArrays(size_t &num) const =0
Get the number of encoder arrays exposed by this device.
virtual size_t getEncoderArraySize(size_t sens_index) const =0
Get the size of the specified encoder array.
virtual yarp::dev::MAS_status getEncoderArrayStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getLinearVelocitySensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfLinearVelocitySensors(size_t &num) const =0
Get the number of linear velocity sensors exposed by this device.
virtual yarp::dev::ReturnValue getLinearVelocitySensorMeasure(size_t sens_index, yarp::sig::Vector &xyz, double &timestamp) const =0
Get the last reading of the linear velocity sensor as x y z.
virtual yarp::dev::ReturnValue getLinearVelocitySensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::MAS_status getLinearVelocitySensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
Device interface to one or multiple orientation sensors, such as IMUs with on board estimation algori...
virtual yarp::dev::ReturnValue getOrientationSensorMeasureAsRollPitchYaw(size_t sens_index, yarp::sig::Vector &rpy, double &timestamp) const =0
Get the last reading of the orientation sensor as roll pitch yaw.
virtual yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getOrientationSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfOrientationSensors(size_t &num) const =0
Get the number of orientation sensors exposed by this device.
virtual yarp::dev::ReturnValue getOrientationSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
Device interface to one or multiple position sensors, such as UWB localization sensors.
virtual yarp::dev::MAS_status getPositionSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getPositionSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getPositionSensorMeasure(size_t sens_index, yarp::sig::Vector &xyz, double &timestamp) const =0
Get the last reading of the position sensor as x y z.
virtual yarp::dev::ReturnValue getPositionSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfPositionSensors(size_t &num) const =0
Get the number of position sensors exposed by this device.
Device interface to one or multiple six axis force torque sensor.
virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfSixAxisForceTorqueSensors(size_t &num) const =0
Get the number of six axis force torque sensors exposed by this device.
Device interface to one or more groups (patches) of tactile sensors (skin).
virtual yarp::dev::ReturnValue getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getSkinPatchName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getSkinPatchSize(size_t sens_index) const =0
Get the size of the specified skin patch.
virtual yarp::dev::MAS_status getSkinPatchStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfSkinPatches(size_t &num) const =0
Get the number of skin patches exposed by this device.
Device interface to one or multiple temperature sensors.
virtual yarp::dev::MAS_status getTemperatureSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getTemperatureSensorMeasure(size_t sens_index, double &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getTemperatureSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfTemperatureSensors(size_t &num) const =0
Get the number of temperature sensors exposed by this device.
virtual yarp::dev::ReturnValue getTemperatureSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::MAS_status getThreeAxisAngularAccelerometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfThreeAxisAngularAccelerometers(size_t &num) const =0
Get the number of three axis angular accelerometers exposed by this device.
virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisAngularAccelerometerFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
Device interface to one or multiple three axis gyroscopes.
virtual yarp::dev::ReturnValue getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfThreeAxisGyroscopes(size_t &num) const =0
Get the number of three axis gyroscopes exposed by this sensor.
virtual yarp::dev::ReturnValue getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the gyroscope.
Device interface to one or multiple three axis linear accelerometers.
virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfThreeAxisLinearAccelerometers(size_t &num) const =0
Get the number of three axis linear accelerometers exposed by this device.
Device interface to one or multiple three axis magnetometers.
virtual yarp::dev::ReturnValue getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::ReturnValue getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual yarp::dev::ReturnValue getNrOfThreeAxisMagnetometers(size_t &num) const =0
Get the number of magnetometers exposed by this device.
virtual yarp::dev::ReturnValue getThreeAxisMagnetometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
For streams capable of holding different kinds of content, check what they actually have.
yarp::dev::SensorMeasurementsData SensorMeasurements
yarp::dev::SensorMeasurementData SensorMeasurement
MAS_status
Status of a given analog sensor exposed by a multiple analog sensors interface.
@ MAS_UNKNOWN
The sensor is in an unknown state.
@ MAS_TIMEOUT
The sensor is read through the network, and the latest measurement was received before an implementat...
@ MAS_ERROR
The sensor is in generic error state.
@ MAS_WAITING_FOR_FIRST_READ
The sensor is read through the network, and the device is waiting to receive the first measurement.
@ MAS_OK
The sensor is working correctly.
@ MAS_OVF
The sensor reached an overflow.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18