22 #include "MALegMoved.hpp" 24 #include "core/MARandomness.hpp" 25 #include "types/MARobotState.hpp" 26 #include "controllers/MALedsController.hpp" 27 #include "controllers/MALegController.hpp" 28 #include "controllers/MASpeakerController.hpp" 29 #include "MALegLyingPosition.hpp" 30 #include "MALegSittingPosition.hpp" 31 #include "MALegMoveAway.hpp" 32 #include "MALegPull.hpp" 34 MALegMoved::MALegMoved(MA::Leg::LegTypes leg_type) :
96 if (!MALEGBEHAVIOR_IS_ACTIVATED(
MALegMoved, MA::Leg::LF) &&
97 !MALEGBEHAVIOR_IS_ACTIVATED(
MALegMoved, MA::Leg::LH) &&
98 !MALEGBEHAVIOR_IS_ACTIVATED(
MALegMoved, MA::Leg::RF) &&
99 !MALEGBEHAVIOR_IS_ACTIVATED(
MALegMoved, MA::Leg::RH))
virtual void FailingActions() override
Perform actions when the behavior is being failed.
#define MA_RANDOM_POINT_1(_variable_name, _min, _max)
Set a random point with one value.
virtual MABehavior::StimulusLevelType GetCurrentStimulus() override
Get the current behavior stimulus.
MA::DesiredConnectionMap DesiredConnections
Desired connection map to other behaviors.
MALegController * Controller
Leg controller.
virtual bool IsFinished() override
Whether the behavior is finished.
int PlaySound(const std::string &name)
Play a sound and register the playback.
Base class for leg behaviors.
Moves the leg away from the body.
void SetSelfActivationDuration(const int new_duration)
Set the self-activation duration.
MA::Leg::LegTypes Type
The leg type.
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.
virtual void FinishingActions() override
Perform actions when the behavior is being finished.
virtual bool IsFailed() override
Whether the behavior is failed.
void StartTransition(MAController &controller, const std::string &transition_name)
Start a transition.
The leg is being moved on its own.
virtual void ActivatingActions() override
Perform actions when the behavior is being activated.