|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_DEV_MULTIPLEANALOGSENSORSREMAPPER_MULTIPLEANALOGSENSORSREMAPPER_H
11 #define YARP_DEV_MULTIPLEANALOGSENSORSREMAPPER_MULTIPLEANALOGSENSORSREMAPPER_H
102 bool m_verbose{
false};
107 class SensorInSubDevice
110 SensorInSubDevice(): subDevice(0), indexInSubDevice(0)
112 SensorInSubDevice(
size_t p_subDevice,
size_t p_indexInSubDevice):
113 subDevice(p_subDevice), indexInSubDevice(p_indexInSubDevice) {}
116 size_t indexInSubDevice;
119 std::vector< std::vector<std::string> > m_remappedSensors;
120 std::vector< std::vector<SensorInSubDevice> > m_indicesMap;
122 std::vector<yarp::dev::IThreeAxisGyroscopes*> m_iThreeAxisGyroscopes;
123 std::vector<yarp::dev::IThreeAxisLinearAccelerometers*> m_iThreeAxisLinearAccelerometers;
124 std::vector<yarp::dev::IThreeAxisMagnetometers*> m_iThreeAxisMagnetometers;
125 std::vector<yarp::dev::IOrientationSensors*> m_iOrientationSensors;
126 std::vector<yarp::dev::ITemperatureSensors*> m_iTemperatureSensors;
127 std::vector<yarp::dev::ISixAxisForceTorqueSensors*> m_iSixAxisForceTorqueSensors;
128 std::vector<yarp::dev::IContactLoadCellArrays*> m_iContactLoadCellArrays;
129 std::vector<yarp::dev::IEncoderArrays*> m_iEncoderArrays;
130 std::vector<yarp::dev::ISkinPatches*> m_iSkinPatches;
131 std::vector<yarp::dev::IPositionSensors*> m_iPositionSensors;
139 template<
typename Interface>
142 const std::vector<Interface *>& subDeviceVec,
144 template<
typename Interface>
146 size_t& sens_index, std::string &name,
147 const std::vector<Interface *>& subDeviceVec,
148 bool (Interface::*methodPtr)(
size_t, std::string&)
const)
const;
149 template<
typename Interface>
151 size_t& sens_index, std::string &name,
152 const std::vector<Interface *>& subDeviceVec,
153 bool (Interface::*methodPtr)(
size_t, std::string&)
const)
const;
154 template<
typename Interface>
157 const std::vector<Interface *>& subDeviceVec,
159 template<
typename Interface>
162 const std::vector<Interface *>& subDeviceVec,
163 size_t (Interface::*methodPtr)(
size_t)
const)
const;
165 template<
typename Interface>
167 std::vector<Interface *>& subDeviceVec,
169 bool (Interface::*getNameMethodPtr)(
size_t, std::string&)
const,
170 size_t (Interface::*getNrOfSensorsMethodPtr)()
const);
175 bool close()
override;
bool getContactLoadCellArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool getSixAxisForceTorqueSensorFrameName(size_t sens_index, std::string &frame) const override
Get the name of the frame of the specified sensor.
yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus(size_t sens_index) const override
Get the status of the specified sensor.
size_t getNrOfThreeAxisGyroscopes() const override
Get the number of three axis gyroscopes exposed by this sensor.
yarp::dev::MAS_status getSixAxisForceTorqueSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
@ SixAxisForceTorqueSensors
bool getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
size_t getNrOfSkinPatches() const override
Get the number of skin patches exposed by this device.
A base class for nested structures that can be searched.
size_t getNrOfThreeAxisMagnetometers() const override
Get the number of magnetometers exposed by this device.
bool getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) 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.
bool getOrientationSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getEncoderArrayName(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 getOrientationSensorFrameName(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.
bool getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the gyroscope.
Interface implemented by all device drivers.
bool detachAll() override
Detach the object (you must have first called attach).
bool getTemperatureSensorMeasure(size_t sens_index, double &out, double ×tamp) const override
Get the last reading of the specified sensor.
MAS_SensorType
Internal identifier of the type of sensors.
Device interface to one or multiple three axis magnetometers.
yarp::dev::MAS_status getEncoderArrayStatus(size_t sens_index) const override
Get the status of the specified sensor.
size_t getNrOfContactLoadCellArrays() const override
Get the number of contact load cell array exposed by this device.
Device interface to one or multiple three axis gyroscopes.
Device interface to one or multiple orientation sensors, such as IMUs with on board estimation algori...
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::MAS_status getThreeAxisGyroscopeStatus(size_t sens_index) const override
Get the status of the specified sensor.
bool getSkinPatchName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getThreeAxisLinearAccelerometerName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
bool getThreeAxisLinearAccelerometerFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
bool getThreeAxisMagnetometerName(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.
bool getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
Device interface to one or more groups (patches) of tactile sensors (skin).
Device interface to one or multiple six axis force torque sensor.
@ ThreeAxisLinearAccelerometers
bool getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
size_t getNrOfOrientationSensors() const override
Get the number of orientation sensors exposed by this device.
size_t getContactLoadCellArraySize(size_t sens_index) const override
Get the size of the specified contact load cell array.
yarp::dev::MAS_status getContactLoadCellArrayStatus(size_t sens_index) const override
Get the status of the specified sensor.
size_t getNrOfPositionSensors() const override
Get the number of position sensors 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.
Device interface to one or multiple three axis linear accelerometers.
bool getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
size_t getNrOfEncoderArrays() const override
Get the number of encoder arrays exposed by this device.
bool getPositionSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
Device interface to one or multiple arrays of encoders.
yarp::dev::MAS_status getPositionSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
size_t getNrOfSixAxisForceTorqueSensors() const override
Get the number of six axis force torque sensors exposed by this device.
bool getPositionSensorMeasure(size_t sens_index, yarp::sig::Vector &xyz, double ×tamp) const override
Get the last reading of the position sensor as x y z.
bool getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool getContactLoadCellArrayName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
multipleanalogsensorsremapper : device that takes a list of sensor from multiple analog sensors devic...
Interface for an object that can wrap/attach to to another.
bool getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
MAS_status
Status of a given analog sensor exposed by a multiple analog sensors interface.
bool attachAll(const yarp::dev::PolyDriverList &p) override
MultipeWrapper methods.
yarp::dev::MAS_status getSkinPatchStatus(size_t sens_index) const override
Get the status of the specified sensor.
bool close() override
Close the DeviceDriver.
Device interface to one or multiple temperature sensors.
Device interface to one or multiple position sensors, such as UWB localization sensors.
bool getTemperatureSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
bool getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
size_t getNrOfTemperatureSensors() const override
Get the number of temperature sensors exposed by this device.
size_t getEncoderArraySize(size_t sens_index) const override
Get the size of the specified encoder array.
bool getPositionSensorFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::MAS_status getTemperatureSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
A class for storing options and configuration information.