YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
MultipleAnalogSensorsRemapper Class Reference

multipleanalogsensorsremapper : device that takes a list of sensors from multiple analog sensors device and exposes them as a single device exposing MultipleAnalogSensors interface. More...

#include <multipleanalogsensorsremapper/MultipleAnalogSensorsRemapper.h>

+ Inheritance diagram for MultipleAnalogSensorsRemapper:

Public Member Functions

bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
bool attachAll (const yarp::dev::PolyDriverList &p) override
 MultipeWrapper methods.
 
bool detachAll () override
 Detach the object (you must have first called attach).
 
yarp::dev::ReturnValue getNrOfThreeAxisGyroscopes (size_t &num) const override
 Get the number of three axis gyroscopes exposed by this sensor.
 
yarp::dev::MAS_status getThreeAxisGyroscopeStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisGyroscopeName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisGyroscopeFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisGyroscopeMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the gyroscope.
 
yarp::dev::ReturnValue getNrOfThreeAxisLinearAccelerometers (size_t &num) const override
 Get the number of three axis linear accelerometers exposed by this device.
 
yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisLinearAccelerometerName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisLinearAccelerometerFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisLinearAccelerometerMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getNrOfThreeAxisAngularAccelerometers (size_t &num) const override
 Get the number of three axis angular accelerometers exposed by this device.
 
yarp::dev::MAS_status getThreeAxisAngularAccelerometerStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisAngularAccelerometerName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisAngularAccelerometerFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisAngularAccelerometerMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getNrOfThreeAxisMagnetometers (size_t &num) const override
 Get the number of magnetometers exposed by this device.
 
yarp::dev::MAS_status getThreeAxisMagnetometerStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisMagnetometerName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisMagnetometerFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getThreeAxisMagnetometerMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getNrOfOrientationSensors (size_t &num) const override
 Get the number of orientation sensors exposed by this device.
 
yarp::dev::MAS_status getOrientationSensorStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getOrientationSensorName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getOrientationSensorFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getOrientationSensorMeasureAsRollPitchYaw (size_t sens_index, yarp::sig::Vector &rpy, double &timestamp) const override
 Get the last reading of the orientation sensor as roll pitch yaw.
 
yarp::dev::ReturnValue getNrOfTemperatureSensors (size_t &num) const override
 Get the number of temperature sensors exposed by this device.
 
