Option approach-ball-set-walk-speed

Approaches the close ball

Parameters of that option:
ParameterMeasureRangeDescription
approach-ball-set-walk-speed.slow-down-distanceint0..The distance when the robot slows down
approach-ball-set-walk-speed.slow-speedint1..The speed for the state look-at-ball
approach-ball-set-walk-speed.y-offsetmm-50...50The y offset the robot is approaching the ball.

State Machine

This browser can't display the SVG file svg/option_approach-ball-set-walk-speed.svg.



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

State slow

If that state is active,
 >  The basic behavior go-to-ball is executed. Parameters:
 
    go-to-ball.distance  =  0 ;
    go-to-ball.max-speed  =  ::approach-ball-set-walk-speed.slow-speed ;
    go-to-ball.max-speed.y  =  ::approach-ball-set-walk-speed.slow-speed ;
    go-to-ball.y-offset  =  ::approach-ball-set-walk-speed.y-offset ;
 
The decision tree:
  This browser can't display the SVG file svg/option_approach-ball-set-walk-speed_state_slow.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.seen.distance > (::approach-ball-set-walk-speed.slow-down-distance + 25))   // fast walk is better
{
  
transition-to-state(fast);
}
else
{
  
transition-to-state(slow);
}

State fast

If that state is active,
 >  The basic behavior go-to-ball is executed. Parameters:
 
    go-to-ball.distance  =  0 ;
    go-to-ball.max-speed  =  350 ;
    go-to-ball.max-speed.y  =  350 ;
    go-to-ball.y-offset  =  ::approach-ball-set-walk-speed.y-offset ;
 
The decision tree:
  This browser can't display the SVG file svg/option_approach-ball-set-walk-speed_state_fast.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.seen.distance < (::approach-ball-set-walk-speed.slow-down-distance - 25))   // slow walk is better
{
  
transition-to-state(slow);
}
else if (time-of-state-execution < 1000)   // at least 1s fast before dash
{
  
transition-to-state(fast);
}
else if (
(ball.seen.distance > 1200)
&& 
(abs( ball.seen.angle ) < 7)
)   // dash is possible
{
  
transition-to-state(dash);
}
else
{
  
transition-to-state(fast);
}

State dash

If that state is active,
 >  The basic behavior go-to-ball is executed. Parameters:
 
    go-to-ball.distance  =  0 ;
    go-to-ball.max-speed  =  500 ;
    go-to-ball.max-turn-speed  =  30 ;
    go-to-ball.max-speed.y  =  1 ;
    go-to-ball.walk-type  =  walk-type.dash ;
 
 >  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_approach-ball-set-walk-speed_state_dash.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.seen.distance < 400)
|| 
(abs( ball.seen.angle ) > 20)
)   // abort dash
{
  
transition-to-state(fast);
}
else
{
  
transition-to-state(dash);
}