rj_gameplay.skill.intercept

Module Contents

Classes

Intercept

First third of a PassReceive Skill. Gets in front of moving ball.

Attributes

SETTLE_BALL_SPEED_THRESHOLD

INTERCEPT_ANGLE_THRESHOLD

rj_gameplay.skill.intercept.SETTLE_BALL_SPEED_THRESHOLD = 1.0
rj_gameplay.skill.intercept.INTERCEPT_ANGLE_THRESHOLD
class rj_gameplay.skill.intercept.Intercept(robot: stp.rc.Robot = None)

Bases: stp.skill.Skill

First third of a PassReceive Skill. Gets in front of moving ball.

get_intercept_pt(world_state: stp.rc.WorldState, my_robot: numpy.ndarray) numpy.ndarray

Gets the closest point on the linear trajectory of the ball to the intercepting robot Does this by projecting the ball to robot vector onto the subspace spanned by the ball’s velocity vector

tick(world_state: stp.rc.WorldState) rj_msgs.msg.RobotIntent

Logic for Skill goes here. RobotIntents obtained via Actions.

robot state is updated through super call to this method (i.e. super().tick(world_state))

.msg
param world_state:

Current world state.

return:

A single RobotIntent.

is_done(world_state) bool

Check if the intercepting robot has the ball, or the ball is slow and the robot is on the path of the ball.

__str__()

Return str(self).

__repr__() str

Return repr(self).