Option manual-kick-test-2

Executes a selected kick by pressing a button on the robot

Parameters of that option:
ParameterMeasureRangeDescription
manual-kick-test-2.actionint0..The action id of the kick that was selected
manual-kick-test-2.walk-speedmm/s-300..300The speed of the robot while approaching the ball
manual-kick-test-2.distancemm20..210The distance to the ball where the kick should be executed

State Machine

This browser can't display the SVG file svg/option_manual-kick-test-2.svg.



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

State stand

If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    sound-request  =  sound-request.bark1
    head-control-mode  =  head-control-mode.search-for-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_manual-kick-test-2_state_stand.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 (robot-state.middle-back-button-pressed-short)   // head pressed
{
  
if (::manual-kick-test-2.walk-speed != 0)   // walk speed is set
{
  
transition-to-state(walk);
}
else
{
  
transition-to-state(kick);
}
}
else
{
  
transition-to-state(stand);
}

State walk

If that state is active,
 >  The basic behavior walk is executed. Parameters:
 
    walk.speed-x  =  ::manual-kick-test-2.walk-speed ;
    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_manual-kick-test-2_state_walk.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)   // at least 500ms
{
  
transition-to-state(walk);
}
else if (ball.known-or-near.relative-x < ::manual-kick-test-2.distance)   // head pressed
{
  
transition-to-state(kick);
}
else
{
  
transition-to-state(walk);
}

State kick

If that state is active,
 >  The option execute-kick is executed. Parameters:
 
    execute-kick.action  =  ::manual-kick-test-2.action ;
 
 >  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_manual-kick-test-2_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 (subsequent-option-reached-target-state)   // kick finished
{
  
transition-to-state(wait);
}
else
{
  
transition-to-state(kick);
}

State wait

If that state is active,
 >  The basic behavior stand is executed.
 
 >  These output symbols are set:
 
    sound-request  =  sound-request.none
    head-control-mode  =  head-control-mode.search-for-ball
 
The decision tree:
  This browser can't display the SVG file svg/option_manual-kick-test-2_state_wait.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 < 2000)   // wait 2000 ms
{
  
transition-to-state(wait);
}
else
{
  
transition-to-state(stand);
}