SetPlatformVelocity.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::SetPlatformVelocityGroup
19
* @author [Author Name] ( [Author Email] )
20
* @date 2014
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
25
#include "
SetPlatformVelocity.h
"
26
#include <
RobotAPI/libraries/core/remoterobot/RemoteRobot.h
>
27
28
29
using namespace
armarx
;
30
using namespace
CoupledInteractionGroup;
31
32
// DO NOT EDIT NEXT LINE
33
SetPlatformVelocity::SubClassRegistry
SetPlatformVelocity::Registry
(
SetPlatformVelocity::GetName
(), &
SetPlatformVelocity::CreateInstance
);
34
35
36
37
SetPlatformVelocity::SetPlatformVelocity
(
XMLStateConstructorParams
stateData) :
38
XMLStateTemplate
<
SetPlatformVelocity
> (stateData), SetPlatformVelocityGeneratedBase <
SetPlatformVelocity
> (stateData)
39
{
40
}
41
42
void
SetPlatformVelocity::onEnter
()
43
{
44
CoupledInteractionGroupStatechartContext
* context = getContext<CoupledInteractionGroupStatechartContext>();
45
Vector3Ptr
platformVelocity
= in.getPlatformVelocity();
46
PlatformUnitInterfacePrx platformPrx = context->
getPlatformUnitProxy
();
47
ARMARX_INFO
<<
"Moving Platform with "
<<
platformVelocity
->x <<
" "
<<
platformVelocity
->y <<
" "
<<
platformVelocity
->z;
48
platformPrx->move(
platformVelocity
->x,
platformVelocity
->y,
platformVelocity
->z);
49
emitEvDone();
50
51
52
}
53
54
55
void
SetPlatformVelocity::onExit
()
56
{
57
58
// put your user code for the exit point here
59
// execution time should be short (<100ms)
60
61
}
62
63
// DO NOT EDIT NEXT FUNCTION
64
std::string
SetPlatformVelocity::GetName
()
65
{
66
return
"SetPlatformVelocity"
;
67
}
68
69
// DO NOT EDIT NEXT FUNCTION
70
XMLStateFactoryBasePtr
SetPlatformVelocity::CreateInstance
(
XMLStateConstructorParams
stateData)
71
{
72
return
XMLStateFactoryBasePtr
(
new
SetPlatformVelocity
(stateData));
73
}
74
armarx::channels::PlatformUnitObserver::platformVelocity
const PlatformUnitDatafieldCreator platformVelocity("platformVelocity")
RemoteRobot.h
armarx::CoupledInteractionGroup::CoupledInteractionGroupStatechartContext::getPlatformUnitProxy
PlatformUnitInterfacePrx getPlatformUnitProxy()
Definition:
CoupledInteractionGroupStatechartContext.h:137
armarx::CoupledInteractionGroup::SetPlatformVelocity::SetPlatformVelocity
SetPlatformVelocity(XMLStateConstructorParams stateData)
Definition:
SetPlatformVelocity.cpp:37
armarx::XMLStateConstructorParams
Definition:
XMLState.h:50
IceInternal::Handle< Vector3 >
armarx::XMLStateTemplate
Class for legacy to stay compatible with old statecharts.
Definition:
XMLState.h:137
SetPlatformVelocity.h
armarx::CoupledInteractionGroup::SetPlatformVelocity
Definition:
SetPlatformVelocity.h:34
armarx::CoupledInteractionGroup::SetPlatformVelocity::GetName
static std::string GetName()
Definition:
SetPlatformVelocity.cpp:64
armarx::CoupledInteractionGroup::SetPlatformVelocity::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition:
SetPlatformVelocity.cpp:70
armarx::XMLStateFactoryBasePtr
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition:
XMLState.h:65
armarx::CoupledInteractionGroup::SetPlatformVelocity::Registry
static SubClassRegistry Registry
Definition:
SetPlatformVelocity.h:48
ARMARX_INFO
#define ARMARX_INFO
Definition:
Logging.h:174
armarx::CoupledInteractionGroup::CoupledInteractionGroupStatechartContext
Definition:
CoupledInteractionGroupStatechartContext.h:88
armarx::CoupledInteractionGroup::SetPlatformVelocity::onEnter
void onEnter() override
Definition:
SetPlatformVelocity.cpp:42
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::CoupledInteractionGroup::SetPlatformVelocity::onExit
void onExit() override
Definition:
SetPlatformVelocity.cpp:55
RobotSkillTemplates
statecharts
CoupledInteractionGroup
SetPlatformVelocity.cpp
Generated on Sat Oct 12 2024 09:14:13 for armarx_documentation by
1.8.17