22 #include "MALegSittingPosition.hpp" 24 #include "types/MABodyMotion.hpp" 25 #include "types/MARobotState.hpp" 26 #include "controllers/MALegController.hpp" 27 #include "MALegMoveAway.hpp" 28 #include "MALegMoved.hpp" 29 #include "MAMotorOverload.hpp" 31 MALegSittingPosition::MALegSittingPosition(MA::Leg::LegTypes leg_type) :
42 if (MA::RobotState->BodyMotion->Sitting > 80 && !Controller->IsSittingPosition() &&
43 !MALEGBEHAVIOR_IS_ACTIVATED(
MALegMoved, Controller->GetLegType()))
56 if (Controller->IsBack())
75 Controller->SetPower(
false);
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
virtual bool IsFailed() override
Whether the behavior is failed.
Base class for leg behaviors.
virtual void FinishingActions() override
Perform actions when the behavior is being finished.
Moves the leg away from the body.
void SetSelfActivationDuration(const int new_duration)
Set the self-activation duration.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
MABehavior * GetMaster()
Get the master behavior.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.
The leg is being moved on its own.