yarp::dev::MAS_status getTemperatureSensorStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getTemperatureSensorName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getTemperatureSensorFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getTemperatureSensorMeasure (size_t sens_index, double &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getTemperatureSensorMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getNrOfSixAxisForceTorqueSensors (size_t &num) const override
 Get the number of six axis force torque sensors exposed by this device.
 
yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getSixAxisForceTorqueSensorName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getSixAxisForceTorqueSensorFrameName (size_t sens_index, std::string &frame) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getSixAxisForceTorqueSensorMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
yarp::dev::ReturnValue getNrOfContactLoadCellArrays (size_t &num) const override
 Get the number of contact load cell array exposed by this device.
 
yarp::dev::MAS_status getContactLoadCellArrayStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getContactLoadCellArrayName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getContactLoadCellArrayMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
size_t getContactLoadCellArraySize (size_t sens_index) const override
 Get the size of the specified contact load cell array.
 
yarp::dev::ReturnValue getNrOfEncoderArrays (size_t &num) const override
 Get the number of encoder arrays exposed by this device.
 
yarp::dev::MAS_status getEncoderArrayStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getEncoderArrayName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getEncoderArrayMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
size_t getEncoderArraySize (size_t sens_index) const override
 Get the size of the specified encoder array.
 
yarp::dev::ReturnValue getNrOfSkinPatches (size_t &num) const override
 Get the number of skin patches exposed by this device.
 
yarp::dev::MAS_status getSkinPatchStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getSkinPatchName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getSkinPatchMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get the last reading of the specified sensor.
 
size_t getSkinPatchSize (size_t sens_index) const override
 Get the size of the specified skin patch.
 
yarp::dev::ReturnValue getNrOfPositionSensors (size_t &num) const override
 Get the number of position sensors exposed by this device.
 
yarp::dev::MAS_status getPositionSensorStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getPositionSensorName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getPositionSensorFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getPositionSensorMeasure (size_t sens_index, yarp::sig::Vector &xyz, double &timestamp) const override
 Get the last reading of the position sensor as x y z.
 
yarp::dev::ReturnValue getNrOfLinearVelocitySensors (size_t &num) const override
 Get the number of linear velocity sensors exposed by this device.
 
yarp::dev::MAS_status getLinearVelocitySensorStatus (size_t sens_index) const override
 Get the status of the specified sensor.
 
yarp::dev::ReturnValue getLinearVelocitySensorName (size_t sens_index, std::string &name) const override
 Get the name of the specified sensor.
 
yarp::dev::ReturnValue getLinearVelocitySensorFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame of the specified sensor.
 
yarp::dev::ReturnValue getLinearVelocitySensorMeasure (size_t sens_index, yarp::sig::Vector &xyz, double &timestamp) const override
 Get the last reading of the linear velocity sensor as x y z.
 
template<typename Interface >
MAS_status genericGetStatus (const MAS_SensorType sensorType, size_t &sens_index, const std::vector< Interface * > &subDeviceVec, MAS_status(Interface::*methodPtr)(size_t) const) const
 
template<typename Interface >
ReturnValue genericGetName (const MAS_SensorType sensorType, size_t &sens_index, std::string &name, const std::vector< Interface * > &subDeviceVec, yarp::dev::ReturnValue(Interface::*methodPtr)(size_t, std::string &) const) const
 
template<typename Interface >
ReturnValue genericGetFrameName (const MAS_SensorType sensorType, size_t &sens_index, std::string &name, const std::vector< Interface * > &subDeviceVec, yarp::dev::ReturnValue(Interface::*methodPtr)(size_t, std::string &) const) const
 
template<typename Interface >
ReturnValue genericGetMeasure (const MAS_SensorType sensorType, size_t &sens_index, yarp::sig::Vector &out, double &timestamp, const std::vector< Interface * > &subDeviceVec, yarp::dev::ReturnValue(Interface::*methodPtr)(size_t, yarp::sig::Vector &, double &) const) const
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriver & operator= (const DeviceDriver &other)=delete
 
DeviceDriver & operator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDriver * getImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IMultipleWrapper
virtual ~IMultipleWrapper ()
 Destructor.
 
- Public Member Functions inherited from yarp::dev::IThreeAxisGyroscopes
virtual ~IThreeAxisGyroscopes ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisLinearAccelerometers
virtual ~IThreeAxisLinearAccelerometers ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisAngularAccelerometers
virtual ~IThreeAxisAngularAccelerometers ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisMagnetometers
virtual ~IThreeAxisMagnetometers ()
 
- Public Member Functions inherited from yarp::dev::IOrientationSensors
virtual ~IOrientationSensors ()
 
- Public Member Functions inherited from yarp::dev::ITemperatureSensors
virtual ~ITemperatureSensors ()
 
- Public Member Functions inherited from yarp::dev::ISixAxisForceTorqueSensors
virtual ~ISixAxisForceTorqueSensors ()
 
- Public Member Functions inherited from yarp::dev::IContactLoadCellArrays
virtual ~IContactLoadCellArrays ()
 
- Public Member Functions inherited from yarp::dev::IEncoderArrays
virtual ~IEncoderArrays ()
 
- Public Member Functions inherited from yarp::dev::ISkinPatches
virtual ~ISkinPatches ()
 
- Public Member Functions inherited from yarp::dev::IPositionSensors
virtual ~IPositionSensors ()
 
- Public Member Functions inherited from yarp::dev::ILinearVelocitySensors
virtual ~ILinearVelocitySensors ()
 

Detailed Description

multipleanalogsensorsremapper : device that takes a list of sensors from multiple analog sensors device and exposes them as a single device exposing MultipleAnalogSensors interface.

YARP device name
multipleanalogsensorsremapper

Parameters required by this device are:

Parameter name SubParameter Type Units Default Value Required Description Notes
{sensorTag}Names - vector of strings - - Yes Ordered list of name that must belong of the remapped device. The list also defines which index will be associated to a given sensor in the remapped devices. For example, if the list (sensorNameA,sensorNameB,sensorNameC) is given, these sensors will have respectively index 0, 1 and 2 in the remapped device.

The sensorTag is a tag identifying the specific sensor interface, see Multiple Analog Sensor Interfaces for a list of possible sensors. The tag of each sensor interface is provided in the doxygen documentation of the specific interface.

Configuration file using .ini format.

device multipleanalogsensorsremapper
ThreeAxisGyroscopesNames (head torso)
SixAxisForceTorqueSensorsNames (left_foot right_foot left_leg right_leg)

Configuration of the device from C++ code.

Property options;
options.put("device","multipleanalogsensorsremapper");
Bottle gyrosNames;
Bottle & gyrosList = gyrosNames.addList();
gyrosList.addString("head");
gyrosList.addString("torso");
options.put("ThreeAxisGyroscopesNames", gyrosNames.get(0));
Bottle ftNames;
Bottle & ftList = ftNames.addList();
ftList.addString("left_foot");
ftList.addString("right_foot");
ftList.addString("left_leg");
ftList.addString("right_leg");
options.put("SixAxisForceTorqueSensorsNames", ftNames.get(0));
// Actually open the device
PolyDriver multipleAnalogRemappedDevice(options);
// Use it as you would use any controlboard device
// ...

Definition at line 87 of file MultipleAnalogSensorsRemapper.h.

Member Function Documentation

◆ attachAll()

bool MultipleAnalogSensorsRemapper::attachAll ( const yarp::dev::PolyDriverList &  p)
overridevirtual

MultipeWrapper methods.

Implements yarp::dev::IMultipleWrapper.

Definition at line 231 of file MultipleAnalogSensorsRemapper.cpp.

◆ close()

bool MultipleAnalogSensorsRemapper::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 74 of file MultipleAnalogSensorsRemapper.cpp.

◆ detachAll()

bool MultipleAnalogSensorsRemapper::detachAll ( )
overridevirtual

Detach the object (you must have first called attach).

Returns
true/false on success failure.

Implements yarp::dev::IMultipleWrapper.

Definition at line 263 of file MultipleAnalogSensorsRemapper.cpp.

◆ genericGetFrameName()

template<typename Interface >
ReturnValue MultipleAnalogSensorsRemapper::genericGetFrameName ( const MAS_SensorType  sensorType,
size_t &  sens_index,
std::string &  name,
const std::vector< Interface * > &  subDeviceVec,
yarp::dev::ReturnValue(Interface::*)(size_t, std::string &) const  methodPtr 
) const

Definition at line 323 of file MultipleAnalogSensorsRemapper.cpp.

◆ genericGetMeasure()

template<typename Interface >
ReturnValue MultipleAnalogSensorsRemapper::genericGetMeasure ( const MAS_SensorType  sensorType,
size_t &  sens_index,
yarp::sig::Vector &  out,
double &  timestamp,
const std::vector< Interface * > &  subDeviceVec,
yarp::dev::ReturnValue(Interface::*)(size_t, yarp::sig::Vector &, double &) const  methodPtr 
) const

Definition at line 344 of file MultipleAnalogSensorsRemapper.cpp.

◆ genericGetName()

template<typename Interface >
ReturnValue MultipleAnalogSensorsRemapper::genericGetName ( const MAS_SensorType  sensorType,
size_t &  sens_index,
std::string &  name,
const std::vector< Interface * > &  subDeviceVec,
yarp::dev::ReturnValue(Interface::*)(size_t, std::string &) const  methodPtr 
) const

Definition at line 303 of file MultipleAnalogSensorsRemapper.cpp.

◆ genericGetStatus()

template<typename Interface >
MAS_status MultipleAnalogSensorsRemapper::genericGetStatus ( const MAS_SensorType  sensorType,
size_t &  sens_index,
const std::vector< Interface * > &  subDeviceVec,
MAS_status(Interface::*)(size_t) const  methodPtr 
) const

Definition at line 283 of file MultipleAnalogSensorsRemapper.cpp.

◆ getContactLoadCellArrayMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getContactLoadCellArrayMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getContactLoadCellArrayMeasure()-1).
[out]outThe requested measure. The vector should be getContactLoadCellArrayMeasure(sens_index)-dimensional. The measure is expressed in Newton.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IContactLoadCellArrays.

