22 #include "MAGoals.hpp" 24 #include "MAAudio.hpp" 25 #include "MABodyMotion.hpp" 26 #include "MARobotState.hpp" 27 #include "MAComplexIndicators.hpp" 28 #include "MATorso.hpp" 31 DesiredForwardWalkDuration(0, 0, 60000), DesiredBackwardWalkDuration(0, 0, 60000),
32 DesiredLeftTurnDuration(0, 0, 40000), DesiredRightTurnDuration(0, 0, 40000),
33 ArousalFeedbackNeeded(0, 0, 10000), ListenToAudioDesire(0, 0, 10000),
34 DiscoverSoundSource(0, 0, 2000), DesiredAudioCaptureDuration(0, 0, 5000)
81 GenerateHeadTurnDesires(state);
82 GenerateDiscoverSoundSource(state);
86 void MAGoals::GenerateHeadTurnDesires(
MARobotState& state)
95 const int HeadLeftRightLimit = 85;
99 state.
Head->LeftRight > -HeadLeftRightLimit)
107 state.
Head->LeftRight < HeadLeftRightLimit)
116 void MAGoals::GenerateDiscoverSoundSource(
MARobotState& state)
MANum< int > TurnHeadToLeft
Turn the head to left (goal)
MANum< int > DiscoverSoundSource
Desire to discover a sound source.
MANum< int > DesiredRightTurnDuration
The desired duration to turn right (in msec)
MANum< int > LiePostureDesire
Desire to go into lie posture.
MANum< int > DesiredForwardWalkDuration
The desired forward walk duration (in msec)
virtual void UpdateRobotState(MARobotState &state) override
Update the robot state.
MANum< int > MotionControl
Control the robot locomotion (goal)
MANum< int > DesiredBackwardWalkDuration
The desired backward walk duration (in msec)
MANum< int > ArousalFeedbackNeeded
Arousal feedback needed in the near time (in msec)
boost::scoped_ptr< MAComplexIndicators > ComplexIndicators
Complex indicators.
MAGoals()
Struct constructor.
MANum< int > TurnHeadToRight
Turn the head to right (goal)
MANum< int > SitPostureDesire
Desire to go into sit posture.
boost::scoped_ptr< MABodyMotion > BodyMotion
Body motion.
Robot state updater base class.
MANum< int > StandPostureDesire
Desire to go into stand posture.
void ResetLocomotionGoals()
Reset the locomotion goals.
boost::scoped_ptr< MATorso > Torso
Torso.
MANum< int > DesiredLeftTurnDuration
The desired duration to turn left (in msec)
bool IsLocomotionDesired() const
Check if the locomotion is desired now.
boost::scoped_ptr< MAHead > Head
Head.