From 31ba609539832f47d4b019314cc9a1fae52f0511 Mon Sep 17 00:00:00 2001 From: Rainer Kartmann <rainer.kartmann@kit.edu> Date: Thu, 12 Sep 2019 08:55:54 +0200 Subject: [PATCH] Make comments single-line, move getDefaultName() impl to .cpp --- .../RobotState/RobotStateComponent.cpp | 5 ++ .../RobotState/RobotStateComponent.h | 46 +++++++------------ 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp index 332d8ec75..dd817f686 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.cpp +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.cpp @@ -536,6 +536,11 @@ namespace armarx getConfigIdentifier())); } + std::string RobotStateComponent::getDefaultName() const + { + return "RobotStateComponent"; + } + void RobotStateComponent::setRobotStateObserver(RobotStateObserverPtr observer) { robotStateObs = observer; diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.h b/source/RobotAPI/components/RobotState/RobotStateComponent.h index a04fe8bea..a0a2b5dd3 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.h +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.h @@ -79,9 +79,7 @@ namespace armarx { public: - /** - * \return SharedRobotInterface proxy to the internal synchronized robot. - */ + /// \return SharedRobotInterface proxy to the internal synchronized robot. SharedRobotInterfacePrx getSynchronizedRobot(const Ice::Current&) const override; /** @@ -95,40 +93,25 @@ namespace armarx NameValueMap getJointConfigAtTimestamp(double, const Ice::Current&) const override; RobotStateConfig getRobotStateAtTimestamp(double timestamp, const Ice::Current&) const override; - /** - * \return the robot xml filename as specified in the configuration - */ + /// \return the robot xml filename as specified in the configuration std::string getRobotFilename(const Ice::Current&) const override; - /*! - * \brief getArmarXPackages - * \return All dependent packages, which might contain a robot file. - */ + /// \return All dependent packages, which might contain a robot file. std::vector< std::string > getArmarXPackages(const Ice::Current&) const override; - /** - * - * \return The name of this robot instance. - */ + /// \return The name of this robot instance. std::string getRobotName(const Ice::Current&) const override; std::string getRobotStateTopicName(const Ice::Current&) const override; - /** - * - * \return The name of this robot instance. - */ + /// \return The name of this robot instance. std::string getRobotNodeSetName(const Ice::Current&) const override; - /** - * Create an instance of RobotStatePropertyDefinitions. - */ + /// Create an instance of RobotStatePropertyDefinitions. PropertyDefinitionsPtr createPropertyDefinitions() override; - std::string getDefaultName() const override - { - return "RobotStateComponent"; - } + std::string getDefaultName() const override; + void setRobotStateObserver(RobotStateObserverPtr observer); bool interpolate(double time, RobotStateConfig& config) const; @@ -137,7 +120,9 @@ namespace armarx RobotInfoNodePtr getRobotInfo(const Ice::Current&) const override; + protected: + /** * Load and create a VirtualRobot::Robot instance from the RobotFileName * property. Additionally listen on the KinematicUnit topic for the @@ -149,12 +134,11 @@ namespace armarx */ void onConnectComponent() override; void onDisconnectComponent() override; - /** - * Calls unref() on RobotStateComponent::_synchronizedPrx. - */ + + /// Calls unref() on RobotStateComponent::_synchronizedPrx. ~RobotStateComponent() override; - // inherited from KinematicUnitInterface + // Inherited from KinematicUnitInterface void reportControlModeChanged(const NameControlModeMap& jointModes, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c = Ice::emptyCurrent) override; void reportJointAngles(const NameValueMap& jointAngles, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c = Ice::emptyCurrent) override; void reportJointVelocities(const NameValueMap& jointVelocities, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c = Ice::emptyCurrent) override; @@ -164,11 +148,12 @@ namespace armarx void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c = Ice::emptyCurrent) override; void reportJointStatuses(const NameStatusMap& jointStatuses, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c = Ice::emptyCurrent) override; + private: + void readRobotInfo(const std::string& robotFile); RobotInfoNodePtr readRobotInfo(const RapidXmlReaderNode& infoNode); - bool interpolateJoints(double time, NameValueMap& jointAngles) const; bool interpolatePose(double time, FramedPose& pose) const; @@ -195,6 +180,7 @@ namespace armarx float robotModelScaling; RobotInfoNodePtr robotInfo; + }; } -- GitLab