Definition at line 671 of file MultipleAnalogSensorsRemapper.cpp.

◆ getContactLoadCellArrayName()

ReturnValue MultipleAnalogSensorsRemapper::getContactLoadCellArrayName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IContactLoadCellArrays.

Definition at line 666 of file MultipleAnalogSensorsRemapper.cpp.

◆ getContactLoadCellArraySize()

size_t MultipleAnalogSensorsRemapper::getContactLoadCellArraySize ( size_t  sens_index) const
overridevirtual

Get the size of the specified contact load cell array.

Implements yarp::dev::IContactLoadCellArrays.

Definition at line 676 of file MultipleAnalogSensorsRemapper.cpp.

◆ getContactLoadCellArrayStatus()

MAS_status MultipleAnalogSensorsRemapper::getContactLoadCellArrayStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IContactLoadCellArrays.

Definition at line 661 of file MultipleAnalogSensorsRemapper.cpp.

◆ getEncoderArrayMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getEncoderArrayMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfEncoderArrays()-1).
[out]outThe requested measure. The vector should be getEncoderArraySize(sens_index)-dimensional. The measure is expressed in Newton.
[out]timestampThe timestamp of the requested measure, expressed in seconds.

Implements yarp::dev::IEncoderArrays.

Definition at line 697 of file MultipleAnalogSensorsRemapper.cpp.

