Option go_to_ball_and_wipe

Parameters of that option:
ParameterTypeMeasureRangeDescription
go_to_ball_and_wipe.left_sidebooleantrue/ false
go_to_ball_and_wipe.hardbooleantrue/ false

State Machine

This browser can't display the SVG file svg/option_go_to_ball_and_wipe.svg.



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

State go_to_ball

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  The option go_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_state_go_to_ball.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.time_since_last_seen() > 3000)
{
  
goto search_for_ball;
}
else
{
  
/** */
if (
(
!(@go_to_ball_and_wipe.hard)
)
&& 
(ball.distance() < 180)
&& 
(abs( ball.angle() ) < 20)
&& 
(ball.was_seen() )
)
{
  
goto wipe_hard;
}
else
{
  
/** */
if (
(@go_to_ball_and_wipe.hard)
&& 
(ball.distance() < 150)
&& 
(abs( ball.angle() ) < 20)
&& 
(ball.was_seen() )
)
{
  
goto wipe_soft;
}
else
{
  
stay;
}
}
}

State wipe_hard

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.wipe_left_hard ;
    special_action.mirror  =  @go_to_ball_and_wipe.left_side ;
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_state_wipe_hard.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 ( action_done)
{
  
goto after_kick;
}
else
{
  
stay;
}

State wipe_soft

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.wipe_left ;
    special_action.mirror  =  @go_to_ball_and_wipe.left_side ;
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_state_wipe_soft.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 ( action_done)
{
  
goto after_kick;
}
else
{
  
stay;
}

State after_kick

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  This boolean output symbol is set:
    strategy.ball_was_kicked  = 
true
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
300
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
( @go_to_ball_and_wipe.left_side ? 20 : -20 )
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.none
 >  This enumerated output symbol is set:
    head.motion_type  = 
head.motion_type.move_to_point
 >  This enumerated output symbol is set:
    head.pid_setting  = 
head.pid_setting.normal
 >  This decimal output symbol is set:
    head.neck_tilt  = 
-50
 >  This decimal output symbol is set:
    head.head_pan  = 
( @go_to_ball_and_wipe.left_side ? 40 : -40 )
 >  This decimal output symbol is set:
    head.head_tilt  = 
50
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_state_after_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 ( state_time < 300)
{
  
stay;
}
else
{
  
/** */
if (
(ball.was_seen() )
|| 
(state_time > 500)
)
{
  
goto finished;
}
else
{
  
stay;
}
}

State finished

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  This boolean output symbol is set:
    strategy.ball_was_kicked  = 
false
 >  The option go_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_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:
 
/** */
if ( ball.time_since_last_seen() > 3000)
{
  
goto search_for_ball;
}
else
{
  
/** */
if ( state_time < 2000)
{
  
stay;
}
else
{
  
goto go_to_ball;
}
}

State search_for_ball

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  The option search_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_and_wipe_state_search_for_ball.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.was_seen() )
{
  
goto go_to_ball;
}
else
{
  
stay;
}