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 
28 
29 
30 using namespace armarx;
31 using namespace CoupledInteractionGroup;
32 
33 // DO NOT EDIT NEXT LINE
34 SetPlatformVelocity::SubClassRegistry
37 
40  SetPlatformVelocityGeneratedBase<SetPlatformVelocity>(stateData)
41 {
42 }
43 
44 void
46 {
48  getContext<CoupledInteractionGroupStatechartContext>();
49  Vector3Ptr platformVelocity = in.getPlatformVelocity();
50  PlatformUnitInterfacePrx platformPrx = context->getPlatformUnitProxy();
51  ARMARX_INFO << "Moving Platform with " << platformVelocity->x << " " << platformVelocity->y
52  << " " << platformVelocity->z;
53  platformPrx->move(platformVelocity->x, platformVelocity->y, platformVelocity->z);
54  emitEvDone();
55 }
56 
57 void
59 {
60 
61  // put your user code for the exit point here
62  // execution time should be short (<100ms)
63 }
64 
65 // DO NOT EDIT NEXT FUNCTION
66 std::string
68 {
69  return "SetPlatformVelocity";
70 }
71 
72 // DO NOT EDIT NEXT FUNCTION
75 {
76  return XMLStateFactoryBasePtr(new SetPlatformVelocity(stateData));
77 }
armarx::channels::PlatformUnitObserver::platformVelocity
const PlatformUnitDatafieldCreator platformVelocity("platformVelocity")
RemoteRobot.h
armarx::CoupledInteractionGroup::CoupledInteractionGroupStatechartContext::getPlatformUnitProxy
PlatformUnitInterfacePrx getPlatformUnitProxy()
Definition: CoupledInteractionGroupStatechartContext.h:187
armarx::CoupledInteractionGroup::SetPlatformVelocity::SetPlatformVelocity
SetPlatformVelocity(XMLStateConstructorParams stateData)
Definition: SetPlatformVelocity.cpp:38
armarx::XMLStateConstructorParams
Definition: XMLState.h:49
armarx::XMLStateFactoryBasePtr
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition: XMLState.h:64
IceInternal::Handle< Vector3 >
armarx::XMLStateTemplate
Class for legacy to stay compatible with old statecharts.
Definition: XMLState.h:146
SetPlatformVelocity.h
armarx::CoupledInteractionGroup::SetPlatformVelocity
Definition: SetPlatformVelocity.h:37
armarx::CoupledInteractionGroup::SetPlatformVelocity::GetName
static std::string GetName()
Definition: SetPlatformVelocity.cpp:67
armarx::CoupledInteractionGroup::SetPlatformVelocity::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition: SetPlatformVelocity.cpp:74
armarx::CoupledInteractionGroup::SetPlatformVelocity::Registry
static SubClassRegistry Registry
Definition: SetPlatformVelocity.h:50
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:181
armarx::CoupledInteractionGroup::CoupledInteractionGroupStatechartContext
Definition: CoupledInteractionGroupStatechartContext.h:118
armarx::CoupledInteractionGroup::SetPlatformVelocity::onEnter
void onEnter() override
Definition: SetPlatformVelocity.cpp:45
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::CoupledInteractionGroup::SetPlatformVelocity::onExit
void onExit() override
Definition: SetPlatformVelocity.cpp:58