diff --git a/source/RobotAPI/components/units/BusInspectionUnitObserver.h b/source/RobotAPI/components/units/BusInspectionUnitObserver.h index 5002dcddd02eadb4f2098a470c27dc4c68bb70fe..3eded4de0a5f465b1680bf08180a327791ba8090 100644 --- a/source/RobotAPI/components/units/BusInspectionUnitObserver.h +++ b/source/RobotAPI/components/units/BusInspectionUnitObserver.h @@ -33,11 +33,11 @@ namespace armarx * \brief */ class BusInspectionUnitObserverPropertyDefinitions: - public ComponentPropertyDefinitions + public ObserverPropertyDefinitions { public: BusInspectionUnitObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) + ObserverPropertyDefinitions(prefix) { defineOptionalProperty<std::string>("BusInspectionUnitTopicName", "HALCycleTimes", "Name of the BusInspectionUnit Topic"); } diff --git a/source/RobotAPI/components/units/ForceTorqueObserver.cpp b/source/RobotAPI/components/units/ForceTorqueObserver.cpp index 15f074fe8bdbd5a74cb0d1040f3ac3f1092f3fc5..3da9203909f6cea42ab04cd05594731352c73a96 100644 --- a/source/RobotAPI/components/units/ForceTorqueObserver.cpp +++ b/source/RobotAPI/components/units/ForceTorqueObserver.cpp @@ -116,7 +116,7 @@ void ForceTorqueObserver::visualizerFunction() return; } float maxTorque = getProperty<float>("MaxExpectedTorqueValue"); - float torqueVisuDeathZone = getProperty<float>("TorqueVisuDeathZone"); + float torqueVisuDeadZone = getProperty<float>("TorqueVisuDeadZone"); float arrowLength = getProperty<float>("MaxForceArrowLength").getValue(); float forceFactor = getProperty<float>("ForceVisualizerFactor").getValue(); auto channels = getAvailableChannels(false); @@ -162,7 +162,7 @@ void ForceTorqueObserver::visualizerFunction() Eigen::Vector3f dirYglobal = FramedDirection(Eigen::Vector3f::UnitY(), torque->frame, torque->agent).toGlobalEigen(localRobot); Eigen::Vector3f dirZglobal = FramedDirection(Eigen::Vector3f::UnitZ(), torque->frame, torque->agent).toGlobalEigen(localRobot); // ARMARX_INFO << channel.first << VAROUT(torque) << VAROUT(dirXglobal) << VAROUT(dirYglobal) << VAROUT(dirZglobal); - if (fabs(torque->x) > torqueVisuDeathZone) + if (fabs(torque->x) > torqueVisuDeadZone) { batchPrx->setCircleArrowVisu("Torques", "TorqueX" + channel.first, @@ -179,7 +179,7 @@ void ForceTorqueObserver::visualizerFunction() batchPrx->removeCircleVisu("Torques", "TorqueX" + channel.first); } - if (fabs(torque->y) > torqueVisuDeathZone) + if (fabs(torque->y) > torqueVisuDeadZone) { batchPrx->setCircleArrowVisu("Torques", "TorqueY" + channel.first, @@ -197,7 +197,7 @@ void ForceTorqueObserver::visualizerFunction() "TorqueY" + channel.first); } - if (fabs(torque->z) > torqueVisuDeathZone) + if (fabs(torque->z) > torqueVisuDeadZone) { batchPrx->setCircleArrowVisu("Torques", "TorqueZ" + channel.first, diff --git a/source/RobotAPI/components/units/ForceTorqueObserver.h b/source/RobotAPI/components/units/ForceTorqueObserver.h index 3523590c4885f942af7e9acde190c3891aaf106a..023ad353e1508ac719b1b753608eb6bd11a71cef 100644 --- a/source/RobotAPI/components/units/ForceTorqueObserver.h +++ b/source/RobotAPI/components/units/ForceTorqueObserver.h @@ -35,11 +35,11 @@ namespace armarx * \brief */ class ForceTorqueObserverPropertyDefinitions: - public ComponentPropertyDefinitions + public ObserverPropertyDefinitions { public: ForceTorqueObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) + ObserverPropertyDefinitions(prefix) { defineRequiredProperty<std::string>("ForceTorqueTopicName", "Name of the ForceTorqueUnit Topic"); defineOptionalProperty<bool>("VisualizeForce", true, "Visualize the force with an arrow in the debug drawer"); @@ -47,7 +47,7 @@ namespace armarx defineOptionalProperty<int>("VisualizeForceUpdateFrequency", 30, "Frequency with which the force is visualized"); defineOptionalProperty<float>("ForceVisualizerFactor", 0.01f, "Factor by which the forces are scaled to fit into 0..1 (only for visulization) "); defineOptionalProperty<float>("MaxExpectedTorqueValue", 30, "The torque visualization circle reaches the full circle at this value"); - defineOptionalProperty<float>("TorqueVisuDeathZone", 1, "Torques below this threshold are not visualized."); + defineOptionalProperty<float>("TorqueVisuDeadZone", 1, "Torques below this threshold are not visualized."); defineOptionalProperty<float>("MaxForceArrowLength", 150, "Length of the force visu arrow in mm"); defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used"); defineOptionalProperty<std::string>("SensorRobotNodeMapping", "", "Triplets of sensor node name, target frame robot node name and optional channel name: Sensor values are also reported in the frame of the robot node: e. g. SensorName:RobotNodeName[:ChannelName],SensorName2:RobotNodeName2[:ChannelName2]"); diff --git a/source/RobotAPI/components/units/HapticObserver.h b/source/RobotAPI/components/units/HapticObserver.h index 96f0704c1eca256a5ad9245ad0bc4c1c298ebefe..5ecbe9f1a8ab9422534ea463ba023c455a29812a 100644 --- a/source/RobotAPI/components/units/HapticObserver.h +++ b/source/RobotAPI/components/units/HapticObserver.h @@ -39,11 +39,11 @@ namespace armarx * \brief */ class HapticObserverPropertyDefinitions: - public ComponentPropertyDefinitions + public ObserverPropertyDefinitions { public: HapticObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) + ObserverPropertyDefinitions(prefix) { defineOptionalProperty<std::string>("HapticTopicName", "HapticValues", "Name of the HapticUnit Topic"); } diff --git a/source/RobotAPI/components/units/InertialMeasurementUnitObserver.h b/source/RobotAPI/components/units/InertialMeasurementUnitObserver.h index 4265a8729f9ff8301ef1717587b44cfeced50dc4..51fdfd7960b9ac4aee4c93accf6b8b10650ead2c 100644 --- a/source/RobotAPI/components/units/InertialMeasurementUnitObserver.h +++ b/source/RobotAPI/components/units/InertialMeasurementUnitObserver.h @@ -38,11 +38,11 @@ namespace armarx * \brief */ class InertialMeasurementUnitObserverPropertyDefinitions: - public ComponentPropertyDefinitions + public ObserverPropertyDefinitions { public: InertialMeasurementUnitObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) + ObserverPropertyDefinitions(prefix) { defineOptionalProperty<std::string>("IMUTopicName", "IMUValues", "Name of the IMU Topic."); defineOptionalProperty<std::string>("DebugDrawerTopic", "DebugDrawerUpdates", "Name of the DebugDrawerTopic"); diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.cpp b/source/RobotAPI/components/units/KinematicUnitObserver.cpp index 6e862edf25b145c3290f97115a0ae2a92eb1cc4b..b0cdbf2ff435e957c171f9d29e0c818f58ff73f8 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.cpp +++ b/source/RobotAPI/components/units/KinematicUnitObserver.cpp @@ -279,14 +279,14 @@ void KinematicUnitObserver::nameValueMapToDataFields(const std::string& channelN boost::unordered_map< ::std::string, ::armarx::VariantBasePtr> map; if (timestamp < 0) { - for (const auto & it : nameValueMap) + for (const auto& it : nameValueMap) { map[it.first] = new Variant(it.second); } } else { - for (const auto & it : nameValueMap) + for (const auto& it : nameValueMap) { map[it.first] = new TimedVariant(new Variant(it.second), IceUtil::Time::microSeconds(timestamp)); } @@ -302,6 +302,6 @@ void KinematicUnitObserver::nameValueMapToDataFields(const std::string& channelN PropertyDefinitionsPtr KinematicUnitObserver::createPropertyDefinitions() { - return PropertyDefinitionsPtr(new KinematicUnitPropertyDefinitions( + return PropertyDefinitionsPtr(new KinematicUnitObserverPropertyDefinitions( getConfigIdentifier())); } diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.h b/source/RobotAPI/components/units/KinematicUnitObserver.h index 3d7948296ddac3333f5ccef1f20d5b0721ff7c9a..2baecf1ba803c8c75b9ac3353e6d1c611284206c 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.h +++ b/source/RobotAPI/components/units/KinematicUnitObserver.h @@ -39,6 +39,19 @@ namespace armarx ARMARX_CREATE_CHECK(KinematicUnitObserver, equals) ARMARX_CREATE_CHECK(KinematicUnitObserver, larger) + class KinematicUnitObserverPropertyDefinitions: + public ObserverPropertyDefinitions + { + public: + KinematicUnitObserverPropertyDefinitions(std::string prefix): + ObserverPropertyDefinitions(prefix) + { + defineRequiredProperty<std::string>("RobotNodeSetName", "Robot node set name as defined in robot xml file, e.g. 'LeftArm'"); + defineRequiredProperty<std::string>("RobotFileName", "Robot file name, e.g. robot_model.xml"); + defineOptionalProperty<std::string>("RobotFileNameProject", "", "Project in which the robot filename is located (if robot is loaded from an external project)"); + } + }; + /** * \class KinematicUnitObserver * \ingroup RobotAPI-SensorActorUnits-observers diff --git a/source/RobotAPI/components/units/PlatformUnitObserver.cpp b/source/RobotAPI/components/units/PlatformUnitObserver.cpp index 01c6bfd20e173a4ad2893ebd99782958d47d7898..7a4c166d1783af3864a1185c5d5983d63fcaada9 100644 --- a/source/RobotAPI/components/units/PlatformUnitObserver.cpp +++ b/source/RobotAPI/components/units/PlatformUnitObserver.cpp @@ -110,6 +110,6 @@ void PlatformUnitObserver::nameValueMapToDataFields(std::string channelName, ::I PropertyDefinitionsPtr PlatformUnitObserver::createPropertyDefinitions() { - return PropertyDefinitionsPtr(new PlatformUnitPropertyDefinitions( + return PropertyDefinitionsPtr(new PlatformUnitObserverPropertyDefinitions( getConfigIdentifier())); } diff --git a/source/RobotAPI/components/units/PlatformUnitObserver.h b/source/RobotAPI/components/units/PlatformUnitObserver.h index 9b4709a0d0fe816e06db3412780dfac819310536..4f47296b450b27f0d51cc40206fce87f41f6db9e 100644 --- a/source/RobotAPI/components/units/PlatformUnitObserver.h +++ b/source/RobotAPI/components/units/PlatformUnitObserver.h @@ -41,6 +41,21 @@ namespace armarx ARMARX_CREATE_CHECK(PlatformUnitObserver, larger) ARMARX_CREATE_CHECK(PlatformUnitObserver, inrange) + /** + * \class PlatformUnitPropertyDefinitions + * \brief Defines all necessary properties for armarx::PlatformUnit + */ + class PlatformUnitObserverPropertyDefinitions: + public ObserverPropertyDefinitions + { + public: + PlatformUnitObserverPropertyDefinitions(std::string prefix): + ObserverPropertyDefinitions(prefix) + { + defineOptionalProperty<std::string>("PlatformName", "Platform", "Name of the platform (will publish values on PlatformName + 'State')"); + } + }; + /** * \class PlatformUnitObserver * \ingroup RobotAPI-SensorActorUnits-observers diff --git a/source/RobotAPI/components/units/TCPControlUnitObserver.h b/source/RobotAPI/components/units/TCPControlUnitObserver.h index 263833c7e264755af68cd9a649774fda46edfe80..4da4a7da8c631705f7b7521036946198fa811f05 100644 --- a/source/RobotAPI/components/units/TCPControlUnitObserver.h +++ b/source/RobotAPI/components/units/TCPControlUnitObserver.h @@ -32,11 +32,11 @@ namespace armarx * \brief */ class TCPControlUnitObserverPropertyDefinitions: - public ComponentPropertyDefinitions + public ObserverPropertyDefinitions { public: TCPControlUnitObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) + ObserverPropertyDefinitions(prefix) { defineOptionalProperty<std::string>("TCPControlUnitName", "TCPControlUnit", "Name of the TCPControlUnit"); }