Option goalie_block

Blocking behavior for the goalie.

State Machine

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



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

State _init

If that state is active,
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state__init.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:
 
/** Ball between robot and goal -> no blocking action */
if (
(abs( ball.position.robot.x() ) < 300)
&& 
(abs( (ball.angle() + robot_pose.angle() ) ) > 90)
)
{
  
stay;
}
else
{
  
/** Ball will pass us in less than a specific time */
if (
(ball.was_seen() )
&& 
(ball.speed.robot.x() < -50)
&& 
(ball.time_when_own_y_axis_reached() < 1.5)
)
{
  
/** ball rolls left */
if (
(ball.position_where_ball_reaches_own_y_axis.y() > 100)
&& 
(ball.position_where_ball_reaches_own_y_axis.y() < 400)
)
{
  
goto block_left;
}
else
{
  
/** ball rolls right */
if (
(ball.position_where_ball_reaches_own_y_axis.y() < -100)
&& 
(ball.position_where_ball_reaches_own_y_axis.y() >= -400)
)
{
  
goto block_right;
}
else
{
  
/** */
if ( abs( ball.position_where_ball_reaches_own_y_axis.y() ) < 100)
{
  
goto block_middle;
}
else
{
  
stay;
}
}
}
}
else
{
  
stay;
}
}

State dont_block

This state is a target state.



If that state is active,
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state_dont_block.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 > 2000)
{
  
goto _init;
}
else
{
  
stay;
}

State stand_up

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state_stand_up.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 > 500)
{
  
goto dont_block;
}
else
{
  
stay;
}

State block_left

If that state is active,
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.block_left ;
    special_action.mirror  =  false ;
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state_block_left.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 stand_up;
}
else
{
  
stay;
}

State block_right

If that state is active,
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.block_left ;
    special_action.mirror  =  true ;
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state_block_right.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 stand_up;
}
else
{
  
stay;
}

State block_middle

If that state is active,
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.block ;
    special_action.mirror  =  false ;
 
The decision tree:
  This browser can't display the SVG file svg/option_goalie_block_state_block_middle.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 stand_up;
}
else
{
  
stay;
}