diff --git a/scenarios/tests/CMakeLists.txt b/scenarios/tests/CMakeLists.txt index 8aec5dbf1ec6f311c170e0720c834d0f0a145101..6fe1633926efe66a8f149f774359d54e3e2917c2 100644 --- a/scenarios/tests/CMakeLists.txt +++ b/scenarios/tests/CMakeLists.txt @@ -1,6 +1,3 @@ - add_subdirectory(statecharttestscenario) add_subdirectory(WeissHapticSensorsUnitTest) - - - +add_subdirectory(InertialMeasurementUnit) diff --git a/scenarios/tests/InertialMeasurementUnit/CMakeLists.txt b/scenarios/tests/InertialMeasurementUnit/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f26b47b2fe9f95208f79d43c5eeee62eeaa6411d --- /dev/null +++ b/scenarios/tests/InertialMeasurementUnit/CMakeLists.txt @@ -0,0 +1,20 @@ +# Add your components below as shown in the following example: +# +# set(SCENARIO_COMPONENTS +# ConditionHandler +# Observer +# PickAndPlaceComponent) + +set(SCENARIO_COMPONENTS + XsensIMUApp + InertialMeasurementUnitObserverApp + ) + +# optional 3rd parameter: "path/to/global/config.cfg" +armarx_scenario("InertialMeasurementUnit" "${SCENARIO_COMPONENTS}") + +#set(SCENARIO_CONFIGS +# config/ComponentName.optionalString.cfg +# ) +# optional 3rd parameter: "path/to/global/config.cfg" +#armarx_scenario_from_configs("InertialMeasurementUnit" "${SCENARIO_CONFIGS}") diff --git a/source/RobotAPI/applications/CMakeLists.txt b/source/RobotAPI/applications/CMakeLists.txt index 4419a2a7548c3ba2fffa13e5a86fc31cd7eafefa..3599c80085f66dc1186af4df6147d23b01894722 100644 --- a/source/RobotAPI/applications/CMakeLists.txt +++ b/source/RobotAPI/applications/CMakeLists.txt @@ -22,3 +22,6 @@ add_subdirectory(ForceTorqueUnitSimulation) add_subdirectory(MMMPlayer) + +add_subdirectory(XsensIMU) +add_subdirectory(InertialMeasurementUnitObserver) diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9fd6cf01ff46b757947cacb71591b6edba6b9d7b --- /dev/null +++ b/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt @@ -0,0 +1,16 @@ +armarx_component_set_name("InertialMeasurementUnitObserverApp") + +#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 ArmarXInterfaces ArmarXCore ArmarXCoreObservers RobotAPIUnits) + +set(EXE_SOURCE InertialMeasurementUnitObserverApp.h main.cpp) + +armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h b/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h new file mode 100644 index 0000000000000000000000000000000000000000..eb1acbd082b3e17a9ba4a8fea2694c4b25ab0b1c --- /dev/null +++ b/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h @@ -0,0 +1,56 @@ +/* + * 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::InertialMeasurementUnitObserver + * @author Markus Grotz ( markus-grotz at web dot de ) + * @date 2015 + * @copyright http://www.gnu.org/licenses/gpl.txt + * GNU General Public License + */ + +#ifndef _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H +#define _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H + + +#include <RobotAPI/components/units/InertialMeasurementUnitObserver.h> + +#include <Core/core/application/Application.h> +#include <Core/core/Component.h> + + +namespace armarx +{ + /** + * @class InertialMeasurementUnitObserverApp + * @brief A brief description + * + * Detailed Description + */ + class InertialMeasurementUnitObserverApp : + virtual public armarx::Application + { + /** + * @see armarx::Application::setup() + */ + void setup(const ManagedIceObjectRegistryInterfacePtr& registry, + Ice::PropertiesPtr properties) + { + registry->addObject( Component::create<InertialMeasurementUnitObserver>(properties) ); + } + }; +} + +#endif diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp b/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..661d5706f88f4630aad7da1be2749629c69f9cd6 --- /dev/null +++ b/source/RobotAPI/applications/InertialMeasurementUnitObserver/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::InertialMeasurementUnitObserver + * @author Markus Grotz ( markus-grotz at web dot de ) + * @date 2015 + * @copyright http://www.gnu.org/licenses/gpl.txt + * GNU General Public License + */ + +#include "InertialMeasurementUnitObserverApp.h" +#include <Core/core/logging/Logging.h> + +int main(int argc, char* argv[]) +{ + armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::InertialMeasurementUnitObserverApp > (); + app->setName("InertialMeasurementUnitObserver"); + + return app->main(argc, argv); +} diff --git a/source/RobotAPI/applications/XsensIMU/CMakeLists.txt b/source/RobotAPI/applications/XsensIMU/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..73778cdf5323c15503526ab8e9461e503dd2e3e4 --- /dev/null +++ b/source/RobotAPI/applications/XsensIMU/CMakeLists.txt @@ -0,0 +1,16 @@ +armarx_component_set_name("XsensIMUApp") + +#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 ArmarXInterfaces ArmarXCore XsensIMU) + +set(EXE_SOURCE XsensIMUApp.h main.cpp) + +armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h b/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h new file mode 100644 index 0000000000000000000000000000000000000000..92c9f0be0193fb1d8a30794a43443b229c332547 --- /dev/null +++ b/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h @@ -0,0 +1,56 @@ +/* + * 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::XsensIMU + * @author Markus Grotz ( markus-grotz at web dot de ) + * @date 2015 + * @copyright http://www.gnu.org/licenses/gpl.txt + * GNU General Public License + */ + +#ifndef _ARMARX_APPLICATION_RobotAPI_XsensIMU_H +#define _ARMARX_APPLICATION_RobotAPI_XsensIMU_H + + +#include <RobotAPI/libraries/drivers/XsensIMU/XsensIMU.h> + +#include <Core/core/application/Application.h> +#include <Core/core/Component.h> + + +namespace armarx +{ + /** + * @class XsensIMUApp + * @brief A brief description + * + * Detailed Description + */ + class XsensIMUApp : + virtual public armarx::Application + { + /** + * @see armarx::Application::setup() + */ + void setup(const ManagedIceObjectRegistryInterfacePtr& registry, + Ice::PropertiesPtr properties) + { + registry->addObject( Component::create<XsensIMU>(properties) ); + } + }; +} + +#endif diff --git a/source/RobotAPI/applications/XsensIMU/main.cpp b/source/RobotAPI/applications/XsensIMU/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e58d9dd795abaf00f1e9eb2d7af93c47c413f6cf --- /dev/null +++ b/source/RobotAPI/applications/XsensIMU/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::XsensIMU + * @author Markus Grotz ( markus-grotz at web dot de ) + * @date 2015 + * @copyright http://www.gnu.org/licenses/gpl.txt + * GNU General Public License + */ + +#include "XsensIMUApp.h" +#include <Core/core/logging/Logging.h> + +int main(int argc, char* argv[]) +{ + armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::XsensIMUApp > (); + app->setName("XsensIMU"); + + return app->main(argc, argv); +}