Option simple_attack

Attacking by positioning behind ball in direction to goal and then going ahead

State Machine

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



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

State position_goal_seen

If that state is active,
 >  This enumerated output symbol is set:
    leds.back_front_blue  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    leds.back_middle_orange  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.back_rear_red  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.head_orange  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option position_with_angle_and_distance is executed. Parameters:
    position_with_angle_and_distance.diff_angle  =  selfloc.opponent_goal.grubby_angle() ;
    position_with_angle_and_distance.diff_x  =  (ball.distance() - 600) ;
    position_with_angle_and_distance.diff_y  =  ball.position.robot.y() ;
 
The decision tree:
  This browser can't display the SVG file svg/option_simple_attack_state_position_goal_seen.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 (
(
!(selfloc.opponent_goal.grubby_seen() )
)
&& 
(state_time > 1000)
)
{
  
goto position_goal_not_seen;
}
else
{
  
/** */
if ( action_done)
{
  
goto straight_to_goal;
}
else
{
  
stay;
}
}
}

State position_goal_not_seen

If that state is active,
 >  This enumerated output symbol is set:
    leds.back_front_blue  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.back_middle_orange  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    leds.back_rear_red  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.head_orange  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_landmarks
 >  The option position_with_angle_and_distance is executed. Parameters:
    position_with_angle_and_distance.diff_angle  =  selfloc.opponent_goal.grubby_angle() ;
    position_with_angle_and_distance.diff_x  =  (ball.distance() - 600) ;
    position_with_angle_and_distance.diff_y  =  ball.position.robot.y() ;
 
The decision tree:
  This browser can't display the SVG file svg/option_simple_attack_state_position_goal_not_seen.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 ( selfloc.opponent_goal.grubby_seen() )
{
  
goto position_goal_seen;
}
else
{
  
stay;
}
}

State straight_to_goal

If that state is active,
 >  This enumerated output symbol is set:
    leds.back_front_blue  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.back_middle_orange  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.back_rear_red  = 
leds.blink.oooo
 >  This enumerated output symbol is set:
    leds.head_orange  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
selfloc.opponent_goal.grubby_angle()
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
500
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
(ball.position.robot.y() / 2)
 
The decision tree:
  This browser can't display the SVG file svg/option_simple_attack_state_straight_to_goal.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 (
(
!(ball.was_seen() )
)
|| 
(ball.distance() > 800)
)
{
  
goto position_goal_not_seen;
}
else
{
  
stay;
}
}

State search_for_ball

If that state is active,
 >  This enumerated output symbol is set:
    leds.back_front_blue  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    leds.back_middle_orange  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    leds.back_rear_red  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    leds.head_orange  = 
leds.blink.llll
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
-100
 
The decision tree:
  This browser can't display the SVG file svg/option_simple_attack_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.time_since_last_seen() > 3000)
{
  
goto search_for_ball;
}
else
{
  
/** */
if ( ball.was_seen() )
{
  
goto position_goal_not_seen;
}
else
{
  
stay;
}
}