|
|
static DEFINE_TACTIC_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS constexpr double | MIN_PASS_START_SPEED_M_PER_SEC = 0.02 |
| |
|
static constexpr double | BALL_MIN_MOVEMENT_SPEED_M_PER_SEC = 0.04 |
| |
|
static constexpr Angle | MIN_STRAY_PASS_ANGLE = Angle::fromDegrees(60) |
| |
|
static constexpr double | MIN_STRAY_PASS_SPEED = 0.3 |
| |
◆ ReceiverFSM()
| ReceiverFSM |
( |
TbotsProto::ReceiverTacticConfig |
receiver_tactic_config | ) |
|
|
inlineexplicit |
Constructor for ReceiverFSM
- Parameters
-
| receiver_tactic_config | The config to fetch parameters from |
◆ adjustReceive()
| void adjustReceive |
( |
const Update & |
event | ) |
|
Constantly adjust the receives position to be directly infront of the ball for better reception. This is especially useful for long passes where the ball might not end up exactly at the pass.receiverPoint()
- Parameters
-
| event | ReceiverFSM::Update event |
◆ getOneTouchShotDirection()
| Angle getOneTouchShotDirection |
( |
const Ray & |
shot, |
|
|
const Ball & |
ball |
|
) |
| |
|
static |
Given a shot and the ball, figures out the angle the robot should be facing to perform a one-touch shot.
- Parameters
-
| shot | The shot to take |
| ball | The ball on the field |
◆ getOneTouchShotPositionAndOrientation()
| Shot getOneTouchShotPositionAndOrientation |
( |
const Robot & |
robot, |
|
|
const Ball & |
ball, |
|
|
const Point & |
best_shot_target |
|
) |
| |
|
static |
Figures out the location of the one-touch shot and orientation the robot should face
- Parameters
-
| robot | The robot performing the one-touch |
| ball | The ball on the field |
| best_shot_target | The point to shoot at |
◆ onetouchPossible()
| bool onetouchPossible |
( |
const Update & |
event | ) |
|
Checks if a one touch shot is possible
- Parameters
-
| event | ReceiverFSM::Update event |
- Returns
- true if one-touch possible
◆ passFinished()
| bool passFinished |
( |
const Update & |
event | ) |
|
Check if the pass has finished by checking if we the robot has a ball near its dribbler.
- Parameters
-
| event | ReceiverFSM::Update event |
- Returns
- true if the ball is near a robots mouth
◆ passStarted()
| bool passStarted |
( |
const Update & |
event | ) |
|
Guard that checks if the ball has been kicked
- Parameters
-
| event | PivotKickFSM::Update event |
- Returns
- if the ball has been kicked
◆ strayPass()
| bool strayPass |
( |
const Update & |
event | ) |
|
If the pass is in progress and is deviating more than MIN_STRAY_PASS_ANGLE, return true so that the receiver can react and intercept the ball.
- Parameters
-
| event | ReceiverFSM::Update event |
- Returns
- true if stray pass
◆ updateOnetouch()
| void updateOnetouch |
( |
const Update & |
event | ) |
|
If we have a shot on net, then update the receiver fsm to setup for a one-touch shot.
NOTE: This must be used with the onetouch_possible guard, which checks for one-touch feasibility.
- Parameters
-
| event | ReceiverFSM::Update event |
◆ updateReceive()
| void updateReceive |
( |
const Update & |
event | ) |
|
One-touch shot is not possible, just receive ball as cleanly as possible.
- Parameters
-
| event | ReceiverFSM::Update event |
The documentation for this struct was generated from the following files:
- src/software/ai/hl/stp/tactic/receiver/receiver_fsm.h
- src/software/ai/hl/stp/tactic/receiver/receiver_fsm.cpp