Thunderbots Project
Loading...
Searching...
No Matches
CreaseDefenderFSM Struct Reference
Inheritance diagram for CreaseDefenderFSM:
Collaboration diagram for CreaseDefenderFSM:

Classes

struct  ControlParams
 

Public Member Functions

 CreaseDefenderFSM (const TbotsProto::AiConfig &ai_config)
 
bool ballNearbyWithoutThreat (const Update &event)
 
void prepareGetPossession (const Update &event, boost::sml::back::process< DribbleFSM::Update > processEvent)
 
void blockThreat (const Update &event, boost::sml::back::process< MoveFSM::Update > processEvent)
 
auto operator() ()
 

Static Public Member Functions

static DEFINE_TACTIC_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS std::optional< PointfindBlockThreatPoint (const Field &field, const Point &enemy_threat_origin, const TbotsProto::CreaseDefenderAlignment &crease_defender_alignment, double robot_obstacle_inflation_factor)
 
- Static Public Member Functions inherited from DefenderFSMBase
static bool ballNearbyWithoutThreat (const WorldPtr &world_ptr, const Robot &robot, const TbotsProto::BallStealMode &ball_steal_mode, const TbotsProto::DefenderStealConfig &defender_steal_config)
 
static void prepareGetPossession (const TacticUpdate &tactic_update, boost::sml::back::process< DribbleFSM::Update > processEvent)
 

Constructor & Destructor Documentation

◆ CreaseDefenderFSM()

CreaseDefenderFSM ( const TbotsProto::AiConfig &  ai_config)
inlineexplicit

Constructor for CreaseDefenderFSM struct

Parameters
ai_configThe ai config for this struct

Member Function Documentation

◆ ballNearbyWithoutThreat()

bool ballNearbyWithoutThreat ( const Update &  event)

Guard that checks if the ball is on friendly side, nearby, and unguarded by the enemy (only if stealing is enabled).

Parameters
eventCreaseDefenderFSM::Update event
Returns
true if the ball is on friendly side, nearby, unguarded by the enemy up, and within a max get possession threshold

◆ blockThreat()

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

This is an Action that blocks the threat

Parameters
eventCreaseDefenderFSM::Update event

◆ findBlockThreatPoint()

std::optional< Point > findBlockThreatPoint ( const Field field,
const Point enemy_threat_origin,
const TbotsProto::CreaseDefenderAlignment &  crease_defender_alignment,
double  robot_obstacle_inflation_factor 
)
static

Finds the point to block the threat

Parameters
fieldThe field
enemy_threat_originThe origin of the threat to defend against
crease_defender_alignmentalignment of the crease defender
robot_obstacle_inflation_factorThe robot obstacle inflation factor
Returns
The best point to block the threat if it exists

◆ prepareGetPossession()

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

This is the Action that prepares for getting possession of the ball

Parameters
eventCreaseDefenderFSM::Update event
processEventprocesses the DribbleFSM::Update

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