rj_gameplay.tactic.striker_tactic

Module Contents

Classes

StrikerTactic

Captures ball and shoots. This Tactic merely holds the StrikerRole and handles its assignment for the Play level.

LineKickStrikerTactic

A striker tactic which receives then shoots the ball

class rj_gameplay.tactic.striker_tactic.StrikerTactic(world_state: stp.rc.WorldState)

Bases: stp.tactic.Tactic

Captures ball and shoots. This Tactic merely holds the StrikerRole and handles its assignment for the Play level.

property needs_assign
tick(world_state: stp.rc.WorldState) List[Tuple[int, rj_msgs.msg.RobotIntent]]

Tick each Role of the Tactic to get a list of robot_ids and linked RobotIntents for the Play.

is_done(world_state: stp.rc.WorldState) bool

True when Tactic is done; False otherwise.

init_roles(world_state: stp.rc.WorldState)

Given assigned robots by the Play, initialize each role of role_requests with its assigned robot.

class rj_gameplay.tactic.striker_tactic.LineKickStrikerTactic(target_point: numpy.ndarray, cost: stp.role.CostFn = None)

Bases: stp.tactic.ITactic

A striker tactic which receives then shoots the ball

compute_props()
create_request(**kwargs) stp.role.RoleRequest

Creates a sane default RoleRequest. :return: A list of size 1 of a sane default RoleRequest.

get_requests(world_state: stp.rc.WorldState, props) List[stp.tactic.RoleRequests]
tick(world_state: stp.rc.WorldState, role_results: stp.tactic.RoleResults) List[stp.tactic.SkillEntry]
Returns:

list of skills

is_done(world_state) bool