22 #include "MABodySittingBored.hpp" 24 #include "core/MARandomness.hpp" 25 #include "types/MAComplexIndicators.hpp" 26 #include "types/MAGoals.hpp" 27 #include "types/MARobotState.hpp" 28 #include "controllers/MALegController.hpp" 29 #include "MABodyLieDownFromSitting.hpp" 30 #include "MABodySitting.hpp" 31 #include "MABodyStandUpFromSitting.hpp" 32 #include "MABodyStroked.hpp" 33 #include "MAHeadLookAround.hpp" 34 #include "MAHeadTurnAhead.hpp" 35 #include "MAHeavyCalculations.hpp" 36 #include "MANumberGameMaster.hpp" 43 MA::RobotState->Goals->SitPostureDesire = 0;
56 if (MA::RobotState->ComplexIndicators->IsSittingPosture &&
57 !MA::LegLF->IsAnyActiveTransition() && !MA::LegLH->IsAnyActiveTransition() &&
58 !MA::LegRF->IsAnyActiveTransition() && !MA::LegRH->IsAnyActiveTransition() &&
62 if (MA::RobotState->Goals->LiePostureDesire != 0 ||
63 MA::RobotState->Goals->StandPostureDesire != 0 ||
64 MA::RobotState->Goals->DesiredLeftTurnDuration != 0 ||
65 MA::RobotState->Goals->DesiredRightTurnDuration != 0 ||
66 MA::RobotState->Goals->DesiredBackwardWalkDuration != 0 ||
67 MA::RobotState->Goals->DesiredForwardWalkDuration != 0)
83 if (MA::RobotState->Goals->ListenToAudioDesire > 0)
85 MA::RobotState->Goals->SitPostureDesire = 1;
89 if (MA::RobotState->Goals->LiePostureDesire != 0)
94 if (MA::RobotState->Goals->StandPostureDesire != 0 ||
95 MA::RobotState->Goals->DesiredLeftTurnDuration != 0 ||
96 MA::RobotState->Goals->DesiredRightTurnDuration != 0 ||
97 MA::RobotState->Goals->DesiredBackwardWalkDuration != 0 ||
98 MA::RobotState->Goals->DesiredForwardWalkDuration != 0)
111 if (NewAction >= 2 && NewAction <= 4)
120 MA::RobotState->Goals->DesiredForwardWalkDuration = ForwardWalkDuration;
#define MABEHAVIOR_IS_NORMAL(_behavior)
Check if a behavior exists and it is in normal state.
Number game master behavior.
#define MA_RANDOM_POINT_1(_variable_name, _min, _max)
Set a random point with one value.
#define MABEHAVIOR_DELETE(_behavior)
Delete a behavior safely (mark it dirty if exists)
The head looks around behavior.
Run heavy calculations during inactivity.
Body lies down from sitting behavior.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
Body stands up from sitting behavior.
void SetSelfActivationDuration(const int new_duration)
Set the self-activation duration.
#define MABEHAVIOR_CREATE(_behavior, _master,...)
Create behaviors with custom constructor safely.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
#define MABEHAVIOR_IS_ACTIVATED(_behavior)
Check if a behavior exists and it is in activated state.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.