Option turn_to_team_ball

Turn to the team ball if there is one, if not turn around and look for the ball

State Machine

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



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

State turn_to_team_ball

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  = 
ball.team_angle()
 
The decision tree:
  This browser can't display the SVG file svg/option_turn_to_team_ball_state_turn_to_team_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_team_seen() > 2000)
|| 
(selfloc.distance_to( ball.team_position.field.x() , ball.team_position.field.y() ) < 1000)
)
{
  
goto turn;
}
else
{
  
stay;
}

State turn

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  = 
60
 >  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_turn_to_team_ball_state_turn.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.team_was_seen() )
&& 
(selfloc.distance_to( ball.team_position.field.x() , ball.team_position.field.y() ) > 1200)
)
{
  
goto turn_to_team_ball;
}
else
{
  
stay;
}