Skip to content
Snippets Groups Projects
Commit e65c7ab7 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

apps now use runSimpleComponentApp (less code, less duplication)

parent 68c181ea
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 376 deletions
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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::applications
* @author Peter Kaiser (peter dot kaiser at kit dot edu)
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/components/units/BusInspectionUnitObserver.h>
namespace armarx
{
class BusInspectionUnitObserverApp :
virtual public armarx::Application
{
void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<BusInspectionUnitObserver>(properties));
}
};
}
...@@ -11,6 +11,6 @@ endif() ...@@ -11,6 +11,6 @@ endif()
set(COMPONENT_LIBS RobotAPIUnits) set(COMPONENT_LIBS RobotAPIUnits)
set(EXE_SOURCE main.cpp BusInspectionUnitObserverApp.h) set(EXE_SOURCE main.cpp)
armarx_add_component_executable("${EXE_SOURCE}") armarx_add_component_executable("${EXE_SOURCE}")
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "BusInspectionUnitObserverApp.h" #include <RobotAPI/components/units/BusInspectionUnitObserver.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::BusInspectionUnitObserverApp>(); return armarx::runSimpleComponentApp<armarx::BusInspectionUnitObserver>(argc, argv, "BusInspectionUnitObserver");
app->setName("BusInspectionUnitObserver");
return app->main(argc, argv);
} }
...@@ -11,6 +11,6 @@ endif() ...@@ -11,6 +11,6 @@ endif()
set(COMPONENT_LIBS RobotAPIUnits) set(COMPONENT_LIBS RobotAPIUnits)
set(EXE_SOURCE main.cpp ForceTorqueObserverApp.h) set(EXE_SOURCE main.cpp)
armarx_add_component_executable("${EXE_SOURCE}") armarx_add_component_executable("${EXE_SOURCE}")
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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 ArmarXCore::applications
* @author Kai Welke (weöle dot at kit dot edu)
* @date 2012
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/components/units/ForceTorqueObserver.h>
namespace armarx
{
class ForceTorqueObserverApp :
virtual public armarx::Application
{
void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<ForceTorqueObserver>(properties));
}
};
}
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "ForceTorqueObserverApp.h" #include <RobotAPI/components/units/ForceTorqueObserver.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::ForceTorqueObserverApp>(); return armarx::runSimpleComponentApp<armarx::ForceTorqueObserver>(argc, argv, "ForceTorqueObserver");
app->setName("ForceTorqueObserver");
return app->main(argc, argv);
} }
...@@ -10,6 +10,6 @@ endif() ...@@ -10,6 +10,6 @@ endif()
set(COMPONENT_LIBS RobotAPIUnits) set(COMPONENT_LIBS RobotAPIUnits)
set(SOURCES main.cpp ForceTorqueUnitSimulationApp.h) set(SOURCES main.cpp)
armarx_add_component_executable("${SOURCES}") armarx_add_component_executable("${SOURCES}")
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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::applications
* @author Peter Kaiser
* @date 2014
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/components/units/ForceTorqueUnitSimulation.h>
namespace armarx
{
/**
* Application for testing the armarx::ForceTorqueUnitSimulation
*/
class ForceTorqueUnitSimulationApp :
virtual public armarx::Application
{
/**
* @see armarx::Application::setup()
*/
void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<ForceTorqueUnitSimulation>(properties));
}
};
}
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "ForceTorqueUnitSimulationApp.h" #include <RobotAPI/components/units/ForceTorqueUnitSimulation.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::ForceTorqueUnitSimulationApp>(); return armarx::runSimpleComponentApp<armarx::ForceTorqueUnitSimulation>(argc, argv, "ForceTorqueUnitSimulation");
app->setName("ForceTorqueUnitSimulation");
return app->main(argc, argv);
} }
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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::HandUnitSimulation
* @author David Schiebener ( schiebener at kit dot edu )
* @date 2014
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#ifndef _ARMARX_APPLICATION_RobotAPI_HandUnitSimulation_H
#define _ARMARX_APPLICATION_RobotAPI_HandUnitSimulation_H
#include <RobotAPI/components/units/HandUnitSimulation.h>
#include <ArmarXCore/core/application/Application.h>
namespace armarx
{
/**
* @class HandUnitSimulationApp
* @brief A brief description
*
* Detailed Description
*/
class HandUnitSimulationApp :
virtual public armarx::Application
{
/**
* @see armarx::Application::setup()
*/
void setup(const ManagedIceObjectRegistryInterfacePtr& registry,
Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<HandUnitSimulation>(properties));
}
};
}
#endif
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "HandUnitSimulationApp.h" #include <RobotAPI/components/units/HandUnitSimulation.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::HandUnitSimulationApp > (); return armarx::runSimpleComponentApp<armarx::HandUnitSimulation>(argc, argv, "HandUnitSimulation");
app->setName("HandUnitSimulation");
return app->main(argc, argv);
} }
...@@ -10,6 +10,6 @@ endif() ...@@ -10,6 +10,6 @@ endif()
set(COMPONENT_LIBS RobotAPIUnits) set(COMPONENT_LIBS RobotAPIUnits)
set(EXE_SOURCE main.cpp HapticObserverApp.h) set(EXE_SOURCE main.cpp)
armarx_add_component_executable("${EXE_SOURCE}") armarx_add_component_executable("${EXE_SOURCE}")
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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::HapticObserver
* @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
* @date 2014
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#ifndef _ARMARX_APPLICATION_RobotAPI_HapticObserver_H
#define _ARMARX_APPLICATION_RobotAPI_HapticObserver_H
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/components/units/HapticObserver.h>
namespace armarx
{
/**
* @class HapticObserverApp
* @brief A brief description
*
* Detailed Description
*/
class HapticObserverApp :
virtual public armarx::Application
{
/**
* @see armarx::Application::setup()
*/
void setup(const ManagedIceObjectRegistryInterfacePtr& registry,
Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<HapticObserver>(properties));
}
};
}
#endif
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "HapticObserverApp.h" #include <RobotAPI/components/units/HapticObserver.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::HapticObserverApp > (); return armarx::runSimpleComponentApp<armarx::HapticObserver>(argc, argv, "HapticObserver");
app->setName("HapticObserver");
return app->main(argc, argv);
} }
...@@ -17,6 +17,6 @@ include_directories(${Simox_INCLUDE_DIRS}) ...@@ -17,6 +17,6 @@ include_directories(${Simox_INCLUDE_DIRS})
set(COMPONENT_LIBS RobotAPIUnits) set(COMPONENT_LIBS RobotAPIUnits)
set(SOURCES main.cpp HeadIKUnitApp.h) set(SOURCES main.cpp)
armarx_add_component_executable("${SOURCES}") armarx_add_component_executable("${SOURCES}")
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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 ArmarXCore::applications
* @author David Schiebener (schiebener at kit dot edu)
* @date 2014
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include <ArmarXCore/core/application/Application.h>
#include <RobotAPI/components/units/HeadIKUnit.h>
namespace armarx
{
class HeadIKUnitApp :
virtual public armarx::Application
{
void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties)
{
registry->addObject(Component::create<HeadIKUnit>(properties));
}
};
}
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "HeadIKUnitApp.h" #include <RobotAPI/components/units/HeadIKUnit.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::HeadIKUnitApp>(); return armarx::runSimpleComponentApp<armarx::HeadIKUnit>(argc, argv, "HeadIKUnit");
app->setName("HeadIKUnit");
return app->main(argc, argv);
} }
...@@ -11,6 +11,6 @@ armarx_component_set_name("InertialMeasurementUnitObserverApp") ...@@ -11,6 +11,6 @@ armarx_component_set_name("InertialMeasurementUnitObserverApp")
set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ArmarXCoreObservers RobotAPIUnits) set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ArmarXCoreObservers RobotAPIUnits)
set(EXE_SOURCE InertialMeasurementUnitObserverApp.h main.cpp) set(EXE_SOURCE main.cpp)
armarx_add_component_executable("${EXE_SOURCE}") armarx_add_component_executable("${EXE_SOURCE}")
/*
* This file is part of ArmarX.
*
* Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 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-2.0.txt
* GNU General Public License
*/
#ifndef _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H
#define _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H
#include <RobotAPI/components/units/InertialMeasurementUnitObserver.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/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
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
* GNU General Public License * GNU General Public License
*/ */
#include "InertialMeasurementUnitObserverApp.h" #include <RobotAPI/components/units/InertialMeasurementUnitObserver.h>
#include <ArmarXCore/core/application/Application.h>
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/logging/Logging.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::InertialMeasurementUnitObserverApp > (); return armarx::runSimpleComponentApp<armarx::InertialMeasurementUnitObserver>(argc, argv, "InertialMeasurementUnitObserver");
app->setName("InertialMeasurementUnitObserver");
return app->main(argc, argv);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment