Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ def perform(self, reevaluate=False):
else:
if self.blackboard.gamestate.get_secondary_team() == self.team_id:
return "OUR"
# @TODO: handle this better and potentially adapt KickOffTimeUp
elif (
self.blackboard.gamestate.get_secondary_team() == 255
or self.blackboard.gamestate.get_secondary_team() == 0
):
return "NONE"

return "OTHER"

def get_reevaluate(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $AvoidBall
$GoalScoreRecently
YES --> $ConfigRole
GOALIE --> $RobotInOwnPercentOfField + p:40
YES -->@Stand + duration:1.0 + r:false, @PlayAnimationCheering + r:false, @GetWalkready + r:false
YES --> @Stand + duration:1.0 + r:false, @PlayAnimationCheering + r:false, @GetWalkready + r:false
NO --> @ChangeAction + action:positioning, @PlaySound + file:ole.wav, @LookAtFieldFeatures, @Stand + duration:%ready_wait_time, @AvoidBallActive, @GoToRolePosition
ELSE --> @ChangeAction + action:positioning, @PlaySound + file:ole.wav, @LookAtFieldFeatures, @Stand + duration:%ready_wait_time, @AvoidBallActive, @GoToRolePosition
NO --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @Stand + duration:%ready_wait_time, @AvoidBallActive, @GoToRolePosition
Expand Down Expand Up @@ -85,15 +85,14 @@ $PassStarted
#PenaltyShootoutBehavior
$SecondaryStateTeamDecider
OUR --> @StandAndWaitRandom + min:10 + max:30, @KickBallDynamic + r:true + type:penalty, @Stand
OTHER --> $BallDangerous + radius:1.3
ELSE --> $BallDangerous + radius:1.3
LEFT --> @PlayAnimationGoalieFallLeft, @Stand
RIGHT --> @PlayAnimationGoalieFallRight, @Stand
CENTER --> @PlayAnimationGoalieFallCenter, @Stand
ELSE --> $BallSeen
YES --> @TrackBall, @Stand
NO --> @LookAtFieldFeatures, @Stand


#Placing
$DoOnce
NOT_DONE --> @ForgetBall, @LookAtFieldFeatures
Expand All @@ -102,7 +101,7 @@ $DoOnce
ELSE --> $BallSeen
NO --> $SecondaryStateTeamDecider
OUR --> #SearchBall
OTHER --> @AvoidBallActive, @LookAtFieldFeatures, @WalkInPlace + duration:2, @GoToRelativePosition + x:1 + y:0 + t:0, @Stand
ELSE --> @AvoidBallActive, @LookAtFieldFeatures, @WalkInPlace + duration:2, @GoToRelativePosition + x:1 + y:0 + t:0, @Stand
YES --> $RankToBallNoGoalie
FIRST --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @AvoidBallActive, @GoToDefensePosition + mode:freekick_first
SECOND --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @AvoidBallActive, @GoToDefensePosition + mode:freekick_second
Expand Down Expand Up @@ -136,7 +135,7 @@ $SecondaryStateDecider
TIMEOUT --> #StandAndLook
ELSE --> $SecondaryStateTeamDecider
OUR --> #NormalBehavior
OTHER --> #Placing
ELSE --> #Placing
NORMAL --> #NormalBehavior
OVERTIME --> #NormalBehavior

Expand All @@ -154,11 +153,14 @@ $IsPenalized
NOT_DONE --> @ChangeAction + action:waiting + r:false, @LookAtFieldFeatures + r:false, @Stand + duration:2
DONE --> #PositioningReady
SET --> $WhistleDetected
DETECTED --> #PlayingBehavior
DETECTED --> $SecondaryStateTeamDecider
OUR --> #PlayingBehavior
OTHER --> #StandAndLook
ELSE --> #PlayingBehavior
NOT_DETECTED --> $SecondaryStateDecider
PENALTYSHOOT --> $SecondaryStateTeamDecider
OUR --> @Stand + duration:0.1 + r:false, @DeactivateHCM + r:false, @LookForward + r:false, @PlayAnimationInitInSim + r:false, @GetWalkready + r:false, @Stand // we need to also see the goalie
OTHER --> $BallSeen
ELSE --> $BallSeen
YES --> @Stand + duration:0.1 + r:false, @DeactivateHCM + r:false, @LookForward + r:false, @PlayAnimationInitInSim + r:false, @GetWalkready + r:false, @TrackBall + r:false, @PlayAnimationGoalieArms + r:false, @Stand // goalie only needs to care about the ball
NO --> @Stand + duration:0.1 + r:false, @DeactivateHCM + r:false, @LookForward + r:false, @PlayAnimationInitInSim + r:false, @GetWalkready + r:false, @LookAtFieldFeatures + r:false, @PlayAnimationGoalieArms + r:false, @Stand
ELSE --> #StandAndLook
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<launch>
<arg name="audio" default="true" description="Whether the audio system should be started" />
<arg name="audio" default="false" description="Whether the audio system should be started" />
<arg name="behavior" default="true" description="Whether the behavior control system should be started" />
<arg name="behavior_dsd_file" default="main.dsd" description="The behavior dsd file that should be used" />
<arg name="game_controller" default="true" description="Whether the Gamecontroller module should be started" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,18 @@ def perform(self, reevaluate=False):
if game_phase_number == GameState.GAME_PHASE_PENALTY_SHOOT_OUT:
if self.blackboard.gamestate.has_kickoff():
return "OUR"

return "OTHER"
else:
if self.blackboard.gamestate.get_secondary_team() == self.team_id:
return "OUR"
# @TODO: handle this better and potentially adapt KickOffTimeUp
elif (
self.blackboard.gamestate.get_secondary_team() == 255
or self.blackboard.gamestate.get_secondary_team() == 0
):
return "NONE"

return "OTHER"

def get_reevaluate(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#InitSet
$SecondaryStateDecider
PENALTYSHOOT --> $SecondaryStateTeamDecider
OTHER --> @InitGoal, @DoNothing // Init as kicker
OUR --> @InitPenaltyKick, @DoNothing // Init as goalie
ELSE --> @InitGoal, @DoNothing // Init as kicker
ELSE --> $CheckPickup
UP --> @WaitForPickupEnd + r:false, @InitSide, @DoNothing
ELSE --> @DoNothing
Expand Down
Loading