◆ getEncoderArrayName()

ReturnValue MultipleAnalogSensorsRemapper::getEncoderArrayName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Implements yarp::dev::IEncoderArrays.

Definition at line 692 of file MultipleAnalogSensorsRemapper.cpp.

◆ getEncoderArraySize()

size_t MultipleAnalogSensorsRemapper::getEncoderArraySize ( size_t  sens_index) const
overridevirtual

Get the size of the specified encoder array.

Implements yarp::dev::IEncoderArrays.

Definition at line 702 of file MultipleAnalogSensorsRemapper.cpp.

◆ getEncoderArrayStatus()

MAS_status MultipleAnalogSensorsRemapper::getEncoderArrayStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IEncoderArrays.

Definition at line 687 of file MultipleAnalogSensorsRemapper.cpp.

◆ getLinearVelocitySensorFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getLinearVelocitySensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Note
This is an implementation specific method, that may return the name of the sensor frame in a scenegraph
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::ILinearVelocitySensors.

Definition at line 559 of file MultipleAnalogSensorsRemapper.cpp.

◆ getLinearVelocitySensorMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getLinearVelocitySensorMeasure ( size_t  sens_index,
yarp::sig::Vector &  xyz,
double &  timestamp 
) const
overridevirtual

Get the last reading of the linear velocity sensor as x y z.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfLinearVelocitySensors()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in meters/second.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::ILinearVelocitySensors.

Definition at line 564 of file MultipleAnalogSensorsRemapper.cpp.

◆ getLinearVelocitySensorName()

ReturnValue MultipleAnalogSensorsRemapper::getLinearVelocitySensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::ILinearVelocitySensors.

Definition at line 554 of file MultipleAnalogSensorsRemapper.cpp.

◆ getLinearVelocitySensorStatus()

MAS_status MultipleAnalogSensorsRemapper::getLinearVelocitySensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::ILinearVelocitySensors.

Definition at line 549 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfContactLoadCellArrays()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfContactLoadCellArrays ( size_t &  num) const
overridevirtual

Get the number of contact load cell array exposed by this device.

Implements yarp::dev::IContactLoadCellArrays.

Definition at line 655 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfEncoderArrays()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfEncoderArrays ( size_t &  num) const
overridevirtual

Get the number of encoder arrays exposed by this device.

Implements yarp::dev::IEncoderArrays.

