ControlModeChooser.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2014-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package RobotSkillTemplates::FindAndGraspObjectGroup
19
* @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
20
* @date 2014
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
25
#include "
ControlModeChooser.h
"
26
27
using namespace
armarx
;
28
using namespace
FindAndGraspObjectGroup;
29
30
// DO NOT EDIT NEXT LINE
31
ControlModeChooser::SubClassRegistry
ControlModeChooser::Registry
(
ControlModeChooser::GetName
(), &
ControlModeChooser::CreateInstance
);
32
33
34
35
ControlModeChooser::ControlModeChooser
(
XMLStateConstructorParams
stateData) :
36
XMLStateTemplate
<
ControlModeChooser
> (stateData)
37
{
38
}
39
40
void
ControlModeChooser::onEnter
()
41
{
42
ARMARX_VERBOSE
<<
"Entering ControlModeChooser::onEnter()"
;
43
44
const
std::string controlMode = getInput<std::string>(
"jointControlMode"
);
45
46
if
(controlMode ==
"vel"
)
47
{
48
sendEvent<EvVelControl>();
49
}
50
else
51
{
52
ARMARX_ERROR
<<
ARMARX_FUNCTION
<<
": controlMode "
<< controlMode <<
"nyi"
;
53
}
54
}
55
56
// DO NOT EDIT NEXT FUNCTION
57
std::string
ControlModeChooser::GetName
()
58
{
59
return
"ControlModeChooser"
;
60
}
61
62
// DO NOT EDIT NEXT FUNCTION
63
XMLStateFactoryBasePtr
ControlModeChooser::CreateInstance
(
XMLStateConstructorParams
stateData)
64
{
65
return
XMLStateFactoryBasePtr
(
new
ControlModeChooser
(stateData));
66
}
67
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition:
Logging.h:180
armarx::FindAndGraspObjectGroup::ControlModeChooser::Registry
static SubClassRegistry Registry
Definition:
ControlModeChooser.h:52
armarx::FindAndGraspObjectGroup::ControlModeChooser
Definition:
ControlModeChooser.h:39
armarx::XMLStateConstructorParams
Definition:
XMLState.h:50
armarx::FindAndGraspObjectGroup::ControlModeChooser::onEnter
void onEnter() override
Virtual function, in which the behaviour of state is defined, when it is entered. Can be overridden,...
Definition:
ControlModeChooser.cpp:40
ARMARX_FUNCTION
#define ARMARX_FUNCTION
Definition:
Logging.h:122
IceInternal::Handle
Definition:
forward_declarations.h:8
armarx::FindAndGraspObjectGroup::ControlModeChooser::ControlModeChooser
ControlModeChooser(XMLStateConstructorParams stateData)
Definition:
ControlModeChooser.cpp:35
armarx::XMLStateTemplate
Class for legacy to stay compatible with old statecharts.
Definition:
XMLState.h:137
armarx::FindAndGraspObjectGroup::ControlModeChooser::GetName
static std::string GetName()
Definition:
ControlModeChooser.cpp:57
ARMARX_ERROR
#define ARMARX_ERROR
Definition:
Logging.h:189
armarx::FindAndGraspObjectGroup::ControlModeChooser::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition:
ControlModeChooser.cpp:63
armarx::XMLStateFactoryBasePtr
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition:
XMLState.h:65
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
ControlModeChooser.h
RobotSkillTemplates
statecharts
deprecated
FindAndGraspObjectGroup
LiftObjectSubGroup
ControlModeChooser.cpp
Generated on Sat Oct 12 2024 09:14:13 for armarx_documentation by
1.8.17