Option vlc-turn-and-release

Catches the ball with the head only and turns then to the requested angle, stops and realeases the ball.

Parameters of that option:
ParameterMeasureRangeDescription
vlc-turn-and-release.angle-180..180The desired absolute angle of the robot on the field

State Machine

This browser can't display the SVG file svg/option_vlc-turn-and-release.svg.



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

State grabbed

If that state is active,
 >  The basic behavior do-nothing is executed.
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.catch-ball
    strategy.ball-handling  =  dribble-the-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_vlc-turn-and-release_state_grabbed.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 (time-of-state-execution > 100)   // wait some time to make sure the ball is really grabbed
{
  
if (::vlc-turn-and-release.angle < 0)   // turn right is better
{
  
transition-to-state(turn-right);
}
else
{
  
transition-to-state(turn-left);
}
}
else
{
  
transition-to-state(grabbed);
}

State turn-left

If that state is active,
 >  The basic behavior walk is executed. Parameters:
 
    walk.type  =  walk-type.turn-with-ball ;
    walk.speed-x  =  0 ;
    walk.speed-y  =  0 ;
    walk.rotation-speed  =  200 ;
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.catch-ball
    strategy.ball-handling  =  dribble-the-ball
    team-message  =  team-message.performing-a-kick
 
The decision tree:
  This browser can't display the SVG file svg/option_vlc-turn-and-release_state_turn-left.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 (
(time-of-state-execution > 500)
&& 
(ball.time-since-last-seen < 300)
&& 
(ball.known-or-near.distance > 150)
)   // not caught
{
  
transition-to-state(stop);
}
else if (time-of-state-execution > 2000)   // ball caught too long
{
  
transition-to-state(stop);
}
else if (
(::vlc-turn-and-release.angle < 20)
&& 
(::vlc-turn-and-release.angle > -20)
)   // reached target angle
{
  
transition-to-state(stop);
}
else
{
  
transition-to-state(turn-left);
}

State turn-right

If that state is active,
 >  The basic behavior walk is executed. Parameters:
 
    walk.type  =  walk-type.turn-with-ball ;
    walk.speed-x  =  0 ;
    walk.speed-y  =  0 ;
    walk.rotation-speed  =  -200 ;
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.catch-ball
    strategy.ball-handling  =  dribble-the-ball
    team-message  =  team-message.performing-a-kick
 
The decision tree:
  This browser can't display the SVG file svg/option_vlc-turn-and-release_state_turn-right.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 (
(time-of-state-execution > 500)
&& 
(ball.time-since-last-seen < 300)
&& 
(ball.known-or-near.distance > 150)
)   // not caught
{
  
transition-to-state(stop);
}
else if (time-of-state-execution > 2000)   // ball caught too long
{
  
transition-to-state(stop);
}
else if (
(::vlc-turn-and-release.angle < 20)
&& 
(::vlc-turn-and-release.angle > -20)
)   // reached target angle
{
  
transition-to-state(stop);
}
else
{
  
transition-to-state(turn-right);
}

State stop

If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.catch-ball
    strategy.ball-handling  =  dribble-the-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_vlc-turn-and-release_state_stop.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 (time-of-state-execution > 500)   // ball seen far away
{
  
transition-to-state(release);
}
else
{
  
transition-to-state(stop);
}

State release

If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    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_vlc-turn-and-release_state_release.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 (time-of-state-execution > 800)   // ball seen far away
{
  
transition-to-state(finished);
}
else
{
  
transition-to-state(release);
}

State finished

This state is a target state.



If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.search-for-ball
    strategy.ball-handling  =  not-handling-the-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_vlc-turn-and-release_state_finished.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:
 
transition-to-state(finished);