Option grab-ball-and-kick

Grabs the ball with the head and kicks it straight on

State Machine

This browser can't display the SVG file svg/option_grab-ball-and-kick.svg.



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

State grab

If that state is active,
 >  The option grab-ball-with-head is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_grab-ball-and-kick_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 (
(
(ball.ball-was-seen)
&& 
(ball.number-of-images-with-ball-percept > 4)
&& 
(ball.seen.distance > 200)
&& 
(ball.seen.distance < 800)
)
|| 
(robot-state.time-since-something-was-in-front-of-chest > 450)
)   // ball distance greater than 200 mm or not 'seen' by PSD-sensor
{
  
transition-to-state(grab);
}
else
{
  
if (subsequent-option-reached-target-state)   // grabbed
{
  
transition-to-state(kick);
}
else
{
  
transition-to-state(grab);
}
}

State kick

If that state is active,
 >  The option do-kick is executed. Parameters:
 
    do-kick.special-action-id  =  special-action.head-kick-from-grab ;
 
 >  These output symbols are set:
 
    strategy.ball-handling  =  handling-the-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_grab-ball-and-kick_state_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 (
(
(ball.ball-was-seen)
&& 
(ball.number-of-images-with-ball-percept > 4)
&& 
(ball.seen.distance > 200)
&& 
(ball.seen.distance < 800)
)
|| 
(robot-state.time-since-something-was-in-front-of-chest > 450)
)   // ball distance greater than 200 mm or not 'seen' by PSD-sensor
{
  
transition-to-state(grab);
}
else
{
  
if (subsequent-option-reached-target-state)   // Kick finished
{
  
transition-to-state(afterKick);
}
else
{
  
transition-to-state(kick);
}
}

State afterKick

If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    strategy.set-time-kick  =  strategy.set-time-kick.save-time
    strategy.ball-handling  =  handling-the-ball
    head-control-mode  =  head-control-mode.look-straight-ahead
 
The decision tree:
  This browser can't display the SVG file svg/option_grab-ball-and-kick_state_afterKick.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.ball-was-seen)
&& 
(ball.number-of-images-with-ball-percept > 4)
&& 
(ball.seen.distance > 200)
&& 
(ball.seen.distance < 800)
)
|| 
(robot-state.time-since-something-was-in-front-of-chest > 450)
)   // ball distance greater than 200 mm or not 'seen' by PSD-sensor
{
  
transition-to-state(grab);
}
else
{
  
if (time-of-state-execution > 200)   // Kick finished
{
  
transition-to-state(final);
}
else
{
  
transition-to-state(afterKick);
}
}

State final

This state is a target state.



If that state is active,
 >  The basic behavior walk is executed. Parameters:
 
    walk.type  =  walk-type.normal ;
    walk.speed-x  =  200 ;
    walk.speed-y  =  0 ;
    walk.rotation-speed  =  0 ;
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.search-for-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_grab-ball-and-kick_state_final.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.ball-was-seen)
&& 
(ball.number-of-images-with-ball-percept > 4)
&& 
(ball.seen.distance > 200)
&& 
(ball.seen.distance < 800)
)
|| 
(robot-state.time-since-something-was-in-front-of-chest > 450)
)   // ball distance greater than 200 mm or not 'seen' by PSD-sensor
{
  
transition-to-state(grab);
}
else
{
  
if (time-of-state-execution > 700)   //
{
  
transition-to-state(grab);
}
else
{
  
transition-to-state(final);
}
}