Thunderbots Project
Loading...
Searching...
No Matches
ShadowEnemyFSM Struct Reference

Classes

struct  ControlParams
 

Public Member Functions

bool enemyThreatHasBall (const Update &event)
 
void blockPass (const Update &event)
 
void blockShot (const Update &event, boost::sml::back::process< MoveFSM::Update > processEvent)
 
void stealAndChip (const Update &event)
 
auto operator() ()
 

Static Public Member Functions

static Point findBlockPassPoint (const Point &ball_position, const Robot &shadowee, const double &shadow_distance)
 
static Point findBlockShotPoint (const Robot &robot, const Field &field, const Team &friendlyTeam, const Team &enemyTeam, const Robot &shadowee, const double &shadow_distance)
 

Static Public Attributes

static DEFINE_TACTIC_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS constexpr double YEET_CHIP_DISTANCE_METERS = 2.0
 

Member Function Documentation

◆ blockPass()

void blockPass ( const Update &  event)

Action to block the pass to our shadowee

Parameters
eventShadowEnemyFSM::Update

◆ blockShot()

void blockShot ( const Update &  event,
boost::sml::back::process< MoveFSM::Update >  processEvent 
)

Action to block the shot from our shadowee

Parameters
eventShadowEnemyFSM::Update

◆ enemyThreatHasBall()

bool enemyThreatHasBall ( const Update &  event)

Guard that checks if the enemy threat has ball

Parameters
eventShadowEnemyFSM::Update
Returns
if the ball has been have_possession

◆ findBlockPassPoint()

Point findBlockPassPoint ( const Point ball_position,
const Robot shadowee,
const double &  shadow_distance 
)
static

Calculates the point to block the pass to the robot we are shadowing

Parameters
ball_positionThe position of the ball
shadoweeThe enemy robot we are shadowing
shadow_distanceThe distance our friendly robot will position itself away from the shadowee

◆ findBlockShotPoint()

Point findBlockShotPoint ( const Robot robot,
const Field field,
const Team friendlyTeam,
const Team enemyTeam,
const Robot shadowee,
const double &  shadow_distance 
)
static

Calculates the point to block the shot from the robot we are shadowing

Parameters
robotThe robot that is shadowing
fieldThe field to shadow on
friendlyTeamThe friendly team
enemyTeamThe enemy team
shadoweeThe enemy robot we are shadowing
shadow_distanceThe distance our friendly robot will position itself away from the shadowee

◆ stealAndChip()

void stealAndChip ( const Update &  event)

Action to steal and chip the ball

Steal the ball if enemy threat is close enough and chip the ball away

Parameters
eventShadowEnemyFSM::Update

The documentation for this struct was generated from the following files: