22 #include "MAWalkSwingBackward.hpp" 24 #include "types/MAComplexIndicators.hpp" 25 #include "types/MARobotState.hpp" 26 #include "controllers/MALegController.hpp" 27 #include "MAWalkBalanceToLeft.hpp" 28 #include "MAWalkBalanceToRight.hpp" 29 #include "MAWalkPushForward.hpp" 31 MAWalkSwingBackward::MAWalkSwingBackward(MA::Leg::LegTypes leg_type) :
35 if (!AnyLegSwingBackward())
37 float WalkPeriodQuarter = (float)MA::RobotState->ComplexIndicators->WalkPeriod / 11.0;
39 if (leg_type == MA::Leg::RF)
41 if (leg_type == MA::Leg::RH)
43 if (leg_type == MA::Leg::LF)
45 if (leg_type == MA::Leg::LH)
81 bool MAWalkSwingBackward::AnyLegSwingBackward()
Balances the body to left.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
MA::DesiredConnectionMap DesiredConnections
Desired connection map to other behaviors.
MALegController * Controller
Leg controller.
Base behavior for leg movement primitives during walk.
void SetSelfActivationDuration(const int new_duration)
Set the self-activation duration.
MA::Leg::LegTypes Type
The leg type.
StateType GetState() const
Get the behavior state.
#define MABEHAVIOR_CREATE(_behavior, _master,...)
Create behaviors with custom constructor safely.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.
std::string MCGetClassName(T *instance=nullptr, const std::string &name_suffix="")
Get a class name.
const MALeg & LegState
Leg state.
MABehavior * GetMaster()
Get the master behavior.
static MABehavior * GetBehavior(const std::string &type_name)
Get an existing behavior by type name.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
Balances the body to Right.