22 #include "MABodyTurnRight.hpp" 26 #include "types/MAComplexIndicators.hpp" 27 #include "types/MAGoals.hpp" 28 #include "types/MARobotState.hpp" 29 #include "controllers/MALegController.hpp" 31 #include "MABodyAdjustStandingPosture.hpp" 32 #include "MABodyStateMaster.hpp" 49 MA::RobotState->Goals->DesiredRightTurnDuration;
55 std::string Suffix =
":1.8";
57 if (MA::RobotState->ComplexIndicators->ElapsedRightTurnTime == 0)
64 if (MA::RobotState->ComplexIndicators->ElapsedRightTurnTime == 0)
65 MA::RobotState->ComplexIndicators->ElapsedRightTurnTime = 1;
79 if (MA::RobotState->ComplexIndicators->ElapsedRightTurnTime >=
80 MA::RobotState->Goals->DesiredRightTurnDuration)
82 MC_LOG(
"Right turn duration: %d msec (desired: %d msec)",
83 (
int)MA::RobotState->ComplexIndicators->ElapsedRightTurnTime,
84 (
int)MA::RobotState->Goals->DesiredRightTurnDuration);
86 MC_LOG(
"The right turn duration is less than the desired (%d < %d)",
87 (
int)MA::RobotState->ComplexIndicators->ElapsedRightTurnTime,
88 (
int)MA::RobotState->Goals->DesiredRightTurnDuration);
int GetElapsedActivatedStateTime() const
Get the elapsed activated state time.
MA::DesiredConnectionMap DesiredConnections
Desired connection map to other behaviors.
#define MABEHAVIOR_CREATE(_behavior, _master,...)
Create behaviors with custom constructor safely.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.
virtual void FailingActions() override
Perform actions when the behavior is being failed.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
virtual bool IsFailed() override
Whether the behavior is failed.
#define MC_LOG(...)
Debug macro.
virtual void FinishingActions() override
Perform actions when the behavior is being finished.