From c42425bc4f0a9cf233bd6959df1d19ad7622a959 Mon Sep 17 00:00:00 2001 From: Manfred Kroehnert <manfred.kroehnert@kit.edu> Date: Tue, 30 Oct 2012 08:46:37 +0000 Subject: [PATCH] package: move source directories into source/HumanoidRobotAPI/; adjust some #includes and rename onInit-/onConnectComponent to onInit-/onConnectStatechart git-svn-id: https://svn.sfb588.uni-karlsruhe.de/svn/HumanoidRobotAPI@12 e7ad446d-f7d8-486a-9efb-df2f5bbea5c6 --- CMakeLists.txt | 12 +----------- .../HumanoidRobotAPI/applications}/CMakeLists.txt | 0 .../applications}/MotionControlTest/CMakeLists.txt | 0 .../MotionControlTest/MotionControlTestApp.h | 6 +++--- .../HumanoidRobotAPI/core}/CMakeLists.txt | 1 - .../core}/RobotStatechartContext.cpp | 10 +++++----- .../HumanoidRobotAPI/core}/RobotStatechartContext.h | 4 ++-- .../HumanoidRobotAPI/motioncontrol}/CMakeLists.txt | 1 - .../motioncontrol}/MotionControl.cpp | 0 .../HumanoidRobotAPI/motioncontrol}/MotionControl.h | 2 +- 10 files changed, 12 insertions(+), 24 deletions(-) rename {applications => source/HumanoidRobotAPI/applications}/CMakeLists.txt (100%) rename {applications => source/HumanoidRobotAPI/applications}/MotionControlTest/CMakeLists.txt (100%) rename {applications => source/HumanoidRobotAPI/applications}/MotionControlTest/MotionControlTestApp.h (91%) rename {core => source/HumanoidRobotAPI/core}/CMakeLists.txt (93%) rename {core => source/HumanoidRobotAPI/core}/RobotStatechartContext.cpp (92%) rename {core => source/HumanoidRobotAPI/core}/RobotStatechartContext.h (97%) rename {motioncontrol => source/HumanoidRobotAPI/motioncontrol}/CMakeLists.txt (93%) rename {motioncontrol => source/HumanoidRobotAPI/motioncontrol}/MotionControl.cpp (100%) rename {motioncontrol => source/HumanoidRobotAPI/motioncontrol}/MotionControl.h (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e033f39f0..7883e3c69 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,6 @@ # HumanoidRobotAPI cmake_minimum_required(VERSION 2.8) -if (COMMAND cmake_policy) - if (POLICY CMP0011) - cmake_policy(SET CMP0011 NEW) - endif() -endif() find_package("ArmarXCore" REQUIRED PATHS "$ENV{HOME}/armarx/Core/build/cmake" @@ -17,12 +12,7 @@ include(${ArmarXCore_CMAKE_DIR}/ArmarXProject.cmake) armarx_project("HumanoidRobotAPI") - -add_subdirectory(core) -add_subdirectory(motioncontrol) -add_subdirectory(applications) -#add_subdirectory(source) - +add_subdirectory(source) install_project() diff --git a/applications/CMakeLists.txt b/source/HumanoidRobotAPI/applications/CMakeLists.txt similarity index 100% rename from applications/CMakeLists.txt rename to source/HumanoidRobotAPI/applications/CMakeLists.txt diff --git a/applications/MotionControlTest/CMakeLists.txt b/source/HumanoidRobotAPI/applications/MotionControlTest/CMakeLists.txt similarity index 100% rename from applications/MotionControlTest/CMakeLists.txt rename to source/HumanoidRobotAPI/applications/MotionControlTest/CMakeLists.txt diff --git a/applications/MotionControlTest/MotionControlTestApp.h b/source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h similarity index 91% rename from applications/MotionControlTest/MotionControlTestApp.h rename to source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h index f65eda238..48e275d2f 100755 --- a/applications/MotionControlTest/MotionControlTestApp.h +++ b/source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h @@ -23,15 +23,15 @@ #include <Core/core/application/Application.h> -#include <motioncontrol/MotionControl.h> +#include <HumanoidRobotAPI/motioncontrol/MotionControl.h> namespace armarx { class MotionControlTestApp : virtual public armarx::Application { - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { + void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) + { registry->addObject( Component::create<MoveHelpers::MotionControl>(properties) ); }; }; diff --git a/core/CMakeLists.txt b/source/HumanoidRobotAPI/core/CMakeLists.txt similarity index 93% rename from core/CMakeLists.txt rename to source/HumanoidRobotAPI/core/CMakeLists.txt index 59a5057a4..716dd4678 100755 --- a/core/CMakeLists.txt +++ b/source/HumanoidRobotAPI/core/CMakeLists.txt @@ -20,7 +20,6 @@ if (ARMARX_BUILD) set(LIB_FILES RobotStatechartContext.cpp) set(LIB_HEADERS RobotStatechartContext.h) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..) use_ice() add_library(${LIB_NAME} SHARED ${LIB_FILES} ${LIB_HEADERS}) diff --git a/core/RobotStatechartContext.cpp b/source/HumanoidRobotAPI/core/RobotStatechartContext.cpp similarity index 92% rename from core/RobotStatechartContext.cpp rename to source/HumanoidRobotAPI/core/RobotStatechartContext.cpp index d67cf7d5d..6e5d89087 100644 --- a/core/RobotStatechartContext.cpp +++ b/source/HumanoidRobotAPI/core/RobotStatechartContext.cpp @@ -38,9 +38,9 @@ namespace armarx // **************************************************************** // Implementation of Component // **************************************************************** - void RobotStatechartContext::onInitComponent() + void RobotStatechartContext::onInitStatechart() { - StatechartContext::onInitComponent(); +// StatechartContext::onInitStatechart(); ARMARX_LOG << eINFO << "Init Armar4Context" << flush; RobotStateObjectFactories::addFactories(getIceManager()->getCommunicator()); @@ -52,9 +52,9 @@ namespace armarx } - void RobotStatechartContext::onConnectComponent() + void RobotStatechartContext::onConnectStatechart() { - StatechartContext::onConnectComponent(); +// StatechartContext::onConnectStatechart(); ARMARX_LOG << eINFO << "Starting Armar4Context" << flush; // retrieve proxies @@ -63,7 +63,7 @@ namespace armarx kinematicUnitObserverPrx = getProxy<KinematicUnitObserverInterfacePrx>(kinematicUnitObserverName); ARMARX_LOG << eINFO << "Fetched proxies" << kinematicUnitPrx << " " << robotStateComponent << flush; - // initialize remote robot + // initialize remote robot remoteRobot.reset(new RemoteRobot(robotStateComponent->getSynchronizedRobot())); ARMARX_LOG << eINFO << "Created remote robot" << flush; } diff --git a/core/RobotStatechartContext.h b/source/HumanoidRobotAPI/core/RobotStatechartContext.h similarity index 97% rename from core/RobotStatechartContext.h rename to source/HumanoidRobotAPI/core/RobotStatechartContext.h index 0093e7196..e579736d5 100644 --- a/core/RobotStatechartContext.h +++ b/source/HumanoidRobotAPI/core/RobotStatechartContext.h @@ -63,8 +63,8 @@ namespace armarx public: // inherited from Component virtual std::string getDefaultName() { return "RobotStatechartContext"; }; - virtual void onInitComponent(); - virtual void onConnectComponent(); + virtual void onInitStatechart(); + virtual void onConnectStatechart(); // todo:read access should only be allowed via const getters ?! //const VirtualRobot::RobotPtr getRobot(); diff --git a/motioncontrol/CMakeLists.txt b/source/HumanoidRobotAPI/motioncontrol/CMakeLists.txt similarity index 93% rename from motioncontrol/CMakeLists.txt rename to source/HumanoidRobotAPI/motioncontrol/CMakeLists.txt index 5e9d66a94..8a9538c6f 100755 --- a/motioncontrol/CMakeLists.txt +++ b/source/HumanoidRobotAPI/motioncontrol/CMakeLists.txt @@ -20,7 +20,6 @@ if (ARMARX_BUILD) set(LIB_FILES MotionControl.cpp) set(LIB_HEADERS MotionControl.h) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..) use_ice() add_library(${LIB_NAME} SHARED ${LIB_FILES} ${LIB_HEADERS}) diff --git a/motioncontrol/MotionControl.cpp b/source/HumanoidRobotAPI/motioncontrol/MotionControl.cpp similarity index 100% rename from motioncontrol/MotionControl.cpp rename to source/HumanoidRobotAPI/motioncontrol/MotionControl.cpp diff --git a/motioncontrol/MotionControl.h b/source/HumanoidRobotAPI/motioncontrol/MotionControl.h similarity index 98% rename from motioncontrol/MotionControl.h rename to source/HumanoidRobotAPI/motioncontrol/MotionControl.h index 617c6dee1..9df74276b 100644 --- a/motioncontrol/MotionControl.h +++ b/source/HumanoidRobotAPI/motioncontrol/MotionControl.h @@ -2,7 +2,7 @@ #define MOTIONCONTROL_H #include <Core/statechart/Statechart.h> -#include <core/RobotStatechartContext.h> +#include <HumanoidRobotAPI/core/RobotStatechartContext.h> namespace armarx { -- GitLab