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
12#include <yarp/dev/api.h>
13#include <yarp/sig/Vector.h>
16
17namespace yarp::dev {
18class IThreeAxisGyroscopes;
19class IThreeAxisLinearAccelerometers;
20class IThreeAxisAngularAccelerometers;
21class IThreeAxisMagnetometers;
22class IPositionSensors;
23class ILinearVelocitySensors;
24class IOrientationSensors;
25class ITemperatureSensors;
26class ISixAxisForceTorqueSensors;
27class IContactLoadCellArrays;
28class IEncoderArrays;
29class ISkinPatches;
30
33
46} // namespace yarp::dev
47
64{
65public:
69 virtual size_t getNrOfThreeAxisGyroscopes() const = 0;
70
76 virtual yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const = 0;
77
84 virtual bool getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const = 0;
85
92 virtual bool getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const = 0;
93
102 virtual bool getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
103
105};
106
107
118{
119public:
123 virtual size_t getNrOfThreeAxisLinearAccelerometers() const = 0;
124
129
134 virtual bool getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const = 0;
135
140 virtual bool getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const = 0;
141
150 virtual bool getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
151
153};
154
156{
157public:
161 virtual size_t getNrOfThreeAxisAngularAccelerometers() const = 0;
162
167
172 virtual bool getThreeAxisAngularAccelerometerName(size_t sens_index, std::string &name) const = 0;
173
178 virtual bool getThreeAxisAngularAccelerometerFrameName(size_t sens_index, std::string &frameName) const = 0;
179
188 virtual bool getThreeAxisAngularAccelerometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
189
191};
192
203{
204public:
208 virtual size_t getNrOfThreeAxisMagnetometers() const = 0;
209
213 virtual yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const = 0;
214
219 virtual bool getThreeAxisMagnetometerName(size_t sens_index, std::string &name) const = 0;
220
225 virtual bool getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const = 0;
226
235 virtual bool getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
236
238};
239
254{
255public:
259 virtual size_t getNrOfPositionSensors() const = 0;
260
264 virtual yarp::dev::MAS_status getPositionSensorStatus(size_t sens_index) const = 0;
265
270 virtual bool getPositionSensorName(size_t sens_index, std::string& name) const = 0;
271
280 virtual bool getPositionSensorFrameName(size_t sens_index, std::string& frameName) const = 0;
281
290 virtual bool getPositionSensorMeasure(size_t sens_index, yarp::sig::Vector& xyz, double& timestamp) const = 0;
291
293 {
294 }
295};
296
298{
299public:
303 virtual size_t getNrOfLinearVelocitySensors() const = 0;
304
308 virtual yarp::dev::MAS_status getLinearVelocitySensorStatus(size_t sens_index) const = 0;
309
314 virtual bool getLinearVelocitySensorName(size_t sens_index, std::string& name) const = 0;
315
324 virtual bool getLinearVelocitySensorFrameName(size_t sens_index, std::string& frameName) const = 0;
325
334 virtual bool getLinearVelocitySensorMeasure(size_t sens_index, yarp::sig::Vector& xyz, double& timestamp) const = 0;
335
337 {
338 }
339};
340
356{
357public:
361 virtual size_t getNrOfOrientationSensors() const = 0;
362
366 virtual yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const = 0;
367
372 virtual bool getOrientationSensorName(size_t sens_index, std::string &name) const = 0;
373
382 virtual bool getOrientationSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
383
431 virtual bool getOrientationSensorMeasureAsRollPitchYaw(size_t sens_index, yarp::sig::Vector& rpy, double& timestamp) const = 0;
432
434};
435
436
447{
448public:
452 virtual size_t getNrOfTemperatureSensors() const = 0;
453
457 virtual yarp::dev::MAS_status getTemperatureSensorStatus(size_t sens_index) const = 0;
458
462 virtual bool getTemperatureSensorName(size_t sens_index, std::string &name) const = 0;
463
467 virtual bool getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
468
473 virtual bool getTemperatureSensorMeasure(size_t sens_index, double& out, double& timestamp) const = 0;
474
483 virtual bool getTemperatureSensorMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
484
485
487};
488
501{
502public:
506 virtual size_t getNrOfSixAxisForceTorqueSensors() const = 0;
507
511 virtual yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const = 0;
512
516 virtual bool getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const = 0;
517
521 virtual bool getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const = 0;
522
531 virtual bool getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
532
534};
535
549{
550public:
554 virtual size_t getNrOfContactLoadCellArrays() const = 0;
555
559 virtual yarp::dev::MAS_status getContactLoadCellArrayStatus(size_t sens_index) const = 0;
560
565 virtual bool getContactLoadCellArrayName(size_t sens_index, std::string &name) const = 0;
566
576 virtual bool getContactLoadCellArrayMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
577
581 virtual size_t getContactLoadCellArraySize(size_t sens_index) const = 0;
582
583
585};
586
602{
603public:
607 virtual size_t getNrOfEncoderArrays() const = 0;
608
612 virtual yarp::dev::MAS_status getEncoderArrayStatus(size_t sens_index) const = 0;
613
617 virtual bool getEncoderArrayName(size_t sens_index, std::string &name) const = 0;
618
627 virtual bool getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
628
632 virtual size_t getEncoderArraySize(size_t sens_index) const = 0;
633
634
635 virtual ~IEncoderArrays(){}
636};
637
651{
652public:
656 virtual size_t getNrOfSkinPatches() const = 0;
657
661 virtual yarp::dev::MAS_status getSkinPatchStatus(size_t sens_index) const = 0;
662
666 virtual bool getSkinPatchName(size_t sens_index, std::string &name) const = 0;
667
676 virtual bool getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector& out, double& timestamp) const = 0;
677
681 virtual size_t getSkinPatchSize(size_t sens_index) const = 0;
682
683
684 virtual ~ISkinPatches(){}
685};
686
687#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 bool getContactLoadCellArrayName(size_t sens_index, std::string &name) const =0
Get the name 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 bool getContactLoadCellArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual size_t getNrOfContactLoadCellArrays() const =0
Get the number of contact load cell array exposed by this device.
Device interface to one or multiple arrays of encoders.
virtual bool getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual size_t getEncoderArraySize(size_t sens_index) const =0
Get the size of the specified encoder array.
virtual size_t getNrOfEncoderArrays() const =0
Get the number of encoder arrays exposed by this device.
virtual yarp::dev::MAS_status getEncoderArrayStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getEncoderArrayName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual bool 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 bool getLinearVelocitySensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfLinearVelocitySensors() const =0
Get the number of linear velocity sensors exposed by this device.
virtual yarp::dev::MAS_status getLinearVelocitySensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getLinearVelocitySensorFrameName(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 orientation sensors, such as IMUs with on board estimation algori...
virtual bool getOrientationSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getOrientationSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfOrientationSensors() const =0
Get the number of orientation sensors exposed by this device.
virtual bool 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.
Device interface to one or multiple position sensors, such as UWB localization sensors.
virtual bool 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 bool getPositionSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfPositionSensors() const =0
Get the number of position sensors exposed by this device.
virtual yarp::dev::MAS_status getPositionSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getPositionSensorFrameName(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 six axis force torque sensor.
virtual bool getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual size_t getNrOfSixAxisForceTorqueSensors() const =0
Get the number of six axis force torque sensors exposed by this device.
virtual yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual bool getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
Device interface to one or more groups (patches) of tactile sensors (skin).
virtual bool getSkinPatchName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfSkinPatches() const =0
Get the number of skin patches exposed by this device.
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 bool getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
Device interface to one or multiple temperature sensors.
virtual bool getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual bool getTemperatureSensorName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual yarp::dev::MAS_status getTemperatureSensorStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getTemperatureSensorMeasure(size_t sens_index, double &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual size_t getNrOfTemperatureSensors() const =0
Get the number of temperature sensors exposed by this device.
virtual bool getTemperatureSensorMeasure(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 getThreeAxisAngularAccelerometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getThreeAxisAngularAccelerometerFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual bool getThreeAxisAngularAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading of the specified sensor.
virtual size_t getNrOfThreeAxisAngularAccelerometers() const =0
Get the number of three axis angular accelerometers exposed by this device.
virtual bool getThreeAxisAngularAccelerometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
Device interface to one or multiple three axis gyroscopes.
virtual yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfThreeAxisGyroscopes() const =0
Get the number of three axis gyroscopes exposed by this sensor.
virtual bool getThreeAxisGyroscopeFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual bool 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 bool getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfThreeAxisLinearAccelerometers() const =0
Get the number of three axis linear accelerometers exposed by this device.
virtual bool getThreeAxisLinearAccelerometerMeasure(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 getThreeAxisLinearAccelerometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getThreeAxisLinearAccelerometerFrameName(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 magnetometers.
virtual bool getThreeAxisMagnetometerName(size_t sens_index, std::string &name) const =0
Get the name of the specified sensor.
virtual size_t getNrOfThreeAxisMagnetometers() const =0
Get the number of magnetometers exposed by this device.
virtual yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const =0
Get the status of the specified sensor.
virtual bool getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const =0
Get the name of the frame of the specified sensor.
virtual bool getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector &out, double &timestamp) const =0
Get the last reading 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