# Option kst-test test the kst Parameters of that option:
Parameter | Measure | Range | Description
kst-test.angle | deg | -180..180 | The angle where to kick relative to the robot
kst-test.angle-width | deg | -180..180 | The width of the kick angle range
kst-test.y-offset | int | -1000..1000 | The y offset the robot is approaching the ball with.
kst-test.table-id | int | 0.. | The id of the kick selction table to be used
kst-test.action-id | int | 0.. | action to test
kst-test.starttime | int | 0.. | maxwaittime for test
## State Machine ## State wait
If that state is active,
> | The basic behavior stand is executed.
> | These output symbols are set:
| head-control-mode | = | head-control-mode.stay-as-forced
The decision tree:
Pseudo code of the decision tree:
if ( |
( | robot-state.head-button-pressed-short | )
&& |
( | time-of-state-execution > 1000 | )
| ) | // kick possible
{
transition-to-state(approach-ball);
}
else if ( |
( | ::kst-test.starttime > 0 | )
&& |
( | time-of-state-execution > ::kst-test.starttime | )
| ) | //
{
transition-to-state(approach-ball);
}
else
{
transition-to-state(wait);
}
## State approach-ball
If that state is active,
> | The option approach-ball is executed. Parameters:
| approach-ball.look-at-ball-distance | = | 500 ;
| approach-ball.slow-down-distance | = | ( ball.play-ball-precisely ? 330 : 300 ) ;
| approach-ball.slow-speed | = | ( ball.play-ball-precisely ? 150 : 250 ) ;
| approach-ball.y-offset | = | ::kst-test.y-offset ;
The decision tree:
Pseudo code of the decision tree:
if ( |
( | ball.just-seen | )
&& |
( | abs( ball.seen.relative-speed.y ) < 150 | )
&& |
( | ball.seen.relative-speed.x < 150 | )
&& |
( | retrieve-kick( ::kst-test.angle , ::kst-test.angle-width , ::kst-test.table-id ) == ::kst-test.action-id | )
&& |
( | save-value( 0 , ball.seen.relative-x ) == 0 | )
&& |
( | save-value( 1 , ball.seen.relative-y ) == 0 | )
| ) | // kick possible
{
transition-to-state(kick);
}
else
{
transition-to-state(approach-ball);
}
## State kick
If that state is active,
> | The option kst-execute-kick is executed. Parameters:
| kst-execute-kick.action | = | retrieve-kick( ::kst-test.angle , ::kst-test.angle-width , ::kst-test.table-id ) ;
> | These output symbols are set:
| strategy.ball-handling | = | performing-a-kick
The decision tree:
Pseudo code of the decision tree:
if ( | subsequent-option-reached-target-state | ) | // kick finished
{
transition-to-state(record);
}
else
{
transition-to-state(kick);
}
## State record
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
The decision tree:
Pseudo code of the decision tree:
if ( |
( | robot-state.head-button-pressed-short | )
&& |
( | kst.sendRecord( get-value( 2 ) , get-value( 0 ) , get-value( 1 ) , get-value( 0 ) , get-value( 1 ) , ball.seen.relative-x , ball.seen.relative-y ) == 0 | )
| ) | // kick finished
{
transition-to-state(approach-ball);
}
else if ( | robot-state.any-back-button-pressed-short-and-released | ) | //
{
transition-to-state(approach-ball);
}
else
{
transition-to-state(record);
}