diff --git a/source/RobotAPI/applications/CMakeLists.txt b/source/RobotAPI/applications/CMakeLists.txt index 343addf16d384b97802185c482262eaea61242d9..63328dbb33accad3fe1cae87414fce09238e92fe 100644 --- a/source/RobotAPI/applications/CMakeLists.txt +++ b/source/RobotAPI/applications/CMakeLists.txt @@ -20,3 +20,5 @@ add_subdirectory(PlatformUnitSimulation) add_subdirectory(PlatformUnitObserver) add_subdirectory(RobotStateComponent) add_subdirectory(RobotStateObserver) + +add_subdirectory(HandUnitObserver) \ No newline at end of file diff --git a/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..ddfca935c3cbc959370f68d3bc05512287412cba --- /dev/null +++ b/source/RobotAPI/applications/HandUnitObserver/CMakeLists.txt @@ -0,0 +1,16 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..3a8cbcf77d5b9bf22738ce91f8e8e28ef81c6d0a --- /dev/null +++ b/source/RobotAPI/applications/HandUnitObserver/HandUnitObserverApp.h @@ -0,0 +1,54 @@ +/* + * 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/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 new file mode 100644 index 0000000000000000000000000000000000000000..340d409641c29ba3a02ea68e5a7d15ca412ff234 --- /dev/null +++ b/source/RobotAPI/applications/HandUnitObserver/main.cpp @@ -0,0 +1,33 @@ +/* + * 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/units/HandUnitObserver.h b/source/RobotAPI/units/HandUnitObserver.h index 74d9a20d52c23a66c2c56c17fd1d45a1e0f96abb..98134d4fd2dd18b180eafe2405e353f8658aa06b 100644 --- a/source/RobotAPI/units/HandUnitObserver.h +++ b/source/RobotAPI/units/HandUnitObserver.h @@ -48,7 +48,7 @@ namespace armarx virtual public HandUnitListener { public: - HandUnitObserver(); + HandUnitObserver(){} //void setTopicName(std::string topicName);