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

#include <dribble_tactic.h>

Inheritance diagram for DribbleTactic:
Collaboration diagram for DribbleTactic:

Public Member Functions

 DribbleTactic (TbotsProto::AiConfig ai_config)
 
void updateControlParams (std::optional< Point > dribble_destination, std::optional< Angle > final_dribble_orientation, bool allow_excessive_dribbling=false)
 
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

The DribbleTactic will move the robot to intercept the ball and optionally dribble it to the dribble destination with the robot facing the given direction. It also optionally applies small kicks to not excessively dribble

Done: When the ball is near the dribbler of the robot and the optional dribble destination and face ball orientation conditions are satisfied

Constructor & Destructor Documentation

◆ DribbleTactic()

DribbleTactic ( TbotsProto::AiConfig  ai_config)
explicit

Creates a new DribbleTactic

Parameters
ai_configThe AI configuration

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.

◆ updateControlParams()

void updateControlParams ( std::optional< Point dribble_destination,
std::optional< Angle final_dribble_orientation,
bool  allow_excessive_dribbling = false 
)

Updates control params for optionally moving the ball to a dribble destination and with the robot at a final dribble orientation

Parameters
dribble_destinationThe destination for dribbling the ball
final_dribble_orientationThe final orientation to face the ball when finishing dribbling
allow_excessive_dribblingWhether to allow excessive dribbling, i.e. more than 1 metre at a time

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