Option position_defensive_supporter

Positions a defensive supporter

Parameters of that option:
ParameterTypeMeasureRangeDescription
position_defensive_supporter.ball_xdecimal
position_defensive_supporter.ball_ydecimal

State Machine

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



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

State position

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  clip( (@position_defensive_supporter.ball_x - 1000) , (field.own_ground_line.x() + 1500) , -300 ) ;
    go_to_point_avoid_collisions.y  =  clip( @position_defensive_supporter.ball_y , (field.right_sideline.y() + 300) , (field.left_sideline.y() - 300) ) ;
    go_to_point_avoid_collisions.angle  =  (robot_pose.angle() + selfloc.angle_to( @position_defensive_supporter.ball_x , @position_defensive_supporter.ball_y ) ) ;
    go_to_point_avoid_collisions.always_turn_to_angle  =  true ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_defensive_supporter_state_position.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 ( @position_defensive_supporter.ball_x < (field.own_ground_line.x() + 1800))
{
  
goto position_in_front_of_ball;
}
else
{
  
/** */
if ( @position_defensive_supporter.ball_x > 1500)
{
  
/** */
if ( @position_defensive_supporter.ball_y > 0)
{
  
goto wait_for_throw_in_left;
}
else
{
  
goto wait_for_throw_in_right;
}
}
else
{
  
stay;
}
}

State position_in_front_of_ball

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  -1000 ;
    go_to_point_avoid_collisions.y  =  clip( (
(
(robot_pose.y() > @position_defensive_supporter.ball_y)
|| 
(@position_defensive_supporter.ball_y < (field.right_sideline.y() + 400))
)
&& 
(@position_defensive_supporter.ball_y < (field.left_sideline.y() - 400))
? (@position_defensive_supporter.ball_y + 300) : (@position_defensive_supporter.ball_y - 300) ) ,
(field.right_sideline.y() + 300) , (field.left_sideline.y() - 300) ) ;
    go_to_point_avoid_collisions.angle  =  (robot_pose.angle() + selfloc.angle_to( @position_defensive_supporter.ball_x , @position_defensive_supporter.ball_y ) ) ;
    go_to_point_avoid_collisions.always_turn_to_angle  =  true ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_defensive_supporter_state_position_in_front_of_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 ( @position_defensive_supporter.ball_x > (field.own_ground_line.x() + 2000))
{
  
goto position;
}
else
{
  
stay;
}

State wait_for_throw_in_left

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  -300 ;
    go_to_point_avoid_collisions.y  =  (field.left_sideline.y() - 400) ;
    go_to_point_avoid_collisions.angle  =  0 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_defensive_supporter_state_wait_for_throw_in_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 ( @position_defensive_supporter.ball_x < 1000)
{
  
goto position;
}
else
{
  
/** */
if ( @position_defensive_supporter.ball_y < -500)
{
  
goto wait_for_throw_in_right;
}
else
{
  
stay;
}
}

State wait_for_throw_in_right

If that state is active,
 >  The option go_to_point_avoid_collisions is executed. Parameters:
    go_to_point_avoid_collisions.x  =  -300 ;
    go_to_point_avoid_collisions.y  =  (field.right_sideline.y() + 400) ;
    go_to_point_avoid_collisions.angle  =  0 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_position_defensive_supporter_state_wait_for_throw_in_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 ( @position_defensive_supporter.ball_x < 1000)
{
  
goto position;
}
else
{
  
/** */
if ( @position_defensive_supporter.ball_y > 500)
{
  
goto wait_for_throw_in_left;
}
else
{
  
stay;
}
}