rj_gameplay.role.passer
Module Contents
Classes
Create a collection of name/value pairs. |
|
Complex single-robot role, such as Goalie or Striker. Uses Skills to achieve behavior. |
Attributes
- rj_gameplay.role.passer.FINAL_VELOCITY = 4
- rj_gameplay.role.passer.BALL_DECELERATION
- class rj_gameplay.role.passer.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.
- INIT
- CAPTURING
- PASS_READY
- INIT_EXECUTE_PASS
- EXECUTE_PASS
- KICK_DONE
- class rj_gameplay.role.passer.PasserRole(robot: stp.rc.Robot)
Bases:
stp.role.Role
Complex single-robot role, such as Goalie or Striker. Uses Skills to achieve behavior.
- property pass_ready
- set_execute_pass(target_point)
- tick(world_state: stp.rc.WorldState) rj_msgs.msg.RobotIntent
- Assume robot does not have ball on init. Then:
on init: get ball
when got ball: mark pass ready for Tactic, dribble, wait
on pass signal from Tactic: pivot_kick to point, let receiver get ball, done
- is_done(world_state) bool
True if Role is done; False otherwise.