Skip to content
Snippets Groups Projects
Commit 1fb03af6 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

added dmp component

parent a6e3e00b
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,5 @@ add_subdirectory(MMMPlayer)
add_subdirectory(robotstate)
add_subdirectory(RobotIK)
add_subdirectory(DMPComponent)
\ No newline at end of file
armarx_component_set_name("DMPComponent")
#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)
set(SOURCES
./DMPComponent.cpp
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
)
set(HEADERS
./DMPComponent.h
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
)
armarx_add_component("${SOURCES}" "${HEADERS}")
# add unit tests
add_subdirectory(test)
/*
* This file is part of ArmarX.
*
* 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::ArmarXObjects::DMPComponent
* @author Mirko Waechter ( mirko dot waechter at kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#include "DMPComponent.h"
using namespace armarx;
void DMPComponent::onInitComponent()
{
}
void DMPComponent::onConnectComponent()
{
}
void DMPComponent::onDisconnectComponent()
{
}
void DMPComponent::onExitComponent()
{
}
PropertyDefinitionsPtr DMPComponent::createPropertyDefinitions()
{
return PropertyDefinitionsPtr(new DMPComponentPropertyDefinitions(
getConfigIdentifier()));
}
/*
* This file is part of ArmarX.
*
* 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::ArmarXObjects::DMPComponent
* @author Mirko Waechter ( mirko dot waechter at kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#ifndef _ARMARX_COMPONENT_RobotAPI_DMPComponent_H
#define _ARMARX_COMPONENT_RobotAPI_DMPComponent_H
#include <Core/core/Component.h>
namespace armarx
{
/**
* @class DMPComponentPropertyDefinitions
* @brief
*/
class DMPComponentPropertyDefinitions:
public armarx::ComponentPropertyDefinitions
{
public:
DMPComponentPropertyDefinitions(std::string prefix):
armarx::ComponentPropertyDefinitions(prefix)
{
//defineRequiredProperty<std::string>("PropertyName", "Description");
//defineOptionalProperty<std::string>("PropertyName", "DefaultValue", "Description");
}
};
/**
* @class DMPComponent
* @ingroup Components
* @ingroup RobotAPI-Components
* @brief A brief description
*
*
* Detailed Description
*/
class DMPComponent :
virtual public armarx::Component
{
public:
/**
* @see armarx::ManagedIceObject::getDefaultName()
*/
virtual std::string getDefaultName() const
{
return "DMPComponent";
}
protected:
/**
* @see armarx::ManagedIceObject::onInitComponent()
*/
virtual void onInitComponent();
/**
* @see armarx::ManagedIceObject::onConnectComponent()
*/
virtual void onConnectComponent();
/**
* @see armarx::ManagedIceObject::onDisconnectComponent()
*/
virtual void onDisconnectComponent();
/**
* @see armarx::ManagedIceObject::onExitComponent()
*/
virtual void onExitComponent();
/**
* @see PropertyUser::createPropertyDefinitions()
*/
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions();
};
}
#endif
# Libs required for the tests
SET(LIBS ${LIBS} ArmarXCore DMPComponent)
armarx_add_test(DMPComponentTest DMPComponentTest.cpp "${LIBS}")
\ No newline at end of file
/*
* This file is part of ArmarX.
*
* 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::ArmarXObjects::DMPComponent
* @author Mirko Waechter ( mirko dot waechter at kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#define BOOST_TEST_MODULE RobotAPI::ArmarXObjects::DMPComponent
#define ARMARX_BOOST_TEST
#include <RobotAPI/Test.h>
#include <RobotAPI/components/DMPComponent/DMPComponent.h>
#include <iostream>
BOOST_AUTO_TEST_CASE(testExample)
{
armarx::DMPComponent instance;
BOOST_CHECK_EQUAL(true, true);
}
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