Option search_ball

Search the ball

State Machine

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



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

State check_psd

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.look_down
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.walk_with_ball
 >  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  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_check_psd.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 finished;
}
else
{
  
/** */
if (
(sensor.something_in_front_of_chest() )
&& 
(state_time < 500)
)
{
  
stay;
}
else
{
  
goto stand;
}
}

State stand

If that state is active,
 >  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.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_stand.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 finished;
}
else
{
  
/** */
if ( state_time < 1200)
{
  
stay;
}
else
{
  
/** */
if (
(abs( robot_pose.x() ) > (field.opponent_ground_line.x() - 300))
|| 
(abs( robot_pose.y() ) > (field.left_sideline.y() - 300))
)
{
  
goto return_from_field_border;
}
else
{
  
goto turn_to_last_seen_ball;
}
}
}

State return_from_field_border

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option go_to_point_forward is executed. Parameters:
    go_to_point_forward.x  =  0 ;
    go_to_point_forward.y  =  0 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_return_from_field_border.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 finished;
}
else
{
  
/** */
if (
(abs( robot_pose.x() ) > (field.opponent_ground_line.x() - 600))
|| 
(abs( robot_pose.y() ) > (field.left_sideline.y() - 600))
)
{
  
stay;
}
else
{
  
goto turn_to_last_seen_ball;
}
}

State turn_to_last_seen_ball

If that state is active,
 >  The option turn_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_turn_to_last_seen_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 finished;
}
else
{
  
/** */
if ( action_done)
{
  
/** */
if ( abs( ball.team_angle() ) > 0)
{
  
goto search_left;
}
else
{
  
goto search_right;
}
}
else
{
  
stay;
}
}

State search_left

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  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  = 
90
 >  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  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
70
 >  This decimal output symbol is set:
    head.head_tilt  = 
0
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_search_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if ( state_time < 4000)
{
  
stay;
}
else
{
  
/** */
if ( ball.time_since_last_seen() < 6000)
{
  
stay;
}
else
{
  
/** */
if (
(robot_pose.y() > 0)
&& 
(abs( normalize( (robot_pose.angle() - 90) ) ) < 30)
)
{
  
goto go_to_position_left;
}
else
{
  
/** */
if ( abs( normalize( (robot_pose.angle() + 90) ) ) < 30)
{
  
goto go_to_position_right;
}
else
{
  
stay;
}
}
}
}
}

State search_right

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  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  = 
-90
 >  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  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
-70
 >  This decimal output symbol is set:
    head.head_tilt  = 
0
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_search_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if ( state_time < 4000)
{
  
stay;
}
else
{
  
/** */
if ( ball.time_since_last_seen() < 6000)
{
  
stay;
}
else
{
  
/** */
if (
(robot_pose.y() > 0)
&& 
(abs( normalize( (robot_pose.angle() - 90) ) ) < 30)
)
{
  
goto go_to_position_left;
}
else
{
  
/** */
if ( abs( normalize( (robot_pose.angle() + 90) ) ) < 30)
{
  
goto go_to_position_right;
}
else
{
  
stay;
}
}
}
}
}

State go_to_position_left

If that state is active,
 >  The option go_to_point is executed. Parameters:
    go_to_point.x  =  clip( robot_pose.x() , (field.own_ground_line.x() / 2) , (field.opponent_ground_line.x() / 2) ) ;
    go_to_point.y  =  (field.left_sideline.y() / 2) ;
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_go_to_position_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if ( action_done)
{
  
goto search_at_position_left;
}
else
{
  
stay;
}
}

State search_at_position_left

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  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  = 
90
 >  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  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
70
 >  This decimal output symbol is set:
    head.head_tilt  = 
0
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_search_at_position_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if (
(state_time > 3000)
&& 
(abs( normalize( (robot_pose.angle() + 90) ) ) < 30)
)
{
  
goto go_to_position_right;
}
else
{
  
stay;
}
}

State go_to_position_right

If that state is active,
 >  The option go_to_point is executed. Parameters:
    go_to_point.x  =  clip( robot_pose.x() , (field.own_ground_line.x() / 2) , (field.opponent_ground_line.x() / 2) ) ;
    go_to_point.y  =  (field.right_sideline.y() / 2) ;
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_go_to_position_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if ( action_done)
{
  
goto search_at_position_right;
}
else
{
  
stay;
}
}

State search_at_position_right

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  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  = 
90
 >  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  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
70
 >  This decimal output symbol is set:
    head.head_tilt  = 
0
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_state_search_at_position_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 ( ball.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if (
(state_time > 3000)
&& 
(abs( normalize( (robot_pose.angle() - 90) ) ) < 30)
)
{
  
goto go_to_position_left;
}
else
{
  
stay;
}
}

State finished

This state is a target state.



If that state is active,
 >  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.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_search_ball_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.was_seen() )
{
  
goto finished;
}
else
{
  
/** */
if ( ball.time_since_last_seen() > 2000)
{
  
goto stand;
}
else
{
  
stay;
}
}