Option play_to_angle

plays the ball to a given angle

Parameters of that option:
ParameterTypeMeasureRangeDescription
play_to_angle.angledecimalThe difference to the target angle, e.g. opponent.goal
play_to_angle.angle_widthdecimalThe tolerance to the target angle
play_to_angle.precisebooleantrue/ falseWhether to play precisely or to play fast and less precise
play_to_angle.forward_kickbooleantrue/ falseWhether to kick the ball forward when the target angle is reached
play_to_angle.dribble_forwardbooleantrue/ falseWhether to dribble the ball forward when the target angle is reached and it should not be kicked

State Machine

This browser can't display the SVG file svg/option_play_to_angle.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html

State straight_ahead

If that state is active,
 >  The option play_straight_ahead is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_play_to_angle_state_straight_ahead.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
!(strategy.ball_is_grabbed)
)
{
  
/** */
if ( @play_to_angle.precise)
{
  
/** */
if (
((abs( @play_to_angle.angle ) + @play_to_angle.angle_width) > 60)
&& 
((abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 50)
)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
else
{
  
/** */
if ( (abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 20)
{
  
/** */
if ( obstacle.obstacle_distance.middle() < 200)
{
  
goto grab;
}
else
{
  
goto straight_ahead;
}
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 45)
{
  
goto grab;
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 95)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
}
}
}
else
{
  
stay;
}

State head_kick

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option go_to_ball_and_kick_sideways is executed. Parameters:
    go_to_ball_and_kick_sideways.left_side  =  @play_to_angle.angle > 0 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_play_to_angle_state_head_kick.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
!(strategy.ball_is_grabbed)
)
{
  
/** */
if ( @play_to_angle.precise)
{
  
/** */
if (
((abs( @play_to_angle.angle ) + @play_to_angle.angle_width) > 60)
&& 
((abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 50)
)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
else
{
  
/** */
if ( (abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 20)
{
  
/** */
if ( obstacle.obstacle_distance.middle() < 200)
{
  
goto grab;
}
else
{
  
goto straight_ahead;
}
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 45)
{
  
goto grab;
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 95)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
}
}
}
else
{
  
stay;
}

State wipe

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option go_to_ball_and_wipe is executed. Parameters:
    go_to_ball_and_wipe.left_side  =  @play_to_angle.angle > 0 ;
    go_to_ball_and_wipe.hard  =  abs( @play_to_angle.angle ) > 70 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_play_to_angle_state_wipe.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
!(strategy.ball_is_grabbed)
)
{
  
/** */
if ( @play_to_angle.precise)
{
  
/** */
if (
((abs( @play_to_angle.angle ) + @play_to_angle.angle_width) > 60)
&& 
((abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 50)
)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
else
{
  
/** */
if ( (abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 20)
{
  
/** */
if ( obstacle.obstacle_distance.middle() < 200)
{
  
goto grab;
}
else
{
  
goto straight_ahead;
}
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 45)
{
  
goto grab;
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 95)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
}
}
}
else
{
  
stay;
}

State grab

If that state is active,
 >  The option grab_and_dribble is executed. Parameters:
    grab_and_dribble.angle  =  @play_to_angle.angle ;
    grab_and_dribble.angle_width  =  @play_to_angle.angle_width ;
    grab_and_dribble.time_limit  =  0 ;
    grab_and_dribble.left_right  =  0 ;
    grab_and_dribble.forward_kick  =  @play_to_angle.forward_kick ;
    grab_and_dribble.dribble_forward  =  @play_to_angle.dribble_forward ;
 
The decision tree:
  This browser can't display the SVG file svg/option_play_to_angle_state_grab.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
!(strategy.ball_is_grabbed)
)
{
  
/** */
if ( @play_to_angle.precise)
{
  
/** */
if (
((abs( @play_to_angle.angle ) + @play_to_angle.angle_width) > 60)
&& 
((abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 50)
)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
else
{
  
/** */
if ( (abs( @play_to_angle.angle ) - @play_to_angle.angle_width) < 20)
{
  
/** */
if ( obstacle.obstacle_distance.middle() < 200)
{
  
goto grab;
}
else
{
  
goto straight_ahead;
}
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 45)
{
  
goto grab;
}
else
{
  
/** */
if ( abs( @play_to_angle.angle ) < 95)
{
  
goto wipe;
}
else
{
  
goto grab;
}
}
}
}
}
else
{
  
stay;
}