◆ DribbleFSM()
| DribbleFSM |
( |
TbotsProto::DribbleTacticConfig |
dribble_tactic_config | ) |
|
|
inlineexplicit |
Constructor for DribbleFSM
- Parameters
-
| dribble_tactic_config | The config to fetch parameters from |
◆ calculateNextDribbleDestinationAndOrientation()
| std::tuple< Point, Angle > calculateNextDribbleDestinationAndOrientation |
( |
const Ball & |
ball, |
|
|
const Robot & |
robot, |
|
|
std::optional< Point > |
dribble_destination_opt, |
|
|
std::optional< Angle > |
final_dribble_orientation_opt |
|
) |
| |
|
static |
Calculates the next dribble destination and orientation
- Parameters
-
| ball | The ball |
| robot | The robot |
| dribble_destination_opt | The dribble destination |
| final_dribble_orientation_opt | The final dribble orientation |
- Returns
- the next dribble destination and orientation
◆ dribble()
| void dribble |
( |
const Update & |
event | ) |
|
Action to dribble the ball
This action will orient the robot towards the destination, dribble to the destination, and then pivot to face the expected orientation
- Parameters
-
◆ dribblingDone()
| bool dribblingDone |
( |
const Update & |
event | ) |
|
Guard that checks if the ball is at the dribble_destination and robot is facing the right direction with possession of the ball
- Parameters
-
- Returns
- if the ball is at the dribble_destination, robot is facing the correct direction and ahs possession of the ball
◆ findInterceptionPoint()
Calculates the interception point for intercepting balls
- Parameters
-
| robot | The robot to do the interception |
| ball | The ball to intercept @field The field to intercept on |
- Returns
- the best interception point
◆ getDribbleBallDestination()
| Point getDribbleBallDestination |
( |
const Point & |
ball_position, |
|
|
std::optional< Point > |
dribble_destination |
|
) |
| |
|
static |
Gets the destination to dribble the ball to from the update event
- Parameters
-
- Returns
- the destination to dribble the ball to
◆ getFinalDribbleOrientation()
| Angle getFinalDribbleOrientation |
( |
const Point & |
ball_position, |
|
|
const Point & |
robot_position, |
|
|
std::optional< Angle > |
final_dribble_orientation |
|
) |
| |
|
static |
Gets the final dribble orientation from the update event
- Parameters
-
- Returns
- the final orientation to finish dribbling facing
◆ getPossession()
| void getPossession |
( |
const Update & |
event | ) |
|
Action to get possession of the ball
If the ball is moving quickly, then move in front of the ball If the ball is moving slowly, then chase the ball
- Parameters
-
◆ havePossession()
| bool havePossession |
( |
const Update & |
event | ) |
|
Guard that checks if the robot has possession of the ball
- Parameters
-
- Returns
- if the ball has been have_possession
◆ loseBall()
| void loseBall |
( |
const Update & |
event | ) |
|
Action to lose possession of the ball
- Parameters
-
◆ lostPossession()
| bool lostPossession |
( |
const Update & |
event | ) |
|
Guard that checks if the robot has lost possession of the ball
- Parameters
-
- Returns
- if the ball possession has been lost
◆ robotPositionToFaceBall()
| Point robotPositionToFaceBall |
( |
const Point & |
ball_position, |
|
|
const Angle & |
face_ball_angle, |
|
|
double |
additional_offset = 0.0 |
|
) |
| |
|
static |
Converts the ball position to the robot's position given the direction that the robot faces the ball
- Parameters
-
| ball_position | The ball position |
| face_ball_angle | The angle to face the ball |
| additional_offset | Additional offset from facing the ball |
- Returns
- the point that the robot should be positioned to face the ball and dribble the ball
◆ shouldLoseBall()
| bool shouldLoseBall |
( |
const Update & |
event | ) |
|
Guard that checks if the the robot should lose possession to avoid excessive dribbling
- Parameters
-
- Returns
- if the ball possession should be lost
The documentation for this struct was generated from the following files:
- src/software/ai/hl/stp/tactic/dribble/dribble_fsm.h
- src/software/ai/hl/stp/tactic/dribble/dribble_fsm.cpp