Definition at line 681 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfLinearVelocitySensors()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfLinearVelocitySensors ( size_t &  num) const
overridevirtual

Get the number of linear velocity sensors exposed by this device.

Implements yarp::dev::ILinearVelocitySensors.

Definition at line 543 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfOrientationSensors()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfOrientationSensors ( size_t &  num) const
overridevirtual

Get the number of orientation sensors exposed by this device.

Implements yarp::dev::IOrientationSensors.

Definition at line 569 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfPositionSensors()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfPositionSensors ( size_t &  num) const
overridevirtual

Get the number of position sensors exposed by this device.

Implements yarp::dev::IPositionSensors.

Definition at line 517 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfSixAxisForceTorqueSensors()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfSixAxisForceTorqueSensors ( size_t &  num) const
overridevirtual

Get the number of six axis force torque sensors exposed by this device.

Implements yarp::dev::ISixAxisForceTorqueSensors.

Definition at line 629 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfSkinPatches()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfSkinPatches ( size_t &  num) const
overridevirtual

Get the number of skin patches exposed by this device.

Implements yarp::dev::ISkinPatches.

Definition at line 707 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfTemperatureSensors()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfTemperatureSensors ( size_t &  num) const
overridevirtual

Get the number of temperature sensors exposed by this device.

Implements yarp::dev::ITemperatureSensors.

Definition at line 595 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfThreeAxisAngularAccelerometers()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfThreeAxisAngularAccelerometers ( size_t &  num) const
overridevirtual

Get the number of three axis angular accelerometers exposed by this device.

Implements yarp::dev::IThreeAxisAngularAccelerometers.

Definition at line 465 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfThreeAxisGyroscopes()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfThreeAxisGyroscopes ( size_t &  num) const
overridevirtual

Get the number of three axis gyroscopes exposed by this sensor.

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 414 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfThreeAxisLinearAccelerometers()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfThreeAxisLinearAccelerometers ( size_t &  num) const
overridevirtual

Get the number of three axis linear accelerometers exposed by this device.

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 439 of file MultipleAnalogSensorsRemapper.cpp.

◆ getNrOfThreeAxisMagnetometers()

ReturnValue MultipleAnalogSensorsRemapper::getNrOfThreeAxisMagnetometers ( size_t &  num) const
overridevirtual

Get the number of magnetometers exposed by this device.

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 491 of file MultipleAnalogSensorsRemapper.cpp.

◆ getOrientationSensorFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getOrientationSensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Note
This is an implementation specific method, that may return the name of the sensor frame in a scenegraph
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IOrientationSensors.

Definition at line 585 of file MultipleAnalogSensorsRemapper.cpp.

◆ getOrientationSensorMeasureAsRollPitchYaw()

ReturnValue MultipleAnalogSensorsRemapper::getOrientationSensorMeasureAsRollPitchYaw ( size_t  sens_index,
yarp::sig::Vector &  rpy,
double &  timestamp 
) const
overridevirtual

Get the last reading of the orientation sensor as roll pitch yaw.

If $ f $ is the lab or surface fixed frame, and $ s $ is the sensor-fixed frame, this methods returns the angles $ r \in [-180, 180] , p \in [-90, 90], y \in [-180, 180]$ such that

\[
{}^f R_s = RotZ\left(\frac{\pi}{180}y\right)*RotY\left(\frac{\pi}{180}p\right)*RotX\left(\frac{\pi}{180}r\right)
\]

with

\[
RotZ(\theta)
 =
 \begin{bmatrix}
     \cos(\theta)      & -\sin(\theta) & 0              \\
     \sin(\theta)      & \cos(\theta)  & 0              \\
     0                 & 0             & 1              \\
 \end{bmatrix}
\]

,

\[
RotY(\theta)
=
 \begin{bmatrix}
     \cos(\theta)      & 0             & \sin(\theta)   \\
     0                 & 1             & 0              \\
     -\sin(\theta)     & 0             & \cos(\theta)   \\
 \end{bmatrix}
\]

and

