From 36f232bec81f1ed293d4058c10a7aedd85ffc750 Mon Sep 17 00:00:00 2001 From: Nikolaus Vahrenkamp <vahrenkamp@kit.edu> Date: Tue, 2 Dec 2014 11:27:08 +0100 Subject: [PATCH] KinematicUnit interface: Added acceleration report method --- source/RobotAPI/components/units/KinematicUnit.h | 2 +- source/RobotAPI/components/units/KinematicUnitObserver.cpp | 5 +++++ source/RobotAPI/components/units/KinematicUnitObserver.h | 1 + source/RobotAPI/components/units/TCPControlUnit.cpp | 5 +++++ source/RobotAPI/components/units/TCPControlUnit.h | 1 + .../KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp | 5 +++++ .../gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h | 1 + source/RobotAPI/interface/units/KinematicUnitInterface.ice | 1 + source/RobotAPI/libraries/robotstate/RobotStateComponent.cpp | 5 +++++ source/RobotAPI/libraries/robotstate/RobotStateComponent.h | 1 + .../libraries/robotstate/remote/RobotStateObserver.cpp | 5 +++++ .../libraries/robotstate/remote/RobotStateObserver.h | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/source/RobotAPI/components/units/KinematicUnit.h b/source/RobotAPI/components/units/KinematicUnit.h index 70cef16f0..fa8f901da 100644 --- a/source/RobotAPI/components/units/KinematicUnit.h +++ b/source/RobotAPI/components/units/KinematicUnit.h @@ -49,7 +49,7 @@ namespace armarx KinematicUnitPropertyDefinitions(std::string prefix): ComponentPropertyDefinitions(prefix) { - defineRequiredProperty<std::string>("RobotNodeSetName","Robot node name"); + 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"); } }; diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.cpp b/source/RobotAPI/components/units/KinematicUnitObserver.cpp index 8048dbecc..dfeaaab7f 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.cpp +++ b/source/RobotAPI/components/units/KinematicUnitObserver.cpp @@ -145,6 +145,11 @@ void KinematicUnitObserver::reportJointTorques(const NameValueMap& jointTorques, updateChannel("jointtorques"); } +void KinematicUnitObserver::reportJointAccelerations(const NameValueMap &jointAccelerations, bool aValueChanged, const Ice::Current &c) +{ + +} + void KinematicUnitObserver::reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c) { if(jointCurrents.size() == 0) diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.h b/source/RobotAPI/components/units/KinematicUnitObserver.h index 95debd4f3..eb0b8012a 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.h +++ b/source/RobotAPI/components/units/KinematicUnitObserver.h @@ -66,6 +66,7 @@ namespace armarx void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); diff --git a/source/RobotAPI/components/units/TCPControlUnit.cpp b/source/RobotAPI/components/units/TCPControlUnit.cpp index 7aaec9344..34dd14d63 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.cpp +++ b/source/RobotAPI/components/units/TCPControlUnit.cpp @@ -1255,6 +1255,11 @@ void armarx::TCPControlUnit::reportJointTorques(const NameValueMap &, bool, cons { } +void armarx::TCPControlUnit::reportJointAccelerations(const armarx::NameValueMap &jointAccelerations, bool aValueChanged, const Ice::Current &c) +{ + +} + void armarx::TCPControlUnit::reportJointCurrents(const NameValueMap &, bool, const Ice::Current &) { } diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index 0236342d9..8c6037afe 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -153,6 +153,7 @@ namespace armarx { void reportJointAngles(const NameValueMap &jointAngles, bool, const Ice::Current &); void reportJointVelocities(const NameValueMap &jointVel, bool, const Ice::Current &); void reportJointTorques(const NameValueMap &, bool, const Ice::Current &); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); void reportJointCurrents(const NameValueMap &, bool, const Ice::Current &); void reportJointMotorTemperatures(const NameValueMap &, bool, const Ice::Current &); void reportJointStatuses(const NameStatusMap &, bool, const Ice::Current &); diff --git a/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index 51a1bcfb2..29d83e5c6 100644 --- a/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -880,6 +880,11 @@ void KinematicUnitWidgetController::reportJointTorques(const NameValueMap& joint emit jointTorquesReported(); } +void KinematicUnitWidgetController::reportJointAccelerations(const NameValueMap &jointAccelerations, bool aValueChanged, const Ice::Current &c) +{ + +} + void KinematicUnitWidgetController::reportControlModeChanged(const NameControlModeMap& jointModes, bool aValueChanged, const Ice::Current& c) { if(!aValueChanged && reportedJointControlModes.size() > 0) diff --git a/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h b/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h index 80baf4866..b13f363f3 100644 --- a/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h +++ b/source/RobotAPI/gui_plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h @@ -189,6 +189,7 @@ namespace armarx void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c); void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c); void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c); void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c); void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current &); diff --git a/source/RobotAPI/interface/units/KinematicUnitInterface.ice b/source/RobotAPI/interface/units/KinematicUnitInterface.ice index 1651057f7..e960915f8 100644 --- a/source/RobotAPI/interface/units/KinematicUnitInterface.ice +++ b/source/RobotAPI/interface/units/KinematicUnitInterface.ice @@ -137,6 +137,7 @@ module armarx void reportJointAngles(NameValueMap actualJointAngles, bool aValueChanged); void reportJointVelocities(NameValueMap actualJointVelocities, bool aValueChanged); void reportJointTorques(NameValueMap actualJointTorques, bool aValueChanged); + void reportJointAccelerations(NameValueMap actualJointAccelerations, bool aValueChanged); void reportJointCurrents(NameValueMap actualJointCurrents, bool aValueChanged); void reportJointMotorTemperatures(NameValueMap actualJointMotorTemperatures, bool aValueChanged); void reportJointStatuses(NameStatusMap actualJointStatuses, bool aValueChanged); diff --git a/source/RobotAPI/libraries/robotstate/RobotStateComponent.cpp b/source/RobotAPI/libraries/robotstate/RobotStateComponent.cpp index a382663e3..7da8f699f 100644 --- a/source/RobotAPI/libraries/robotstate/RobotStateComponent.cpp +++ b/source/RobotAPI/libraries/robotstate/RobotStateComponent.cpp @@ -160,6 +160,11 @@ namespace armarx void RobotStateComponent::reportControlModeChanged(const NameControlModeMap& jointModes, bool aValueChanged,const Current& c){} void RobotStateComponent::reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged,const Current& c){} void RobotStateComponent::reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged,const Current& c){} + + void RobotStateComponent::reportJointAccelerations(const NameValueMap &jointAccelerations, bool aValueChanged, const Current &c) + { + + } void RobotStateComponent::reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged,const Current& c){} void RobotStateComponent::reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Current& c){} void RobotStateComponent::reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Current& c){} diff --git a/source/RobotAPI/libraries/robotstate/RobotStateComponent.h b/source/RobotAPI/libraries/robotstate/RobotStateComponent.h index 8b4bfa6e9..e73aee75a 100644 --- a/source/RobotAPI/libraries/robotstate/RobotStateComponent.h +++ b/source/RobotAPI/libraries/robotstate/RobotStateComponent.h @@ -73,6 +73,7 @@ namespace armarx void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); diff --git a/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.cpp b/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.cpp index 83871e4fb..04f30d339 100644 --- a/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.cpp +++ b/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.cpp @@ -122,6 +122,11 @@ void RobotStateObserver::reportJointTorques(const NameValueMap& jointTorques, bo { } +void RobotStateObserver::reportJointAccelerations(const NameValueMap &jointAccelerations, bool aValueChanged, const Ice::Current &c) +{ + +} + void RobotStateObserver::reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c) { } diff --git a/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.h b/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.h index 6c375013f..19991b455 100644 --- a/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.h +++ b/source/RobotAPI/libraries/robotstate/remote/RobotStateObserver.h @@ -69,6 +69,7 @@ namespace armarx void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current& c = Ice::Current()); -- GitLab