Option handle-ball

The striker kicking the ball to the opponent goal

State Machine

This browser can't display the SVG file svg/option_handle-ball.svg.



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

State ball-in-center-of-field

If that state is active,
 >  The option handle-ball-in-center-of-field is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-in-center-of-field.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-in-center-of-field);
}
else if (ball.just-seen)   // ball seen
{
  
if (ball.seen.y < -1250)   // ball at right border
{
  
transition-to-state(ball-at-right-border);
}
else if (ball.seen.y > 1250)   // ball at left border
{
  
transition-to-state(ball-at-left-border);
}
else if (
(ball.seen.x > 1850)
&& 
(ball.seen.y > 400)
)   // ball at left opponent border
{
  
transition-to-state(ball-at-left-opponent-border);
}
else if (
(ball.seen.x > 1850)
&& 
(ball.seen.y < -400)
)   // ball at right opponent border
{
  
transition-to-state(ball-at-right-opponent-border);
}
else if (ball.seen.x < -1400)   // ball near own goal
{
  
transition-to-state(ball-near-own-goal);
}
else if (robot-pose.distance-to-opponent-goal < 600)   // at opponent goal
{
  
transition-to-state(at-opponent-goal);
}
else
{
  
transition-to-state(ball-in-center-of-field);
}
}
else
{
  
transition-to-state(ball-in-center-of-field);
}

State ball-at-left-border

If that state is active,
 >  The option handle-ball-at-left-and-right-border is executed. Parameters:
 
    handle-ball-at-left-and-right-border.left-right  =  1 ;
 
 >  These output symbols are set:
 
    leds.face2  =  face2.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-at-left-border.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-at-left-border);
}
else if (time-of-state-execution < 3000)   // state running less than 3 seconds
{
  
transition-to-state(ball-at-left-border);
}
else if (
(ball.just-seen)
&& 
(ball.seen.y < 1100)
)   // ball seen and not at left border
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(ball-at-left-border);
}

State ball-at-right-border

If that state is active,
 >  The option handle-ball-at-left-and-right-border is executed. Parameters:
 
    handle-ball-at-left-and-right-border.left-right  =  -1 ;
 
 >  These output symbols are set:
 
    leds.face1  =  face1.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-at-right-border.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-at-right-border);
}
else if (time-of-state-execution < 3000)   // state running less than 3 seconds
{
  
transition-to-state(ball-at-right-border);
}
else if (
(ball.just-seen)
&& 
(ball.seen.y > -1100)
)   // ball seen and not at right border
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(ball-at-right-border);
}

State ball-at-left-opponent-border

If that state is active,
 >  The option handle-ball-at-opponent-border is executed. Parameters:
 
    handle-ball-at-opponent-border.left-right  =  1 ;
 
 >  These output symbols are set:
 
    leds.face1  =  face1.llll
    leds.face2  =  face2.llll
    leds.face4  =  face4.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-at-left-opponent-border.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-at-left-opponent-border);
}
else if (time-of-state-execution < 3000)   // state running less than 3 seconds
{
  
transition-to-state(ball-at-left-opponent-border);
}
else if (
(ball.just-seen)
&& 
(
(ball.seen.x < 1700)
|| 
(ball.seen.y < 350)
)
)   // ball seen and not at left opponent border
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(ball-at-left-opponent-border);
}

State ball-at-right-opponent-border

If that state is active,
 >  The option handle-ball-at-opponent-border is executed. Parameters:
 
    handle-ball-at-opponent-border.left-right  =  -1 ;
 
 >  These output symbols are set:
 
    leds.face1  =  face1.llll
    leds.face2  =  face2.llll
    leds.face3  =  face3.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-at-right-opponent-border.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-at-right-opponent-border);
}
else if (time-of-state-execution < 3000)   // state running less than 3 seconds
{
  
transition-to-state(ball-at-right-opponent-border);
}
else if (
(ball.just-seen)
&& 
(
(ball.seen.x < 1700)
|| 
(ball.seen.y > -350)
)
)   // ball seen and not at right opponent border
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(ball-at-right-opponent-border);
}

State ball-near-own-goal

If that state is active,
 >  The option handle-ball-near-own-goal is executed.
 
 >  These output symbols are set:
 
    leds.face3  =  face3.llll
    leds.face4  =  face4.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_ball-near-own-goal.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(ball-near-own-goal);
}
else if (time-of-state-execution < 3000)   // state running less than 3 seconds
{
  
transition-to-state(ball-near-own-goal);
}
else if (
(ball.just-seen)
&& 
(ball.seen.x > -1250)
)   // ball seen and not near own goal
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(ball-near-own-goal);
}

State at-opponent-goal

If that state is active,
 >  The option handle-ball-at-opponent-goal is executed.
 
 >  These output symbols are set:
 
    leds.face3  =  face3.llll
    leds.face4  =  face4.llll
 
The decision tree:
  This browser can't display the SVG file svg/option_handle-ball_state_at-opponent-goal.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 (ball.is-handled-at-the-moment)   // ball is handled
{
  
transition-to-state(at-opponent-goal);
}
else if (robot-pose.distance-to-opponent-goal > 700)   // not at opponent goal
{
  
transition-to-state(ball-in-center-of-field);
}
else
{
  
transition-to-state(at-opponent-goal);
}