◆ PenaltyKickFSM()
◆ adjustOrientationForShot()
| void adjustOrientationForShot |
( |
const Update & |
event, |
|
|
boost::sml::back::process< DribbleFSM::Update > |
processEvent |
|
) |
| |
Action that orients the shooter to prepare for a shot.
- Parameters
-
| event | PenaltyKickFSM::Update |
| processEvent | processes the DribbleFSM::Update |
◆ evaluateNextShotPosition()
| const Point evaluateNextShotPosition |
( |
std::optional< Robot > |
enemy_goalie, |
|
|
Field |
field |
|
) |
| |
|
static |
Helper function that returns the point on the enemy goal line where the shooter should aim at.
- Parameters
-
| enemy_goalie | the goalie that the shooter is scoring against |
| field | the field being played on |
- Returns
- the Point on the enemy goal-line where the shooter robot should aim
◆ evaluatePenaltyShot()
| bool evaluatePenaltyShot |
( |
std::optional< Robot > |
enemy_goalie, |
|
|
Field |
field, |
|
|
Point |
ball_position, |
|
|
Robot |
robot |
|
) |
| |
|
static |
Helper function that determines whether the shooter robot has a viable shot on net.
- Parameters
-
| enemy_goalie | the enemy goalie that we are scoring against |
| field | the current field being played on |
| ball_position | the coordinate location of the ball |
| robot | the shooter robot |
- Returns
- true if the robot has a viable shot and false if the enemy goalkeeper will likely save the shot.
B
+--\----------------------------------+ goal line
\ +-------+
\ C | | enemy_goalie
\ ---+-------+
\ ---/
\ ---/
\ ---/
A --/
\
\
\
\ D
+-------+
| | bot
+-------+
Segment BD represents the ball's path to the goal Segment AC is the smallest path required by the enemy to intercept BD
This function returns true when the enemy goalie doesn't have enough time to block the shot at A before the ball moves past that point.
◆ shoot()
| void shoot |
( |
const Update & |
event, |
|
|
boost::sml::back::process< KickFSM::Update > |
processEvent |
|
) |
| |
Action that causes the shooter to shoot the ball.
- Parameters
-
| event | PenaltyKickFSM::Update event |
| processEvent | processes the KickFSM::Update |
◆ takePenaltyShot()
| bool takePenaltyShot |
( |
const Update & |
event | ) |
|
Guard that returns true if the shooter has a good shot on goal or if it is forced to shoot due to the penalty timeout.
Requires complete approach to already be set.
- Parameters
-
| event | PenaltyKickFSM::Update |
◆ timeOutApproach()
| bool timeOutApproach |
( |
const Update & |
event | ) |
|
Returns true if we pass the timeout for completing the approach play towards the keeper.
Requires complete approach to already be set.
- Parameters
-
| event | PenaltyKickFSM::Update |
◆ updateApproachKeeper()
| void updateApproachKeeper |
( |
const Update & |
event, |
|
|
boost::sml::back::process< DribbleFSM::Update > |
processEvent |
|
) |
| |
Action that updates the shooter's approach to the opposition net.
- Parameters
-
| event | PenaltyKickFSM::Update event |
| processEvent | processes the DribbleFSM::Update |
The documentation for this struct was generated from the following files:
- src/software/ai/hl/stp/tactic/penalty_kick/penalty_kick_fsm.h
- src/software/ai/hl/stp/tactic/penalty_kick/penalty_kick_fsm.cpp