Thunderbots Project
Loading...
Searching...
No Matches
GoalieTactic Class Reference

#include <goalie_tactic.h>

Inheritance diagram for GoalieTactic:
Collaboration diagram for GoalieTactic:

Public Member Functions

 GoalieTactic (TbotsProto::AiConfig ai_config, TbotsProto::MaxAllowedSpeedMode max_allowed_speed_mode=TbotsProto::MaxAllowedSpeedMode::PHYSICAL_LIMIT)
 
void updateControlParams (bool should_move_to_goal_line)
 
void accept (TacticVisitor &visitor) const override
 
- Public Member Functions inherited from Tactic
 Tactic (const std::set< RobotCapability > &capability_reqs_)
 
virtual bool done () const =0
 
virtual std::string getFSMState () const =0
 
const std::set< RobotCapability > & robotCapabilityRequirements () const
 
std::set< RobotCapability > & mutableRobotCapabilityRequirements ()
 
void setLastExecutionRobot (std::optional< RobotId > last_execution_robot)
 
std::map< RobotId, std::shared_ptr< Primitive > > get (const WorldPtr &world_ptr)
 

Additional Inherited Members

- Protected Attributes inherited from Tactic
std::optional< RobotId > last_execution_robot
 

Detailed Description

This tactic is used to defend the ball from going into the goal. The tactic is assigned to the robot that is selected using a DynamicParameter, and stays that way throughout all the plays that require a goalie.

If the ball is moving faster than a threshold towards the net, moves to intercept the ball. If not, returns primitives that position the robot in a cone between the ball and the two goal posts, in such a way that the robot would have to move a minimal distance either way to intercept a potential straight shot into the net.

Constructor & Destructor Documentation

◆ GoalieTactic()

GoalieTactic ( TbotsProto::AiConfig  ai_config,
TbotsProto::MaxAllowedSpeedMode  max_allowed_speed_mode = TbotsProto::MaxAllowedSpeedMode::PHYSICAL_LIMIT 
)
explicit

Creates a new GoalieTactic

Parameters
ai_configThe AI configuration
max_allowed_speed_modeThe maximum allowed speed mode

Member Function Documentation

◆ accept()

void accept ( TacticVisitor visitor) const
overridevirtual

Accepts a Tactic Visitor and calls the visit function on itself

Parameters
visitorA Tactic Visitor

Implements Tactic.


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