\[
RotX(\theta)
=
 \begin{bmatrix}
     1 & 0             & 0              \\
     0 & \cos(\theta)  & - \sin(\theta) \\
     0 & \sin(\theta)  & \cos(\theta)   \\
 \end{bmatrix}
\]

where $ {}^f R_s \in \mathbb{R}^{3 \times 3} $ is the rotation that left-multiplied by a 3d column vector expressed in $ s $ it returns it expressed in $ f $ .

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfOrientationSensors()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in degrees .
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IOrientationSensors.

Definition at line 590 of file MultipleAnalogSensorsRemapper.cpp.

◆ getOrientationSensorName()

ReturnValue MultipleAnalogSensorsRemapper::getOrientationSensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IOrientationSensors.

Definition at line 580 of file MultipleAnalogSensorsRemapper.cpp.

◆ getOrientationSensorStatus()

MAS_status MultipleAnalogSensorsRemapper::getOrientationSensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IOrientationSensors.

Definition at line 575 of file MultipleAnalogSensorsRemapper.cpp.

◆ getPositionSensorFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getPositionSensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Note
This is an implementation specific method, that may return the name of the sensor frame in a scenegraph
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IPositionSensors.

Definition at line 533 of file MultipleAnalogSensorsRemapper.cpp.

◆ getPositionSensorMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getPositionSensorMeasure ( size_t  sens_index,
yarp::sig::Vector &  xyz,
double &  timestamp 
) const
overridevirtual

Get the last reading of the position sensor as x y z.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfPositionSensors()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in meters.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IPositionSensors.

Definition at line 538 of file MultipleAnalogSensorsRemapper.cpp.

◆ getPositionSensorName()

ReturnValue MultipleAnalogSensorsRemapper::getPositionSensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IPositionSensors.

Definition at line 528 of file MultipleAnalogSensorsRemapper.cpp.

◆ getPositionSensorStatus()

MAS_status MultipleAnalogSensorsRemapper::getPositionSensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IPositionSensors.

Definition at line 523 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSixAxisForceTorqueSensorFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getSixAxisForceTorqueSensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Implements yarp::dev::ISixAxisForceTorqueSensors.

Definition at line 645 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSixAxisForceTorqueSensorMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getSixAxisForceTorqueSensorMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfSixAxisForceTorqueSensors()-1).
[out]outThe requested measure. The vector should be 6-dimensional. The measure is expressed in Newton for the first three elements, Newton Meters for the last three elements.
[out]timestampThe timestamp of the requested measure, expressed in seconds.

Implements yarp::dev::ISixAxisForceTorqueSensors.

Definition at line 650 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSixAxisForceTorqueSensorName()

ReturnValue MultipleAnalogSensorsRemapper::getSixAxisForceTorqueSensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Implements yarp::dev::ISixAxisForceTorqueSensors.

Definition at line 640 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSixAxisForceTorqueSensorStatus()

MAS_status MultipleAnalogSensorsRemapper::getSixAxisForceTorqueSensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::ISixAxisForceTorqueSensors.

Definition at line 635 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSkinPatchMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getSkinPatchMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfSkinPatches()-1).
[out]outThe requested measure. The vector should be getSkinPatchSize(sens_index)-dimensional. The measure is expressed in implementation-specific unit of measure.
[out]timestampThe timestamp of the requested measure, expressed in seconds.

Implements yarp::dev::ISkinPatches.

Definition at line 723 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSkinPatchName()

ReturnValue MultipleAnalogSensorsRemapper::getSkinPatchName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Implements yarp::dev::ISkinPatches.

Definition at line 718 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSkinPatchSize()

size_t MultipleAnalogSensorsRemapper::getSkinPatchSize ( size_t  sens_index) const
overridevirtual

Get the size of the specified skin patch.

Implements yarp::dev::ISkinPatches.

Definition at line 728 of file MultipleAnalogSensorsRemapper.cpp.

◆ getSkinPatchStatus()

MAS_status MultipleAnalogSensorsRemapper::getSkinPatchStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::ISkinPatches.

Definition at line 713 of file MultipleAnalogSensorsRemapper.cpp.

◆ getTemperatureSensorFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getTemperatureSensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Implements yarp::dev::ITemperatureSensors.

