32 return "ThreeAxisGyroscopes";
35 return "ThreeAxisLinearAccelerometers";
38 return "ThreeAxisAngularAccelerometers";
41 return "ThreeAxisMagnetometers";
44 return "OrientationSensors";
47 return "TemperatureSensors";
50 return "SixAxisForceTorqueSensors";
53 return "ContactLoadCellArrays";
56 return "EncoderArrays";
62 return "PositionSensors";
65 return "LinearVelocitySensors";
69 return "MAS_getTagFromEnum_notExpectedEnum";
84 m_verbose = (prop.
check(
"verbose",
"if present, give detailed output"));
90 if(!parseOptions(prop))
127bool MultipleAnalogSensorsRemapper::parseOptions(
const Property& prop)
150#define MAS_CALL_MEMBER_FN(object, ptrToMember) ((*object).*(ptrToMember))
153template<
typename Interface>
164 for(
int p=0; p<
polylist.size(); p++)
193 <<
"Sensor ambiguity: sensor with name"
195 <<
"present on both device"
209 for(
size_t i=0; i < m_remappedSensors[
sensorType].size(); i++)
211 std::string name = m_remappedSensors[
sensorType][i];
265 m_iThreeAxisGyroscopes.resize(0);
266 m_iThreeAxisLinearAccelerometers.resize(0);
267 m_iThreeAxisAngularAccelerometers.resize(0);
268 m_iThreeAxisMagnetometers.resize(0);
269 m_iPositionSensors.resize(0);
270 m_iLinearVelocitySensors.resize(0);
271 m_iOrientationSensors.resize(0);
272 m_iTemperatureSensors.resize(0);
273 m_iSixAxisForceTorqueSensors.resize(0);
274 m_iContactLoadCellArrays.resize(0);
275 m_iEncoderArrays.resize(0);
276 m_iSkinPatches.resize(0);
277 m_indicesMap.resize(0);
282template<
typename Interface>
302template<
typename Interface>
322template<
typename Interface>
343template<
typename Interface>
363template<
typename Interface>
const size_t MAS_NrOfSensorTypes
#define MAS_CALL_MEMBER_FN(object, ptrToMember)
bool getVectorOfStringFromListInConfig(const std::string &key, const yarp::os::Searchable &config, std::vector< std::string > &vectorOfStrings)
std::string MAS_getTagFromEnum(const MAS_SensorType type)
Internal identifier of the type of sensors.
MAS_SensorType
Internal identifier of the type of sensors.
@ ThreeAxisAngularAccelerometers
@ ThreeAxisLinearAccelerometers
@ SixAxisForceTorqueSensors
#define ReturnValue_error_input_out_of_bounds
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 getNrOfThreeAxisMagnetometers(size_t &num) const override
Get the number of magnetometers exposed by this device.
yarp::dev::ReturnValue getOrientationSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
yarp::dev::ReturnValue getNrOfLinearVelocitySensors(size_t &num) const override
Get the number of linear velocity 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::ReturnValue getThreeAxisMagnetometerFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame 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 getThreeAxisGyroscopeMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the gyroscope.
yarp::dev::ReturnValue getNrOfThreeAxisAngularAccelerometers(size_t &num) const override
Get the number of three axis angular accelerometers exposed by this device.
yarp::dev::ReturnValue getNrOfEncoderArrays(size_t &num) const override
Get the number of encoder arrays exposed by this device.
yarp::dev::ReturnValue getLinearVelocitySensorMeasure(size_t sens_index, yarp::sig::Vector &xyz, double ×tamp) const override
Get the last reading of the linear velocity sensor as x y z.
yarp::dev::ReturnValue getSixAxisForceTorqueSensorName(size_t sens_index, std::string &name) const override
Get the name 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 getLinearVelocitySensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
bool close() override
Close the DeviceDriver.
yarp::dev::MAS_status getThreeAxisMagnetometerStatus(size_t sens_index) const override
Get the status 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.
bool detachAll() override
Detach the object (you must have first called attach).
yarp::dev::MAS_status getOrientationSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::ReturnValue getThreeAxisAngularAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool attachAll(const yarp::dev::PolyDriverList &p) override
MultipeWrapper methods.
yarp::dev::ReturnValue getContactLoadCellArrayName(size_t sens_index, std::string &name) const override
Get the name 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::MAS_status getThreeAxisAngularAccelerometerStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::ReturnValue getNrOfTemperatureSensors(size_t &num) const override
Get the number of temperature sensors exposed by this device.
yarp::dev::ReturnValue getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) 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::ReturnValue getThreeAxisLinearAccelerometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
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::MAS_status getPositionSensorStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::ReturnValue getNrOfSkinPatches(size_t &num) const override
Get the number of skin patches exposed by this device.
size_t getEncoderArraySize(size_t sens_index) const override
Get the size of the specified encoder array.
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 getThreeAxisLinearAccelerometerName(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 ×tamp) const override
Get the last reading of the specified sensor.
yarp::dev::ReturnValue 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.
yarp::dev::MAS_status getSkinPatchStatus(size_t sens_index) const override
Get the status of the specified sensor.
yarp::dev::MAS_status getEncoderArrayStatus(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 getPositionSensorName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus(size_t sens_index) const override
Get the status 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::ReturnValue 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.
yarp::dev::ReturnValue getNrOfPositionSensors(size_t &num) const override
Get the number of position sensors exposed by this device.
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::MAS_status getSixAxisForceTorqueSensorStatus(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 getPositionSensorFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
yarp::dev::ReturnValue getEncoderArrayMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
yarp::dev::MAS_status getContactLoadCellArrayStatus(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.
yarp::dev::ReturnValue getNrOfThreeAxisGyroscopes(size_t &num) const override
Get the number of three axis gyroscopes exposed by this sensor.
size_t getSkinPatchSize(size_t sens_index) const override
Get the size of the specified skin patch.
yarp::dev::ReturnValue getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading of the specified sensor.
yarp::dev::ReturnValue getNrOfThreeAxisLinearAccelerometers(size_t &num) const override
Get the number of three axis linear accelerometers exposed by this device.
yarp::dev::ReturnValue getThreeAxisGyroscopeName(size_t sens_index, std::string &name) const override
Get the name of the specified sensor.
yarp::dev::ReturnValue getThreeAxisMagnetometerMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override
Get the last reading 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::MAS_status getThreeAxisGyroscopeStatus(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 getTemperatureSensorMeasure(size_t sens_index, double &out, double ×tamp) const override
Get the last reading 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 getTemperatureSensorFrameName(size_t sens_index, std::string &frameName) const override
Get the name of the frame of the specified sensor.
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 ×tamp) 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 ×tamp) 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.
virtual yarp::dev::ReturnValue getOrientationSensorMeasureAsRollPitchYaw(size_t sens_index, yarp::sig::Vector &rpy, double ×tamp) 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.
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 ×tamp) 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.
virtual yarp::dev::ReturnValue getSixAxisForceTorqueSensorMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) 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.
virtual yarp::dev::ReturnValue getSkinPatchMeasure(size_t sens_index, yarp::sig::Vector &out, double ×tamp) 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.
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 ×tamp) 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 ×tamp) 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.
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 ×tamp) const =0
Get the last reading of the gyroscope.
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 ×tamp) 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.
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 ×tamp) 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.
A simple collection of objects that can be described and transmitted in a portable way.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
A base class for nested structures that can be searched.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Bottle * asList() const
Get list value.
#define yCInfo(component,...)
#define yCError(component,...)
#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.
An interface to the operating system, including Port based communication.
The main, catch-all namespace for YARP.