Skip to content

Commit

Permalink
Add demo behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Jun 21, 2024
1 parent 38480e9 commit b8283f0
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#SearchBall
@ChangeAction + action:searching, @LookAtFieldFeatures, @WalkInPlace + duration:3, @Turn

#DoNothing
@ChangeAction + action:waiting, @LookForward, @Stand

#StandAndLook
@ChangeAction + action:waiting, @LookAtFieldFeatures, @Stand

#PerformKickLeft
@ChangeAction + action:kicking, @LookAtFront, @Stand + duration:1.0 + r:false, @LookForward + r:false, @KickBallStatic + foot:left + r:false, @LookAtFieldFeatures + r:false, @Stand + duration:2 + r:false

#PerformKickRight
@ChangeAction + action:kicking, @LookAtFront, @Stand + duration:1.0 + r:false, @LookForward + r:false, @KickBallStatic + foot:right + r:false, @LookAtFieldFeatures + r:false, @Stand + duration:2 + r:false

#KickWithAvoidance
$AvoidBall
NO --> $BallClose + distance:%body.ball_reapproach_dist + angle:%body.ball_reapproach_angle
YES --> $BallKickArea
NEAR --> $FootSelection
LEFT --> #PerformKickLeft
RIGHT --> #PerformKickRight
FAR --> @ChangeAction + action:going_to_ball, @LookAtFront, @GoToBall + target:close
NO --> @ChangeAction + action:going_to_ball + r:false, @LookAtFieldFeatures + r:false, @AvoidBallActive + r:false, @GoToBall + target:close + blocking:false + distance:%body.ball_far_approach_dist
YES --> $ReachedPathPlanningGoalPosition + threshold:%body.ball_far_approach_position_thresh
YES --> @AvoidBallInactive
NO --> @ChangeAction + action:going_to_ball, @LookAtFieldFeatures, @GoToBall + target:close + distance:%body.ball_far_approach_dist

#Init
@Stand + duration:0.1 + r:false, @ChangeAction + action:waiting, @LookForward, @Stand

#NormalBehavior
$BallSeen
NO --> #SearchBall
YES --> #StrikerRole

-->BodyBehavior
$IsPenalized
YES --> #DoNothing
ELSE --> #NormalBehavior
INITIAL --> #Init
READY --> #StandAndLook
SET --> #StandAndLook
FINISHED --> @Stand + duration:0.5 + r:false, @PlaySound + file:fanfare.wav, @PlayAnimationCheering + r:false, @LookForward, @Stand
PLAYING --> #NormalBehavior

0 comments on commit b8283f0

Please sign in to comment.