rj_gameplay.skill.line_kick
Module Contents
Classes
Create a collection of name/value pairs. |
|
A skill version of line kick so that actions don't have to be called in tactics |
- class rj_gameplay.skill.line_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
- KICK
- DONE
- class rj_gameplay.skill.line_kick.LineKick(robot: stp.rc.Robot, target_point: numpy.array, priority: int = 0, chip: bool = False, kick_speed: float = 5.5)
Bases:
stp.skill.Skill
A skill version of line kick so that actions don’t have to be called in tactics
- 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)
True when skill is done; False otherwise.
- __str__()
Return str(self).
- __repr__() str
Return repr(self).