diff --git a/source/RobotAPI/applications/CMakeLists.txt b/source/RobotAPI/applications/CMakeLists.txt index 01bd7549a8ceae418036ba78a1dd44a89d8da769..ce382383dc5aa8f6954d94889b2a2a4ad738c607 100644 --- a/source/RobotAPI/applications/CMakeLists.txt +++ b/source/RobotAPI/applications/CMakeLists.txt @@ -16,7 +16,6 @@ add_subdirectory(PlatformUnitSimulation) add_subdirectory(PlatformUnitObserver) add_subdirectory(RobotStateComponent) add_subdirectory(RobotIK) -add_subdirectory(HandUnitObserver) add_subdirectory(HandUnitSimulation) add_subdirectory(ForceTorqueUnitSimulation) diff --git a/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt deleted file mode 100644 index ddfca935c3cbc959370f68d3bc05512287412cba..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -armarx_component_set_name("HandUnitObserverApp") - -#find_package(MyLib QUIET) -#armarx_build_if(MyLib_FOUND "MyLib not available") -# -# all include_directories must be guarded by if(Xyz_FOUND) -# for multiple libraries write: if(X_FOUND AND Y_FOUND).... -#if(MyLib_FOUND) -# include_directories(${MyLib_INCLUDE_DIRS}) -#endif() - -set(COMPONENT_LIBS RobotAPIUnits ArmarXInterfaces ArmarXCore) - -set(EXE_SOURCE main.cpp) - -armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/HandUnitObserver/HandUnitObserverApp.h b/source/RobotAPI/applications/HandUnitObserver/HandUnitObserverApp.h deleted file mode 100644 index a30241cb9ea06fcbe2d8dd3685e5e690042fdc2b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/HandUnitObserver/HandUnitObserverApp.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::application::HandUnitObserver - * @author Mirko Waechter ( mirko dot waechter at kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_RobotAPI_HandUnitObserver_H -#define _ARMARX_APPLICATION_RobotAPI_HandUnitObserver_H - - -#include <RobotAPI/components/units/HandUnitObserver.h> - -#include <Core/core/application/Application.h> - -namespace armarx -{ - /** - * @class HandUnitObserverApp - * @brief A brief description - * - * Detailed Description - */ - class HandUnitObserverApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject( Component::create<HandUnitObserver>(properties) ); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/HandUnitObserver/main.cpp b/source/RobotAPI/applications/HandUnitObserver/main.cpp deleted file mode 100644 index 340d409641c29ba3a02ea68e5a7d15ca412ff234..0000000000000000000000000000000000000000 --- a/source/RobotAPI/applications/HandUnitObserver/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::application::HandUnitObserver - * @author Mirko Waechter ( mirko dot waechter at kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#include "HandUnitObserverApp.h" -#include <Core/core/logging/Logging.h> - -int main(int argc, char* argv[]) -{ - armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::HandUnitObserverApp > (); - app->setName("HandUnitObserver"); - - return app->main(argc, argv); -} diff --git a/source/RobotAPI/components/units/CMakeLists.txt b/source/RobotAPI/components/units/CMakeLists.txt index fc77064bec9c4a2da87908c9282757aabdb9b624..d5244fe973aa2a31d5cad9cd903b068f7e072fbe 100644 --- a/source/RobotAPI/components/units/CMakeLists.txt +++ b/source/RobotAPI/components/units/CMakeLists.txt @@ -36,7 +36,6 @@ set(LIB_HEADERS TCPControlUnitObserver.h HandUnit.h - HandUnitObserver.h HandUnitSimulation.h BusInspectionUnit.h KinematicUnit.h @@ -61,7 +60,6 @@ set(LIB_FILES TCPControlUnitObserver.cpp HandUnit.cpp - HandUnitObserver.cpp HandUnitSimulation.cpp BusInspectionUnit.cpp KinematicUnit.cpp diff --git a/source/RobotAPI/components/units/HandUnitObserver.cpp b/source/RobotAPI/components/units/HandUnitObserver.cpp deleted file mode 100644 index fb5e2f89d6906f2609f15e6a1c2021244f33a0a6..0000000000000000000000000000000000000000 --- a/source/RobotAPI/components/units/HandUnitObserver.cpp +++ /dev/null @@ -1,134 +0,0 @@ -#include "HandUnitObserver.h" - - -#include <Core/observers/checks/ConditionCheckEquals.h> -#include <Core/observers/checks/ConditionCheckUpdated.h> - - - - -using namespace armarx; - - -void HandUnitObserver::onInitObserver() -{ - /*usingTopic("LeftHandState"); - usingTopic("RightHandState"); - - offerChannel("leftHand", "Gives information about the state of the left robot hand."); - offerDataField("leftHand", "isOpen", VariantType::Bool, "Is true when the hand is open, false if not."); - setDataField("leftHand", "isOpen", false); - offerDataField("leftHand", "isClosed", VariantType::Bool, "Is true when the hand is closed, false if not."); - setDataField("leftHand", "isClosed", false); - offerDataField("leftHand", "shapeName", VariantType::String, "Contains the name of the current hand shape."); - setDataField("leftHand", "shapeName", "unknown"); - updateChannel("leftHand"); - - offerChannel("rightHand", "Gives information about the state of the right robot hand."); - offerDataField("rightHand", "isOpen", VariantType::Bool, "Is true when the hand is open, false if not."); - setDataField("rightHand", "isOpen", false); - offerDataField("rightHand", "isClosed", VariantType::Bool, "Is true when the hand is closed, false if not."); - setDataField("rightHand", "isClosed", false); - offerDataField("rightHand", "shapeName", VariantType::String, "Contains the name of the current hand shape."); - setDataField("rightHand", "shapeName", "unknown"); - updateChannel("rightHand"); - - offerConditionCheck("equals", new armarx::ConditionCheckEquals()); - offerConditionCheck("updated", new armarx::ConditionCheckUpdated());*/ -} - - - -void HandUnitObserver::onConnectObserver() -{ - -} - - - -void HandUnitObserver::onExitObserver() -{ - -} - - -/* -void HandUnitObserver::reportHandClosed(bool isLeftHand, const Ice::Current&) -{ - if (isLeftHand) - { - setDataField("leftHand", "isOpen", false); - setDataField("leftHand", "isClosed", true); - updateChannel("leftHand"); - } - else - { - setDataField("rightHand", "isOpen", false); - setDataField("rightHand", "isClosed", true); - updateChannel("rightHand"); - } -} - - - -void HandUnitObserver::reportHandOpened(bool isLeftHand, const Ice::Current&) -{ - if (isLeftHand) - { - setDataField("leftHand", "isOpen", true); - setDataField("leftHand", "isClosed", false); - updateChannel("leftHand"); - } - else - { - setDataField("rightHand", "isOpen", true); - setDataField("rightHand", "isClosed", false); - updateChannel("rightHand"); - } -} -*/ - -void HandUnitObserver::reportHandShaped(const std::string &handName, const std::string &shapeName, const Ice::Current&) -{ - // todo - /*if (isLeftHand) - { - setDataField("leftHand", "isOpen", false); - setDataField("leftHand", "isClosed", false); - updateChannel("leftHand"); - } - else - { - setDataField("rightHand", "isOpen", false); - setDataField("rightHand", "isClosed", false); - updateChannel("rightHand"); - }*/ -} - - - -void HandUnitObserver::reportNewHandShapeName(const std::string &handName, const std::string& handShapeName, const Ice::Current&) -{ - // todo - /*if (isLeftHand) - { - setDataField("leftHand", "shapeName", handShapeName); - updateChannel("leftHand"); - } - else - { - setDataField("rightHand", "shapeName", handShapeName); - updateChannel("rightHand"); - }*/ -} - - -void armarx::HandUnitObserver::reportJointAngles(const armarx::NameValueMap &actualJointAngles, const Ice::Current &) -{ - -} - -void HandUnitObserver::reportJointPressures(const NameValueMap &actualJointPressures, const Ice::Current &) -{ - -} diff --git a/source/RobotAPI/components/units/HandUnitObserver.h b/source/RobotAPI/components/units/HandUnitObserver.h deleted file mode 100644 index f490f82064f11ac2183b36be20ab32a47a845951..0000000000000000000000000000000000000000 --- a/source/RobotAPI/components/units/HandUnitObserver.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * ArmarX is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::units - * @author David Schiebener <schiebener at kit dot edu> - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl.txt - * GNU General Public License - */ - -#ifndef _ARMARX_ROBOTAPI_HAND_UNIT_OBSERVER_H -#define _ARMARX_ROBOTAPI_HAND_UNIT_OBSERVER_H - -#include <RobotAPI/interface/units/HandUnitInterface.h> -#include <Core/observers/Observer.h> - - -namespace armarx -{ - - class HandUnitObserverPropertyDefinitions: - public ComponentPropertyDefinitions - { - public: - HandUnitObserverPropertyDefinitions(std::string prefix): - ComponentPropertyDefinitions(prefix) - { - //defineRequiredProperty<std::string>("HapticTopicName", "Name of the HapticUnit Topic"); - } - }; - - - // TODO !!! - /** - * @class HandUnitObserver - * @ingroup RobotAPI-SensorActorUnits-observers - * @brief The HandUnitObserver class - */ - class HandUnitObserver : - virtual public Observer, - virtual public HandUnitObserverInterface - { - public: - HandUnitObserver(){} - - // framework hooks - virtual std::string getDefaultName() const { return "HandUnitObserver"; } - virtual void onInitObserver(); - virtual void onConnectObserver(); - virtual void onExitObserver(); - - // observer interface - // implementation: todo... - virtual void reportHandShaped(const std::string &handName, const std::string &shapeName, const ::Ice::Current& = ::Ice::Current()); - virtual void reportNewHandShapeName(const std::string &handName, const ::std::string& handShapeName, const ::Ice::Current& = ::Ice::Current()); - void reportJointAngles(const NameValueMap &actualJointAngles, const Ice::Current& = ::Ice::Current()); - void reportJointPressures(const NameValueMap &actualJointPressures, const Ice::Current& = ::Ice::Current()); - - /** - * @see PropertyUser::createPropertyDefinitions() - */ - //virtual PropertyDefinitionsPtr createPropertyDefinitions(); - private: - - - }; -} - -#endif