Definition at line 611 of file MultipleAnalogSensorsRemapper.cpp.

◆ getTemperatureSensorMeasure() [1/2]

ReturnValue MultipleAnalogSensorsRemapper::getTemperatureSensorMeasure ( size_t  sens_index,
double &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

TODO(traversaro) : make the method swig-friendly

Implements yarp::dev::ITemperatureSensors.

Definition at line 621 of file MultipleAnalogSensorsRemapper.cpp.

◆ getTemperatureSensorMeasure() [2/2]

ReturnValue MultipleAnalogSensorsRemapper::getTemperatureSensorMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfTemperatureSensors()-1).
[out]outThe requested measure. The vector should be 1-dimensional. The measure is expressed in celsius degrees .
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::ITemperatureSensors.

Definition at line 616 of file MultipleAnalogSensorsRemapper.cpp.

◆ getTemperatureSensorName()

ReturnValue MultipleAnalogSensorsRemapper::getTemperatureSensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Implements yarp::dev::ITemperatureSensors.

Definition at line 606 of file MultipleAnalogSensorsRemapper.cpp.

◆ getTemperatureSensorStatus()

MAS_status MultipleAnalogSensorsRemapper::getTemperatureSensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::ITemperatureSensors.

Definition at line 601 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisAngularAccelerometerFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisAngularAccelerometerFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisAngularAccelerometers.

Definition at line 481 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisAngularAccelerometerMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisAngularAccelerometerMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisAngularAccelerometers()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in degrees^2/seconds.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisAngularAccelerometers.

Definition at line 486 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisAngularAccelerometerName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisAngularAccelerometerName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisAngularAccelerometers.

Definition at line 476 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisAngularAccelerometerStatus()

MAS_status MultipleAnalogSensorsRemapper::getThreeAxisAngularAccelerometerStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IThreeAxisAngularAccelerometers.

Definition at line 471 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisGyroscopeFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisGyroscopeFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1).
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 429 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisGyroscopeMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisGyroscopeMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the gyroscope.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in degrees/seconds.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 434 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisGyroscopeName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisGyroscopeName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1).
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 425 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisGyroscopeStatus()

MAS_status MultipleAnalogSensorsRemapper::getThreeAxisGyroscopeStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1).

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 420 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisLinearAccelerometerFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisLinearAccelerometerFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 455 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisLinearAccelerometerMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisLinearAccelerometerMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisLinearAccelerometers()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in meters^2/seconds.
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 460 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisLinearAccelerometerName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisLinearAccelerometerName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 450 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisLinearAccelerometerStatus()

MAS_status MultipleAnalogSensorsRemapper::getThreeAxisLinearAccelerometerStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 445 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisMagnetometerFrameName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisMagnetometerFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 507 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisMagnetometerMeasure()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisMagnetometerMeasure ( size_t  sens_index,
yarp::sig::Vector &  out,
double &  timestamp 
) const
overridevirtual

Get the last reading of the specified sensor.

Parameters
[in]sens_indexThe index of the specified sensor (should be between 0 and getNrOfThreeAxisMagnetometers()-1).
[out]outThe requested measure. The vector should be 3-dimensional. The measure is expressed in tesla .
[out]timestampThe timestamp of the requested measure, expressed in seconds.
Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 512 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisMagnetometerName()

ReturnValue MultipleAnalogSensorsRemapper::getThreeAxisMagnetometerName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of the specified sensor.

Returns
false if an error occurred, true otherwise.

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 502 of file MultipleAnalogSensorsRemapper.cpp.

◆ getThreeAxisMagnetometerStatus()

MAS_status MultipleAnalogSensorsRemapper::getThreeAxisMagnetometerStatus ( size_t  sens_index) const
overridevirtual

Get the status of the specified sensor.

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 497 of file MultipleAnalogSensorsRemapper.cpp.

◆ open()

bool MultipleAnalogSensorsRemapper::open ( yarp::os::Searchable &  config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 79 of file MultipleAnalogSensorsRemapper.cpp.


The documentation for this class was generated from the following files: