![]() |
GT RoboCup SSL
Soccer software, robot firmware
|
AngleReceive accepts a receive_point as a parameter and gets setup there to catch the ball It transitions to the 'aligned' state once it's there within its error thresholds and is steady Set its 'ball_kicked' property to True to tell it to dynamically update its position based on where the ball is moving and attempt to catch it. More...
Public Member Functions | |
def | __init__ (self) |
def | target_point (self) |
The point that the receiver should expect the ball to hit it's mouth Default: constants.Field.TheirGoalSegment.center() | |
def | target_point (self, value) |
def | adjust_angle (self, target_angle, ball_angle=None, ball_speed=None) |
Returns an adjusted angle with account for ball speed. More... | |
def | recalculate (self) |
def | execute_aligning (self) |
def | execute_running (self) |
def | execute_receiving (self) |
![]() | |
def | __init__ (self, captureFunction=(lambda:skills.capture.Capture())) |
def | ball_kicked (self) |
set this to True to let the receiver know that the pass has started and the ball's in motion Default: False | |
def | ball_kicked (self, value) |
def | receive_point (self) |
The point that the receiver should expect the ball to hit it's mouth Default: None. | |
def | receive_point (self, value) |
def | errors_below_thresholds (self) |
returns True if we're facing the right direction and in the right position and steady | |
def | is_steady (self) |
def | recalculate (self) |
def | on_exit_start (self) |
def | execute_running (self) |
def | execute_aligning (self) |
def | reset_correct_location (self) |
def | on_enter_receiving (self) |
def | on_exit_receiving (self) |
def | check_failure (self) |
Create a good_area, that determines where a good pass should be, return true if the ball has exited that area. More... | |
def | execute_receiving (self) |
def | role_requirements (self) |
def | __str__ (self) |
![]() | |
def | __init__ |
Constructor. More... | |
def | autorestart (self) |
def | autorestart |
def | add_subbehavior |
we over-ride this to enforce the rule that there can't be more than one subbehavior | |
def | has_subbehaviors (self) |
def | role_requirements (self) |
def | assign_roles (self, assignments) |
def | __str__ (self) |
![]() | |
def | __init__ (self, continuous) |
def | execute_running (self) |
def | role_requirements (self) |
def | assign_roles |
def | __str__ (self) |
![]() | |
def | __init__ |
def | add_state (self, state, parent_state=None) |
def | is_done_running (self) |
def | terminate (self) |
Transitions the Behavior into a terminal state (either completed or cancelled) | |
def | behavior_state (self) |
returns a state in Behavior.State that represents what the behaviors is doing use this instead of the property if you want to avoid dealing with custom subclass substates | |
def | is_continuous (self) |
The Behavior's termination behavior noncontinuous: a behavior that accomplishes a specific task, then completes (example: shooting at the goal) continuous: a behavior that continually runs until told to stop (example: zone defense) | |
def | __str__ (self) |
def | role_requirements (self) |
Returns a tree of RoleRequirements keyed by subbehavior reference name This is used by the dynamic role assignment system to intelligently select which robot will run which behavior. | |
def | assign_roles (self, assignments) |
assignments is a tree of (RoleRequirements, OurRobot) tuples Same tree structure as the role_requirements() return value, but tuples instead of RoleRequirements as leaf nodes | |
![]() | |
def | __init__ (self, start_state) |
def | start_state (self) |
def | restart (self) |
Resets the FSM back into the start state. | |
def | add_state (self, state, parent_state=None) |
Registers a new state (which can optionally be a substate of an existing state) | |
def | spin (self) |
Runs the FSM checks transition conditions for all edges leading away from the current state if one evaluates to true, we transition to it if more than one evaluates to true, we throw a RuntimeError. | |
def | add_transition |
def | transition (self, new_state) |
def | is_in_state (self, state) |
def | state_is_substate (self, state, possible_parent) |
def | corresponding_ancestor_state (self, ancestors) |
def | ancestors_of_state (self, state) |
def | as_graphviz (self) |
def | write_diagram_png |
def | state (self) |
![]() | |
def | __init__ |
def | add_subbehavior |
def | remove_subbehavior |
def | has_subbehavior_with_name |
def | has_subbehaviors (self) |
def | subbehavior_with_name |
def | subbehaviors_by_name (self) |
def | remove_all_subbehaviors (self) |
def | all_subbehaviors (self) |
Returns a list of all subbehaviors. | |
def | all_subbehaviors_completed (self) |
def | spin (self) |
Override StateMachine.spin() so we can call spin() on subbehaviors. | |
def | handle_subbehavior_exception (self, name, exception) |
Override point for exception handling this is called whenever a subbehavior throws an exception during spin() subclasses of CompositeBehavior can override this to perform custom actions, such as removing the offending subbehavior the default implementation logs the exception and re-raises it. | |
def | role_requirements (self) |
returns a tree of role_requirements | |
def | assign_roles (self, assignments) |
def | __str__ (self) |
Public Attributes | |
kick_power | |
target_point | |
ball_kicked | |
target_angle | |
receive_point | |
robot | |
![]() | |
ball_kicked | |
kicked_from | |
kicked_vel | |
stable_frame | |
kicked_time | |
captureFunction | |
receive_point | |
robot | |
![]() | |
autorestart | |
robot | |
robot_shell_id | |
![]() | |
robot | |
Additional Inherited Members | |
![]() | |
int | FaceAngleErrorThreshold = 15 * constants.DegreesToRadians |
max difference between where we should be facing and where we are facing (in radians) | |
float | PositionYErrorThreshold = 0.20 |
how much we're allowed to be off in the direction of the pass line | |
float | PositionXErrorThreshold = 0.20 |
how much we're allowed to be off side-to-side from the pass line | |
float | SteadyMaxVel = 0.3 |
we have to be going slower than this to be considered 'steady' | |
int | SteadyMaxAngleVel = 30 * constants.DegreesToRadians |
int | MarginAngle = math.pi / 18 |
int | StabilizationFrames = 3 |
int | DesperateTimeout = 5 |
AngleReceive accepts a receive_point as a parameter and gets setup there to catch the ball It transitions to the 'aligned' state once it's there within its error thresholds and is steady Set its 'ball_kicked' property to True to tell it to dynamically update its position based on where the ball is moving and attempt to catch it.
It will move to the 'completed' state if it catches the ball, otherwise it will go to 'failed'. Kick is a single_robot_behavior, so no need to import both
def gameplay.skills.angle_receive.AngleReceive.adjust_angle | ( | self, | |
target_angle, | |||
ball_angle = None , |
|||
ball_speed = None |
|||
) |
Returns an adjusted angle with account for ball speed.
First finds the rejection, which is the X component of the ball's velocity in the reference frame of the robot, with the mouth facing the y axis. Then we calculate the angle required to offset this rejection angle (if possible).