Main Page
·
Modules
·
All Classes
·
Class Hierarchy
mindaibo
src
behaviors
MABodyPoseTransition.cpp
1
/*
2
* This file is part of the AiBO+ project
3
*
4
* Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5
*
6
* AiBO+ is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* AiBO+ is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19
*
20
*/
21
22
#include "MABodyPoseTransition.hpp"
23
24
#include "types/MAComplexIndicators.hpp"
25
#include "types/MARobotState.hpp"
26
27
MABodyPoseTransition::MABodyPoseTransition(
const
std::string& behavior_name) :
MABehavior
(behavior_name),
28
MARobotStateUpdater
(
MA
::UpdateComplexIndicators)
29
{
30
RegisterUpdater(*
this
);
31
}
32
33
34
void
MABodyPoseTransition::UpdateRobotState
(
MARobotState
& state)
35
{
36
if
(
GetState
() ==
MABehavior::Activated
)
37
{
38
state.
ComplexIndicators
->PoseTransition = 1;
39
}
else
{
40
state.
ComplexIndicators
->PoseTransition = 0;
41
}
42
}
MABehavior
Behavior base class.
Definition:
MABehavior.hpp:157
MARobotState::ComplexIndicators
boost::scoped_ptr< MAComplexIndicators > ComplexIndicators
Complex indicators.
Definition:
MARobotState.hpp:286
MABehavior::GetState
StateType GetState() const
Get the behavior state.
Definition:
MABehavior.hpp:393
MARobotStateUpdater
Robot state updater base class.
Definition:
MARobotStateUpdater.hpp:47
MA
Definition:
MABehavior.hpp:130
MARobotState
Robot state.
Definition:
MARobotState.hpp:79
MABehavior::Activated
Definition:
MABehavior.hpp:181
MABodyPoseTransition::UpdateRobotState
virtual void UpdateRobotState(MARobotState &state) override
Update the robot state.
Definition:
MABodyPoseTransition.cpp:34
Generated by
1.8.11