|
Thunderbots Project
|
#include <play.h>

Public Member Functions | |
| Play (TbotsProto::AiConfig ai_config, bool requires_goalie) | |
| virtual std::unique_ptr< TbotsProto::PrimitiveSet > | get (const WorldPtr &world_ptr, const InterPlayCommunication &inter_play_communication, const SetInterPlayCommunicationCallback &set_inter_play_communication_fun) |
| const std::map< std::shared_ptr< const Tactic >, RobotId > & | getTacticRobotIdAssignment () const |
| virtual std::vector< std::string > | getState () |
Protected Member Functions | |
| virtual void | updateTactics (const PlayUpdate &play_update) |
Protected Attributes | |
| TbotsProto::AiConfig | ai_config |
| std::shared_ptr< GoalieTactic > | goalie_tactic |
| std::map< std::shared_ptr< const Tactic >, RobotId > | tactic_robot_id_assignment |
| std::map< RobotId, TrajectoryPath > | robot_trajectories |
| TbotsProto::ObstacleList | obstacle_list |
| TbotsProto::PathVisualization | path_visualization |
In the STP framework, a Play is a collection of tactics that represent some "team-wide" goal. It can be thought of like a traditional play in soccer. Some examples are:
Plays are stateful, and use Tactics to implement their behaviour. For the most part, this statefulness is used to created "stages" for each Play. For example, a corner-kick play be broken down into 2 stages:
These stages are useful in order for us to create more complex behaviour and write it in a more understandable way.
|
explicit |
Creates a new Play
| ai_config | The AI configuration |
| requires_goalie | Whether this plays requires a goalie |
|
virtual |
Gets Primitives from the Play given the the world, and inter-play communication
| world | The updated world |
| inter_play_communication | The inter-play communication struct |
| set_inter_play_communication_fun | The callback to set the inter-play communication struct |
Reimplemented in AssignedTacticsPlay.
|
virtual |
Gets the state of the Play
Reimplemented in BallPlacementPlay, EnemyBallPlacementPlay, FreeKickPlay, PenaltyKickPlay, PenaltyKickEnemyPlay, and ShootOrPassPlay.
| const std::map< std::shared_ptr< const Tactic >, RobotId > & getTacticRobotIdAssignment | ( | ) | const |
Get tactic to robot id assignment
|
protectedvirtual |
Updates the priority tactic vector with new tactics
| play_update | The PlayUpdate struct that contains all the information for updating the tactics |
Reimplemented in AssignedTacticsPlay, BallPlacementPlay, CreaseDefensePlay, DefensePlay, EnemyBallPlacementPlay, EnemyFreeKickPlay, FreeKickPlay, HaltPlay, OffensePlay, PenaltyKickPlay, PenaltyKickEnemyPlay, and ShootOrPassPlay.