22 #include "MABodyTurnLeft.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->DesiredLeftTurnDuration;
55 std::string Suffix =
":1.8";
57 if (MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime == 0)
64 if (MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime == 0)
65 MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime = 1;
79 if (MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime >=
80 MA::RobotState->Goals->DesiredLeftTurnDuration)
82 MC_LOG(
"Left turn duration: %d msec (desired: %d msec)",
83 (
int)MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime,
84 (
int)MA::RobotState->Goals->DesiredLeftTurnDuration);
86 MC_LOG(
"The left turn duration is less than the desired (%d < %d)",
87 (
int)MA::RobotState->ComplexIndicators->ElapsedLeftTurnTime,
88 (
int)MA::RobotState->Goals->DesiredLeftTurnDuration);
virtual bool IsFailed() override
Whether the behavior is failed.
virtual void FailingActions() override
Perform actions when the behavior is being failed.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.
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.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
#define MC_LOG(...)
Debug macro.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
virtual void FinishingActions() override
Perform actions when the behavior is being finished.