From 923ae6b35bfe5efb3f451e90b2d4ba2a529dc5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erich=20Bretn=C3=BCtz?= <erich.bretnuetz@gmx.net> Date: Thu, 21 Jun 2018 16:56:37 +0200 Subject: [PATCH] fixed some errors and warnings --- .../NJointControllers/NJointController.hpp | 4 +- .../NJointTaskSpaceImpedanceController.h | 8 +- .../components/units/RobotUnit/RobotUnit.cpp | 2 +- .../components/units/SensorActorUnit.cpp | 13 ++-- .../components/units/SpeechObserver.h | 6 +- source/RobotAPI/interface/CMakeLists.txt | 1 + .../units/RobotUnit/NJointController.ice | 73 +----------------- .../units/RobotUnit/RobotUnitInterface.ice | 75 +++++++++++++++++++ .../NJointBimanualCCDMPController.h | 28 +++---- .../DMPController/NJointCCDMPController.h | 28 +++---- .../DMPController/NJointJSDMPController.h | 16 ++-- .../NJointJointSpaceDMPController.h | 12 +-- .../DMPController/NJointTSDMPController.h | 30 ++++---- .../NJointTaskSpaceImpedanceDMPController.h | 26 +++---- 14 files changed, 165 insertions(+), 157 deletions(-) diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.hpp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.hpp index f1579a748..7a1136345 100644 --- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.hpp +++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.hpp @@ -127,7 +127,7 @@ namespace armarx ARMARX_ERROR << "Exception calling '" << GetTypeString<NJointControllerT>() << "::GenerateConfigDescription'" << "\n---- file = " << e.ice_file() << "\n---- line = " << e.ice_line() - << "\n---- name = " << e.ice_name() + << "\n---- name = " << e.ice_id() << "\n---- what:\n" << e.what() << "\n---- stacktrace:\n" << e.ice_stackTrace(); throw; @@ -155,7 +155,7 @@ namespace armarx ARMARX_ERROR << "Exception calling '" << GetTypeString<NJointControllerT>() << "::GenerateConfigFromVariants'" << "\n---- file = " << e.ice_file() << "\n---- line = " << e.ice_line() - << "\n---- name = " << e.ice_name() + << "\n---- name = " << e.ice_id() << "\n---- what:\n" << e.what() << "\n---- stacktrace:\n" << e.ice_stackTrace(); throw; diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointTaskSpaceImpedanceController.h b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointTaskSpaceImpedanceController.h index 61f245af8..860c5e88a 100644 --- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointTaskSpaceImpedanceController.h +++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointTaskSpaceImpedanceController.h @@ -59,18 +59,18 @@ namespace armarx NJointTaskSpaceImpedanceController(NJointControllerDescriptionProviderInterfacePtr prov, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&); - std::string getClassName(const Ice::Current&) const + std::string getClassName(const Ice::Current&) const override { return "TaskSpaceImpedanceController"; } // NJointController interface - void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration); + void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; protected: - void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; - void setTarget(const Ice::FloatSeq&, const Ice::Current&); + void setTarget(const Ice::FloatSeq&, const Ice::Current&) override; private: Eigen::Vector3f desiredPosition; Eigen::Quaternionf desiredQuaternion; diff --git a/source/RobotAPI/components/units/RobotUnit/RobotUnit.cpp b/source/RobotAPI/components/units/RobotUnit/RobotUnit.cpp index 5679160c7..02592203c 100644 --- a/source/RobotAPI/components/units/RobotUnit/RobotUnit.cpp +++ b/source/RobotAPI/components/units/RobotUnit/RobotUnit.cpp @@ -1850,7 +1850,7 @@ namespace armarx { ARMARX_ERROR << "exception in RobotUnit::finishRunning!\nwhat:\n" << e.what() - << "\n\tname: " << e.ice_name() + << "\n\tname: " << e.ice_id() << "\n\tfile: " << e.ice_file() << "\n\tline: " << e.ice_line() << "\n\tstack: " << e.ice_stackTrace(); diff --git a/source/RobotAPI/components/units/SensorActorUnit.cpp b/source/RobotAPI/components/units/SensorActorUnit.cpp index c716b3f70..7cc36ca5e 100644 --- a/source/RobotAPI/components/units/SensorActorUnit.cpp +++ b/source/RobotAPI/components/units/SensorActorUnit.cpp @@ -22,6 +22,7 @@ #include "SensorActorUnit.h" #include <Ice/ObjectAdapter.h> +#include <Ice/Initialize.h> using namespace armarx; @@ -40,7 +41,7 @@ SensorActorUnit::~SensorActorUnit() void SensorActorUnit::init(const Ice::Current& c) { std::string currentName = c.adapter->getName(); - Ice::Identity currentId = c.adapter->getCommunicator()->stringToIdentity(currentName); + Ice::Identity currentId = Ice::stringToIdentity(currentName); if (ownerId == currentId) { @@ -65,7 +66,7 @@ void SensorActorUnit::init(const Ice::Current& c) void SensorActorUnit::start(const Ice::Current& c) { std::string currentName = c.adapter->getName(); - Ice::Identity currentId = c.adapter->getCommunicator()->stringToIdentity(currentName); + Ice::Identity currentId = Ice::stringToIdentity(currentName); if (ownerId == currentId) { @@ -90,7 +91,7 @@ void SensorActorUnit::start(const Ice::Current& c) void SensorActorUnit::stop(const Ice::Current& c) { std::string currentName = c.adapter->getName(); - Ice::Identity currentId = c.adapter->getCommunicator()->stringToIdentity(currentName); + Ice::Identity currentId = Ice::stringToIdentity(currentName); if (ownerId == currentId) { @@ -132,7 +133,7 @@ void SensorActorUnit::request(const Ice::Current& c) // retrieve owner id from current connection std::string ownerName = c.adapter->getName(); - ownerId = c.adapter->getCommunicator()->stringToIdentity(ownerName); + ownerId = Ice::stringToIdentity(ownerName); ARMARX_INFO << "unit requested by " << ownerName << flush; } @@ -142,7 +143,7 @@ void SensorActorUnit::release(const Ice::Current& c) CALLINFO // retrieve owner id from current connection std::string callerName = c.adapter->getName(); - Ice::Identity callerId = c.adapter->getCommunicator()->stringToIdentity(callerName); + Ice::Identity callerId = Ice::stringToIdentity(callerName); if (!(ownerId == callerId)) { @@ -151,7 +152,7 @@ void SensorActorUnit::release(const Ice::Current& c) } // unlock mutex - ownerId = c.adapter->getCommunicator()->stringToIdentity(" "); + ownerId = Ice::stringToIdentity(" "); unitMutex.unlock(); ARMARX_INFO << "unit released" << flush; diff --git a/source/RobotAPI/components/units/SpeechObserver.h b/source/RobotAPI/components/units/SpeechObserver.h index ef6e6580d..769677e27 100644 --- a/source/RobotAPI/components/units/SpeechObserver.h +++ b/source/RobotAPI/components/units/SpeechObserver.h @@ -58,9 +58,9 @@ namespace armarx void onInitObserver() override; void onConnectObserver() override; - virtual void reportState(armarx::TextToSpeechStateType state, const Ice::Current& = Ice::Current()); - virtual void reportText(const std::string& text, const Ice::Current& = Ice::Current()); - virtual void reportTextWithParams(const std::string& text, const Ice::StringSeq& params, const Ice::Current& = Ice::Current()); + virtual void reportState(armarx::TextToSpeechStateType state, const Ice::Current& = Ice::Current()) override; + virtual void reportText(const std::string& text, const Ice::Current& = Ice::Current()) override; + virtual void reportTextWithParams(const std::string& text, const Ice::StringSeq& params, const Ice::Current& = Ice::Current()) override; static std::string SpeechStateToString(TextToSpeechStateType state); private: diff --git a/source/RobotAPI/interface/CMakeLists.txt b/source/RobotAPI/interface/CMakeLists.txt index 6b32bcb8a..373476a80 100644 --- a/source/RobotAPI/interface/CMakeLists.txt +++ b/source/RobotAPI/interface/CMakeLists.txt @@ -42,6 +42,7 @@ set(SLICE_FILES units/GamepadUnit.ice units/MetaWearIMUInterface.ice units/MetaWearIMU.ice + units/RobotUnit/NJointController.ice units/RobotUnit/NJointTrajectoryController.ice units/RobotUnit/NJointCartesianVelocityController.ice diff --git a/source/RobotAPI/interface/units/RobotUnit/NJointController.ice b/source/RobotAPI/interface/units/RobotUnit/NJointController.ice index 76771b197..9054635c8 100644 --- a/source/RobotAPI/interface/units/RobotUnit/NJointController.ice +++ b/source/RobotAPI/interface/units/RobotUnit/NJointController.ice @@ -22,76 +22,7 @@ #pragma once -#include <ArmarXCore/interface/core/BasicTypes.ice> -#include <ArmarXCore/interface/core/UserException.ice> -#include <ArmarXGui/interface/WidgetDescription.ice> -module armarx -{ - interface NJointControllerInterface; - interface RobotUnitInterface; +#include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.ice> - - module RobotUnitControllerNames - { - const string NJointTrajectoryController = "NJointTrajectoryController"; - const string NJointGlobalTCPController = "NJointGlobalTCPController"; /*@@@TODO: move NJointGlobalTCPController to RobotAPI */ - const string NJointTCPController = "NJointTCPController"; - const string NJointCartesianVelocityController = "NJointCartesianVelocityController"; - }; - - - class NJointControllerConfig{}; - - struct NJointControllerDescription - { - string instanceName; - string className; - NJointControllerInterface* controller; - StringStringDictionary controlModeAssignment; - bool deletable; - bool internal; - }; - sequence<NJointControllerDescription> NJointControllerDescriptionSeq; - - struct NJointControllerStatus - { - string instanceName; - bool active = false; - bool requested = false; - bool error = false; - long timestampUSec = 0; - }; - sequence<NJointControllerStatus> NJointControllerStatusSeq; - - struct NJointControllerDescriptionWithStatus - { - NJointControllerStatus status; - NJointControllerDescription description; - }; - sequence<NJointControllerDescriptionWithStatus> NJointControllerDescriptionWithStatusSeq; - - interface NJointControllerInterface - { - ["cpp:const"] idempotent string getClassName(); - ["cpp:const"] idempotent string getInstanceName(); - ["cpp:const"] idempotent StringStringDictionary getControlDeviceUsedControlModeMap(); - ["cpp:const"] idempotent bool isControllerActive(); - ["cpp:const"] idempotent bool isControllerRequested(); - ["cpp:const"] idempotent bool isDeletable(); - ["cpp:const"] idempotent bool hasControllerError(); - ["cpp:const"] idempotent NJointControllerStatus getControllerStatus(); - ["cpp:const"] idempotent NJointControllerDescription getControllerDescription(); - ["cpp:const"] idempotent NJointControllerDescriptionWithStatus getControllerDescriptionWithStatus(); - ["cpp:const"] idempotent RobotUnitInterface* getRobotUnit(); - - ["cpp:const"] void activateController(); - ["cpp:const"] void deactivateController(); - ["cpp:const"] void deleteController() throws LogicError; - - ["cpp:const"] idempotent WidgetDescription::StringWidgetDictionary getFunctionDescriptions(); - void callDescribedFunction(string fuinctionName, StringVariantBaseMap values) throws InvalidArgumentException; - }; - - dictionary<string, NJointControllerInterface*> StringNJointControllerPrxDictionary; -}; +//see RobotUnitInterface.ice (zeroc broke forward declarations) diff --git a/source/RobotAPI/interface/units/RobotUnit/RobotUnitInterface.ice b/source/RobotAPI/interface/units/RobotUnit/RobotUnitInterface.ice index 49a8e8a19..9bb5d585c 100644 --- a/source/RobotAPI/interface/units/RobotUnit/RobotUnitInterface.ice +++ b/source/RobotAPI/interface/units/RobotUnit/RobotUnitInterface.ice @@ -36,6 +36,81 @@ #include <RobotAPI/interface/units/InertialMeasurementUnit.ice> #include <RobotAPI/interface/units/PlatformUnitInterface.ice> +#include <ArmarXCore/interface/core/BasicTypes.ice> +#include <ArmarXCore/interface/core/UserException.ice> +#include <ArmarXGui/interface/WidgetDescription.ice> + + +module armarx +{ + interface NJointControllerInterface; + interface RobotUnitInterface; + + + module RobotUnitControllerNames + { + const string NJointTrajectoryController = "NJointTrajectoryController"; + const string NJointGlobalTCPController = "NJointGlobalTCPController"; /*@@@TODO: move NJointGlobalTCPController to RobotAPI */ + const string NJointTCPController = "NJointTCPController"; + const string NJointCartesianVelocityController = "NJointCartesianVelocityController"; + }; + + + class NJointControllerConfig{}; + + struct NJointControllerDescription + { + string instanceName; + string className; + NJointControllerInterface* controller; + StringStringDictionary controlModeAssignment; + bool deletable; + bool internal; + }; + sequence<NJointControllerDescription> NJointControllerDescriptionSeq; + + struct NJointControllerStatus + { + string instanceName; + bool active = false; + bool requested = false; + bool error = false; + long timestampUSec = 0; + }; + sequence<NJointControllerStatus> NJointControllerStatusSeq; + + struct NJointControllerDescriptionWithStatus + { + NJointControllerStatus status; + NJointControllerDescription description; + }; + sequence<NJointControllerDescriptionWithStatus> NJointControllerDescriptionWithStatusSeq; + + interface NJointControllerInterface + { + ["cpp:const"] idempotent string getClassName(); + ["cpp:const"] idempotent string getInstanceName(); + ["cpp:const"] idempotent StringStringDictionary getControlDeviceUsedControlModeMap(); + ["cpp:const"] idempotent bool isControllerActive(); + ["cpp:const"] idempotent bool isControllerRequested(); + ["cpp:const"] idempotent bool isDeletable(); + ["cpp:const"] idempotent bool hasControllerError(); + ["cpp:const"] idempotent NJointControllerStatus getControllerStatus(); + ["cpp:const"] idempotent NJointControllerDescription getControllerDescription(); + ["cpp:const"] idempotent NJointControllerDescriptionWithStatus getControllerDescriptionWithStatus(); + ["cpp:const"] idempotent RobotUnitInterface* getRobotUnit(); + + ["cpp:const"] void activateController(); + ["cpp:const"] void deactivateController(); + ["cpp:const"] void deleteController() throws LogicError; + + ["cpp:const"] idempotent WidgetDescription::StringWidgetDictionary getFunctionDescriptions(); + void callDescribedFunction(string fuinctionName, StringVariantBaseMap values) throws InvalidArgumentException; + }; + + dictionary<string, NJointControllerInterface*> StringNJointControllerPrxDictionary; +}; + module armarx { dictionary<string, Ice::StringSeq> ControlDeviceNameToControlModesDictionary; diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointBimanualCCDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointBimanualCCDMPController.h index 1e4c4054e..42606fff4 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointBimanualCCDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointBimanualCCDMPController.h @@ -50,41 +50,41 @@ namespace armarx NJointBimanualCCDMPController(NJointControllerDescriptionProviderInterfacePtr prov, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&); // NJointControllerInterface interface - std::string getClassName(const Ice::Current&) const; + std::string getClassName(const Ice::Current&) const override; // NJointController interface - void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration); + void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; // NJointBimanualCCDMPControllerInterface interface - void learnDMPFromFiles(const std::string&, const Ice::StringSeq&, const Ice::Current&); - bool isFinished(const Ice::Current&) + void learnDMPFromFiles(const std::string&, const Ice::StringSeq&, const Ice::Current&) override; + bool isFinished(const Ice::Current&) override { return finished; } - void runDMP(const Ice::DoubleSeq& leftGoals, const Ice::DoubleSeq& rightGoals, const Ice::Current&); - void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&); - void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&); + void runDMP(const Ice::DoubleSeq& leftGoals, const Ice::DoubleSeq& rightGoals, const Ice::Current&) override; + void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&) override; + void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&) override; - void changeLeader(const Ice::Current&); + void changeLeader(const Ice::Current&) override; - double getVirtualTime(const Ice::Current&) + double getVirtualTime(const Ice::Current&) override { return virtualtimer; } - std::string getLeaderName(const Ice::Current&) + std::string getLeaderName(const Ice::Current&) override { return leaderName; } protected: - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; - void onInitComponent(); - void onDisconnectComponent(); + void onInitComponent() override; + void onDisconnectComponent() override; void controllerRun(); private: @@ -255,7 +255,7 @@ namespace armarx // NJointController interface protected: - void rtPreActivateController(); + void rtPreActivateController() override; }; diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointCCDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointCCDMPController.h index e318e8f68..a93bba871 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointCCDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointCCDMPController.h @@ -59,35 +59,35 @@ namespace armarx NJointCCDMPController(NJointControllerDescriptionProviderInterfacePtr prov, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&); // NJointControllerInterface interface - std::string getClassName(const Ice::Current&) const; + std::string getClassName(const Ice::Current&) const override; // NJointController interface - void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration); + void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; // NJointCCDMPControllerInterface interface - void learnDMPFromFiles(int dmpId, const Ice::StringSeq& fileNames, const Ice::Current&); - bool isFinished(const Ice::Current&) + void learnDMPFromFiles(int dmpId, const Ice::StringSeq& fileNames, const Ice::Current&) override; + bool isFinished(const Ice::Current&) override { return finished; } - void runDMP(const Ice::Current&); - void setTemporalFactor(int dmpId, Ice::Double tau, const Ice::Current&); - void setViaPoints(int dmpId, Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&); - void setGoals(int dmpId, const Ice::DoubleSeq& goals, const Ice::Current&); + void runDMP(const Ice::Current&) override; + void setTemporalFactor(int dmpId, Ice::Double tau, const Ice::Current&) override; + void setViaPoints(int dmpId, Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&) override; + void setGoals(int dmpId, const Ice::DoubleSeq& goals, const Ice::Current&) override; - void setControllerTarget(Ice::Float avoidJointLimitsKp, NJointTaskSpaceDMPControllerMode::CartesianSelection mode, const Ice::Current&); - void setTorqueKp(const StringFloatDictionary& torqueKp, const Ice::Current&); - void setNullspaceJointVelocities(const StringFloatDictionary& nullspaceJointVelocities, const Ice::Current&); + void setControllerTarget(Ice::Float avoidJointLimitsKp, NJointTaskSpaceDMPControllerMode::CartesianSelection mode, const Ice::Current&) override; + void setTorqueKp(const StringFloatDictionary& torqueKp, const Ice::Current&) override; + void setNullspaceJointVelocities(const StringFloatDictionary& nullspaceJointVelocities, const Ice::Current&) override; protected: void rtPreActivateController() override; void rtPostDeactivateController() override; VirtualRobot::IKSolver::CartesianSelection ModeFromIce(const NJointTaskSpaceDMPControllerMode::CartesianSelection mode); - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; - void onInitComponent(); - void onDisconnectComponent(); + void onInitComponent() override; + void onDisconnectComponent() override; void controllerRun(); private: diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJSDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJSDMPController.h index 1f74a9994..d23f3ad88 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJSDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJSDMPController.h @@ -46,23 +46,23 @@ namespace armarx // NJointController interface void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; - bool isFinished(const Ice::Current&) + bool isFinished(const Ice::Current&) override { return finished; } - void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&); - void setTemporalFactor(double tau, const Ice::Current&); + void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&) override; + void setTemporalFactor(double tau, const Ice::Current&) override; - void runDMP(const Ice::DoubleSeq& goals, double tau, const Ice::Current&); + void runDMP(const Ice::DoubleSeq& goals, double tau, const Ice::Current&) override; - void showMessages(const Ice::Current&); + void showMessages(const Ice::Current&) override; protected: void rtPreActivateController() override; void rtPostDeactivateController() override; - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; private: struct DebugBufferData @@ -119,8 +119,8 @@ namespace armarx // ManagedIceObject interface protected: void controllerRun(); - void onInitComponent(); - void onDisconnectComponent(); + void onInitComponent() override; + void onDisconnectComponent() override; }; diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJointSpaceDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJointSpaceDMPController.h index 173c7cfb1..edc8e28af 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJointSpaceDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointJointSpaceDMPController.h @@ -47,23 +47,23 @@ namespace armarx void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; // - bool isFinished(const Ice::Current&) + bool isFinished(const Ice::Current&) override { return finished; } - void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&); - void setTemporalFactor(double tau, const Ice::Current&); + void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&) override; + void setTemporalFactor(double tau, const Ice::Current&) override; - void runDMP(const Ice::DoubleSeq& goals, double tau, const Ice::Current&); + void runDMP(const Ice::DoubleSeq& goals, double tau, const Ice::Current&) override; - void showMessages(const Ice::Current&); + void showMessages(const Ice::Current&) override; protected: void rtPreActivateController() override; void rtPostDeactivateController() override; - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; private: struct DebugBufferData diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTSDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTSDMPController.h index 8deb861b1..d2271b6ac 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTSDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTSDMPController.h @@ -59,30 +59,30 @@ namespace armarx NJointTSDMPController(NJointControllerDescriptionProviderInterfacePtr prov, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&); // NJointControllerInterface interface - std::string getClassName(const Ice::Current&) const; + std::string getClassName(const Ice::Current&) const override; // NJointController interface - void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration); + void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; // NJointTSDMPControllerInterface interface - void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&); - bool isFinished(const Ice::Current&) + void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&) override; + bool isFinished(const Ice::Current&) override { return finished; } - void runDMP(const Ice::DoubleSeq& goals, Ice::Double tau, const Ice::Current&); - void setSpeed(Ice::Double times, const Ice::Current&); - void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&); + void runDMP(const Ice::DoubleSeq& goals, Ice::Double tau, const Ice::Current&) override; + void setSpeed(Ice::Double times, const Ice::Current&) override; + void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&) override; - void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&); + void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&) override; - void setControllerTarget(Ice::Float avoidJointLimitsKp, NJointTaskSpaceDMPControllerMode::CartesianSelection mode, const Ice::Current&); - void setTorqueKp(const StringFloatDictionary& torqueKp, const Ice::Current&); - void setNullspaceJointVelocities(const StringFloatDictionary& nullspaceJointVelocities, const Ice::Current&); + void setControllerTarget(Ice::Float avoidJointLimitsKp, NJointTaskSpaceDMPControllerMode::CartesianSelection mode, const Ice::Current&) override; + void setTorqueKp(const StringFloatDictionary& torqueKp, const Ice::Current&) override; + void setNullspaceJointVelocities(const StringFloatDictionary& nullspaceJointVelocities, const Ice::Current&) override; - double getCanVal(const Ice::Current&) + double getCanVal(const Ice::Current&) override { return taskSpaceDMPController->canVal; } @@ -91,10 +91,10 @@ namespace armarx void rtPreActivateController() override; void rtPostDeactivateController() override; VirtualRobot::IKSolver::CartesianSelection ModeFromIce(const NJointTaskSpaceDMPControllerMode::CartesianSelection mode); - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; - void onInitComponent(); - void onDisconnectComponent(); + void onInitComponent() override; + void onDisconnectComponent() override; void controllerRun(); private: diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.h b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.h index a3567af7a..8cc6e483f 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.h +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.h @@ -40,34 +40,34 @@ namespace armarx NJointTaskSpaceImpedanceDMPController(NJointControllerDescriptionProviderInterfacePtr prov, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&); // NJointControllerInterface interface - std::string getClassName(const Ice::Current&) const; + std::string getClassName(const Ice::Current&) const override; // NJointController interface - void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration); + void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override; // NJointTaskSpaceImpedanceDMPControllerInterface interface - void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&); - bool isFinished(const Ice::Current&) + void learnDMPFromFiles(const Ice::StringSeq& fileNames, const Ice::Current&) override; + bool isFinished(const Ice::Current&) override { return finished; } - void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&); - void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&); + void setViaPoints(Ice::Double u, const Ice::DoubleSeq& viapoint, const Ice::Current&) override; + void setGoals(const Ice::DoubleSeq& goals, const Ice::Current&) override; - void learnJointDMPFromFiles(const std::string& fileName, const Ice::Current&); - void runDMP(const Ice::DoubleSeq& goals, const Ice::Current&); - Ice::Double getVirtualTime(const Ice::Current&) + void learnJointDMPFromFiles(const std::string& fileName, const Ice::Current&) override; + void runDMP(const Ice::DoubleSeq& goals, const Ice::Current&) override; + Ice::Double getVirtualTime(const Ice::Current&) override { return dmpCtrl->canVal; } protected: - virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&); + virtual void onPublish(const SensorAndControl&, const DebugDrawerInterfacePrx&, const DebugObserverInterfacePrx&) override; - void onInitComponent(); - void onDisconnectComponent(); + void onInitComponent() override; + void onDisconnectComponent() override; void controllerRun(); private: @@ -162,7 +162,7 @@ namespace armarx // NJointController interface protected: - void rtPreActivateController(); + void rtPreActivateController() override; }; } // namespace armarx -- GitLab