PlanMotionBase.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotSkillTemplates::MotionPlanningGroup
17 * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18 * @date 2016
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <mutex>
26
28
29#include <RobotSkillTemplates/statecharts/MotionPlanningGroup/PlanMotionBase.generated.h>
30
32{
33 class PlanMotionBase : public PlanMotionBaseGeneratedBase<PlanMotionBase>
34 {
35 public:
38 PlanMotionBaseGeneratedBase<PlanMotionBase>(stateData)
39 {
40 }
41
43 IceUtil::Shared(other),
44 StateIceBase(other),
45 StateBase(other),
46 StateController(other),
47 State(other),
48 XMLState(other),
50 PlanMotionBaseGeneratedBase<PlanMotionBase>(other)
51 {
52 //no need to copy the handle or mutex
53 }
54
55 // inherited from StateBase
56 void
57 onEnter() override
58 {
59 resetTask();
60 }
61
62 void run() override;
63
64 void
65 onBreak() override
66 {
67 resetTask();
68 }
69
70 void
71 onExit() override
72 {
73 resetTask();
74 }
75
76 void resetTask();
77
78 // static functions for AbstractFactory Method
80 static SubClassRegistry Registry;
81
82 // DO NOT INSERT ANY CLASS MEMBERS,
83 // use stateparameters instead,
84 // if classmember are neccessary nonetheless, reset them in onEnter
86 std::mutex taskMutex;
87 };
88} // namespace armarx::MotionPlanningGroup
PlanMotionBase(const PlanMotionBase &other)
PlanMotionBase(const XMLStateConstructorParams &stateData)
RandomShortcutPostprocessorTaskHandle task
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
This class is the implementation of the Slice Definition of a state.
Definition StateBase.h:60
The StateController class processes events and controls the statechart flow.
Class that offers the main functionality needed to create a statechart.
Definition State.h:54
Class for legacy to stay compatible with old statecharts.
Definition XMLState.h:147
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition XMLState.h:64
RemoteHandle< MotionPlanningMultiPathWithCostTaskControlInterfacePrx > RandomShortcutPostprocessorTaskHandle
Definition Task.h:130