rj_gameplay.skill.pivot_kick
Module Contents
Classes
Create a collection of name/value pairs. |
|
A pivot kick skill |
- class rj_gameplay.skill.pivot_kick.State(*args, **kwds)
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- CAPTURE
- PIVOT
- LINE_KICK
- DONE
- class rj_gameplay.skill.pivot_kick.PivotKick(robot: stp.rc.Robot = None, pivot_point: numpy.ndarray = None, target_point: numpy.ndarray = None, dribble_speed: float = 1.0, chip: bool = False, kick_speed: float = RobotConstants.MAX_KICK_SPEED, threshold: float = 0.02, priority: int = 1)
Bases:
stp.skill.Skill
A pivot kick skill capture -> pivot -> kick
- 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: stp.rc.WorldState) bool
True when skill is done; False otherwise.
- __str__()
Return str(self).
- __repr__() str
Return repr(self).