Option dribble-ball-vlc2

Dribbles the ball

Parameters of that option:
ParameterMeasureRangeDescription
dribble-ball-vlc2.destination-angledeg-180..180The angle that the ball should be dribbled

State Machine

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



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

State dribble

If that state is active,
 >  The option approach-and-turn is executed. Parameters:
 
    approach-and-turn.angle  =  ::dribble-ball-vlc2.destination-angle ;
    approach-and-turn.y-offset  =  (-50 * sin( ::dribble-ball-vlc2.destination-angle )) ;
 
 >  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_dribble-ball-vlc2_state_dribble.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 (abs( (robot-pose.angle - ::dribble-ball-vlc2.destination-angle) ) > 50)   //
{
  
transition-to-state(rotate-to-angle);
}
else
{
  
transition-to-state(dribble);
}

State rotate-to-angle

If that state is active,
 >  The basic behavior turn-around-point is executed. Parameters:
 
    turn-around-point.x  =  ball.propagated.x ;
    turn-around-point.y  =  ball.propagated.y ;
    turn-around-point.radius  =  ball.propagated.distance ;
    turn-around-point.left-right  =  sgn( (robot-pose.angle - ::dribble-ball-vlc2.destination-angle) ) ;
    turn-around-point.forward-component  =  100 ;
 
 >  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_dribble-ball-vlc2_state_rotate-to-angle.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 (abs( (robot-pose.angle - ::dribble-ball-vlc2.destination-angle) ) < 40)   //
{
  
transition-to-state(dribble);
}
else if (ball.seen.distance > 500)   //
{
  
transition-to-state(go-to-ball-far);
}
else
{
  
transition-to-state(rotate-to-angle);
}

State go-to-ball-far

If that state is active,
 >  The basic behavior go-to-ball is executed. Parameters:
 
    go-to-ball.distance  =  0 ;
    go-to-ball.max-speed  =  300 ;
    go-to-ball.max-speed.y  =  0 ;
    go-to-ball.max-turn-speed  =  150 ;
    go-to-ball.target-angle-to-ball  =  0 ;
    go-to-ball.walk-type  =  walk-type.gt2004mode ;
    go-to-ball.y-offset  =  0 ;
 
 >  These output symbols are set:
 
    head-control-mode  =  head-control-mode.search-auto
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble-ball-vlc2_state_go-to-ball-far.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.known-or-near.distance < 350)   //
{
  
transition-to-state(go-to-ball-near);
}
else
{
  
transition-to-state(go-to-ball-far);
}

State go-to-ball-near

If that state is active,
 >  The basic behavior go-to-ball is executed. Parameters:
 
    go-to-ball.distance  =  80 ;
    go-to-ball.max-speed  =  150 ;
    go-to-ball.max-speed.y  =  0 ;
    go-to-ball.max-turn-speed  =  150 ;
    go-to-ball.target-angle-to-ball  =  0 ;
    go-to-ball.walk-type  =  walk-type.gt2004mode ;
    go-to-ball.y-offset  =  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_dribble-ball-vlc2_state_go-to-ball-near.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.known-or-near.distance > 400)   //
{
  
transition-to-state(go-to-ball-far);
}
else if (
(abs( ball.seen.distance-y ) < 60)
&& 
(ball.known-or-near.distance < 300)
)   //
{
  
if (abs( (robot-pose.angle - ::dribble-ball-vlc2.destination-angle) ) < 40)   //
{
  
transition-to-state(dribble);
}
else
{
  
transition-to-state(rotate-to-angle);
}
}
else
{
  
transition-to-state(go-to-ball-near);
}