diff --git a/data/RobotAPI/VariantInfo-RobotAPI.xml b/data/RobotAPI/VariantInfo-RobotAPI.xml index 0fb95ad0cf6503f17f9a51877444e78bd8288bf5..c83166f81539e289172c8c1e67b2b2eab4c4bcc8 100644 --- a/data/RobotAPI/VariantInfo-RobotAPI.xml +++ b/data/RobotAPI/VariantInfo-RobotAPI.xml @@ -53,6 +53,14 @@ propertyName="IMUObserverName" propertyIsOptional="true" propertyDefaultValue="InertialMeasurementUnitObserver" /> + <Proxy include="RobotAPI/interface/units/OrientedTactileSensorUnit.h" + humanName="Oriented Tactile Sensor Unit Observer" + typeName="OrientedTactileSensorUnitObserverInterfacePrx" + memberName="orientedTactileSensorUnitObserver" + getterName="getOrientedTactileSensorUnitObserver" + propertyName="OrientedTactileSensorUnitObserverName" + propertyIsOptional="true" + propertyDefaultValue="OrientedTactileSensorUnitObserver" /> <Proxy include="RobotAPI/interface/units/ForceTorqueUnit.h" humanName="Force Torque Unit Observer" typeName="ForceTorqueUnitObserverInterfacePrx" diff --git a/scenarios/OrientedTactileSensor/OrientedTactileSensor.scx b/scenarios/OrientedTactileSensor/OrientedTactileSensor.scx index 443162d742ef69c2d3d6bedc728ac05494254fc2..3d823be1c87cb0e97ffdc4ba4549a6fd5998fc75 100644 --- a/scenarios/OrientedTactileSensor/OrientedTactileSensor.scx +++ b/scenarios/OrientedTactileSensor/OrientedTactileSensor.scx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<scenario name="OrientedTactileSensor" lastChange="2017-03-06.17:30:06" creation="2017-02-27.01:48:55 PM" globalConfigName="./config/global.cfg" package="RobotAPI"> +<scenario name="OrientedTactileSensor" lastChange="2017-03-09.19:07:21" creation="2017-02-27.01:48:55 PM" globalConfigName="./config/global.cfg" package="RobotAPI"> <application name="OrientedTactileSensorUnitApp" instance="" package="RobotAPI"/> <application name="OrientedTactileSensorUnitObserverApp" instance="" package="RobotAPI"/> </scenario> diff --git a/scenarios/OrientedTactileSensor/config/OrientedTactileSensorUnitApp.cfg b/scenarios/OrientedTactileSensor/config/OrientedTactileSensorUnitApp.cfg index 1ec6764f36d51be5c6b8501bb6ef5e5046114c79..14eba70f342c50478b72cb1ecb5b23f280aab6f4 100644 --- a/scenarios/OrientedTactileSensor/config/OrientedTactileSensorUnitApp.cfg +++ b/scenarios/OrientedTactileSensor/config/OrientedTactileSensorUnitApp.cfg @@ -130,12 +130,12 @@ ArmarX.OrientedTactileSensorUnit.SamplesPressure = 20 ArmarX.OrientedTactileSensorUnit.SamplesRotation = 20 -# ArmarX.OrientedTactileSensorUnit.SerialInterfaceDevice: The serial device the arduino is connected to. +# ArmarX.OrientedTactileSensorUnit.SerialInterfaceDevice: Custom Property # Attributes: -# - Default: /dev/ttyACM0 +# - Default: ::NOT_DEFINED:: # - Case sensitivity: no # - Required: no -ArmarX.OrientedTactileSensorUnit.SerialInterfaceDevice = /dev/ttyACM0 +ArmarX.OrientedTactileSensorUnit.SerialInterfaceDevice = /dev/ttyACM3 # ArmarX.OrientedTactileSensorUnit.TopicName: Name of the topic on which the sensor values are provided diff --git a/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.cpp b/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.cpp index eaafd8ecaef369e3126bd3b548a8d21378f3ff1b..858081e665f71f979fbfd9a27406f1922c936c52 100644 --- a/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.cpp +++ b/source/RobotAPI/drivers/OrientedTactileSensor/OrientedTactileSensorUnit.cpp @@ -227,36 +227,44 @@ OrientedTactileSensorUnit::SensorData OrientedTactileSensorUnit::getValues(std:: std::string space = " "; bool OrientedTactileSensorUnit::loadCalibration() { + ARMARX_INFO << "loadCalibration started"; std::string calibrationStream = getProperty<std::string>("CalibrationData").getValue(); std::string arduinoLine; while (arduinoLine.find("mode") == std::string::npos) { getline(arduino, arduinoLine, '\n'); + ARMARX_INFO << "ARDUINO: '" << arduinoLine << "'"; } arduino.close(); + ARMARX_INFO << "opening arduino out mode"; arduino.open(getProperty<std::string>("SerialInterfaceDevice").getValue(), std::ios::out); arduino << "load"; arduino.flush(); arduino.close(); + ARMARX_INFO << "opening arduino in mode"; arduino.open(getProperty<std::string>("SerialInterfaceDevice").getValue(), std::ios::in); while (arduinoLine.find("calibration data") == std::string::npos) { getline(arduino, arduinoLine, '\n'); + ARMARX_INFO << "ARDUINO: '" << arduinoLine << "'"; } arduino.close(); + ARMARX_INFO << "opening arduino out mode"; arduino.open(getProperty<std::string>("SerialInterfaceDevice").getValue(), std::ios::out); arduino << calibrationStream; arduino.flush(); arduino.close(); + ARMARX_INFO << "opening arduino in mode"; arduino.open(getProperty<std::string>("SerialInterfaceDevice").getValue(), std::ios::in); while (arduinoLine.find("Calibration Sucessfull") == std::string::npos) { getline(arduino, arduinoLine, '\n'); + ARMARX_INFO << "ARDUINO: '" << arduinoLine << "'"; } return true; }