Option position_offensive_supporter_near_ball

An offensive supporter

Parameters of that option:
ParameterTypeMeasureRangeDescription
position_offensive_supporter_near_ball.ball_xdecimal
position_offensive_supporter_near_ball.ball_ydecimal
position_offensive_supporter_near_ball.leftbooleantrue/ false

State Machine

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



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

State attacking

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  clip( (@position_offensive_supporter_near_ball.ball_x + 200) , 300 , field.opponent_penalty_area.x() ) ;
    go_to_point_avoid_collisions.y  =  clip( (@position_offensive_supporter_near_ball.ball_y + (1200 * ( @position_offensive_supporter_near_ball.left ? 1 : -1 ))) , (field.right_sideline.y() + 300) , (field.left_sideline.y() - 300) ) ;
    go_to_point_avoid_collisions.angle  =  (robot_pose.angle() + selfloc.angle_to( @position_offensive_supporter_near_ball.ball_x , @position_offensive_supporter_near_ball.ball_y ) ) ;
    go_to_point_avoid_collisions.always_turn_to_angle  =  false ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_offensive_supporter_near_ball_state_attacking.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 ( strategy.time_since_teammate_at_ball() > 7000)
{
  
goto defending;
}
else
{
  
/** */
if ( true)
{
  
goto attacking;
}
else
{
  
stay;
}
}

State defending

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  clip( (@position_offensive_supporter_near_ball.ball_x - 800) , 300 , field.opponent_penalty_area.x() ) ;
    go_to_point_avoid_collisions.y  =  clip( (@position_offensive_supporter_near_ball.ball_y + (600 * ( @position_offensive_supporter_near_ball.left ? 1 : -1 ))) , (field.right_sideline.y() + 300) , (field.left_sideline.y() - 300) ) ;
    go_to_point_avoid_collisions.angle  =  (robot_pose.angle() + selfloc.angle_to( @position_offensive_supporter_near_ball.ball_x , @position_offensive_supporter_near_ball.ball_y ) ) ;
    go_to_point_avoid_collisions.always_turn_to_angle  =  false ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_offensive_supporter_near_ball_state_defending.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 ( strategy.time_since_teammate_at_ball() > 7000)
{
  
goto defending;
}
else
{
  
/** */
if ( true)
{
  
goto attacking;
}
else
{
  
stay;
}
}