diff --git a/CMakeLists.txt b/CMakeLists.txt index e033f39f01f2a85d69f3b1c3fcdedb7d569fba79..7883e3c69d586e3016f35bc3d7cccdf334d1fd07 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 f65eda2388bf74b202e58cf9d602fa9395135d00..48e275d2f2ad04e0a84275e4c230f16a427094a3 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 59a5057a4431344e4f878eaf8804e9d0be936084..716dd4678938b0d4d8d603c0ddcf58d1eed62807 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 d67cf7d5dafdfd7966f9635a82424aa69530329a..6e5d8908793c6e10a28f0a66ae3de63947cba517 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 0093e7196db58e5c92125c6797d80dc94f63c7d7..e579736d589a4400532215a921e2df101fb8cbe1 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 5e9d66a94a7e49d50a525a164d9b45ca036f1a2f..8a9538c6fd392da3acde3f3b22dd615f53116fe6 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 617c6dee1dbb0d380226e2b148aa00dba9a2ceb4..9df74276bffea5c28af4fbd48b6b5679ff45abf6 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 {