diff --git a/source/RobotAPI/components/units/HeadIKUnit.cpp b/source/RobotAPI/components/units/HeadIKUnit.cpp index f5910ce24e112d38337212cdfe68adde70a230b1..acba6b5dadb484cc1b581c92863133613ee49b0a 100644 --- a/source/RobotAPI/components/units/HeadIKUnit.cpp +++ b/source/RobotAPI/components/units/HeadIKUnit.cpp @@ -26,7 +26,7 @@ namespace armarx usingProxy(getProperty<std::string>("KinematicUnitName").getValue()); usingProxy("RobotStateComponent"); - usingTopic("RobotState"); + usingTopic(getProperty<std::string>("RobotStateTopicName").getValue()); cycleTime = getProperty<int>("CycleTime").getValue(); offeringTopic("DebugDrawerUpdates"); diff --git a/source/RobotAPI/components/units/HeadIKUnit.h b/source/RobotAPI/components/units/HeadIKUnit.h index 0805fd78086eddc33e87e2b5c4bd49e71a112049..4147362a57b1e3e1aa3daf38ac8de0ff415dc363 100644 --- a/source/RobotAPI/components/units/HeadIKUnit.h +++ b/source/RobotAPI/components/units/HeadIKUnit.h @@ -47,6 +47,7 @@ namespace armarx ComponentPropertyDefinitions(prefix) { defineRequiredProperty<std::string>("KinematicUnitName","Name of the KinematicUnit Proxy"); + defineOptionalProperty<std::string>("RobotStateTopicName","RobotState","Name of the RobotComponent State topic."); defineOptionalProperty<int>("CycleTime", 30, "Cycle time of the tcp control in ms"); } }; diff --git a/source/RobotAPI/components/units/TCPControlUnit.cpp b/source/RobotAPI/components/units/TCPControlUnit.cpp index 43242f839b62ddb3096e26f0e1dd907c0b187bd4..846a9ce54a71e7fff482c28ed3f4097fecbbb992 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.cpp +++ b/source/RobotAPI/components/units/TCPControlUnit.cpp @@ -57,7 +57,7 @@ namespace armarx usingProxy("RobotStateComponent"); usingProxy("DebugObserver"); offeringTopic(topicName); - usingTopic("RobotState"); + usingTopic(getProperty<std::string>("RobotStateTopicName").getValue()); cycleTime = getProperty<int>("CycleTime").getValue(); maxJointVelocity = getProperty<float>("MaxJointVelocity").getValue(); diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index 6b585979dd667e4b50118375038a421c82c7fd71..616dadbedcd18579392e6f973fc16e68093a9f1a 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -46,6 +46,7 @@ namespace armarx ComponentPropertyDefinitions(prefix) { defineRequiredProperty<std::string>("KinematicUnitName","Name of the KinematicUnit Proxy"); + defineOptionalProperty<std::string>("RobotStateTopicName","RobotState","Name of the RobotComponent State topic."); defineOptionalProperty<float>("MaxJointVelocity",30.f/180*3.141, "Maximal joint velocity in rad/sec"); defineRequiredProperty<std::string>("RobotFileName", "Robot file name, e.g. robot_model.xml"); defineOptionalProperty<int>("CycleTime", 30, "Cycle time of the tcp control in ms");