diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp index de0dde42b8e8670e6c3953405ad59993eca07460..af6a391295c5dd8326addd850613584344237452 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp @@ -56,6 +56,21 @@ namespace armarx } + RobotStatePropertyDefinitions::RobotStatePropertyDefinitions(std::string prefix) : + ComponentPropertyDefinitions(prefix) + { + defineRequiredProperty<std::string>("RobotNodeSetName", "Set of nodes that is controlled by the KinematicUnit"); + defineRequiredProperty<std::string>("RobotFileName", "Filename of VirtualRobot robot model (e.g. robot_model.xml)"); + defineRequiredProperty<std::string>("AgentName", "Name of the agent for which the sensor values are provided"); + defineOptionalProperty<std::string>("RobotStateReportingTopic", "RobotStateUpdates", "Name of the topic on which updates of the robot state are reported."); + defineOptionalProperty<int>("HistoryLength", 10000, "Number of entries in the robot state history").setMin(0); + defineOptionalProperty<float>("RobotModelScaling", 1.0f, "Scaling of the robot model"); + defineOptionalProperty<std::string>("TopicPrefix", "", "Prefix for the sensor value topic name."); + + } + + + void RobotStateComponent::onInitComponent() { robotStateTopicName = getProperty<std::string>("RobotStateReportingTopic").getValue(); diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.h b/source/RobotAPI/components/RobotState/RobotStateComponent.h index 661b9d3375240cf2d83e51f1b57819315dd574f5..4899ae10b51d3d517424b9ff969562fae92717d8 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.h +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.h @@ -44,22 +44,11 @@ namespace armarx * \class RobotStatePropertyDefinition * \brief */ - class RobotStatePropertyDefinitions: + class RobotStatePropertyDefinitions : public ComponentPropertyDefinitions { public: - RobotStatePropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) - { - defineRequiredProperty<std::string>("RobotNodeSetName", "Set of nodes that is controlled by the KinematicUnit"); - defineRequiredProperty<std::string>("RobotFileName", "Filename of VirtualRobot robot model (e.g. robot_model.xml)"); - defineRequiredProperty<std::string>("AgentName", "Name of the agent for which the sensor values are provided"); - defineOptionalProperty<std::string>("RobotStateReportingTopic", "RobotStateUpdates", "Name of the topic on which updates of the robot state are reported."); - defineOptionalProperty<int>("HistoryLength", 10000, "Number of entries in the robot state history"); - defineOptionalProperty<float>("RobotModelScaling", 1.0f, "Scaling of the robot model"); - defineOptionalProperty<std::string>("TopicPrefix", "", "Prefix for the sensor value topic name."); - - } + RobotStatePropertyDefinitions(std::string prefix); };