Option go_to_ball

Go to the last seen ball position

State Machine

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



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

State stop

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
 >  This decimal output symbol is set:
    strategy.destination.x  = 
robot_pose.x()
 >  This decimal output symbol is set:
    strategy.destination.y  = 
robot_pose.y()
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_state_stop.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 slow;
}
else
{
  
stay;
}

State slow

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.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
350
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
(3 * ball.projected.angle() )
 >  This decimal output symbol is set:
    strategy.destination.x  = 
ball.position.field.x()
 >  This decimal output symbol is set:
    strategy.destination.y  = 
ball.position.field.y()
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_state_slow.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() > 2000)
{
  
goto stop;
}
else
{
  
/** */
if ( ball.distance() > 400)
{
  
goto fast;
}
else
{
  
stay;
}
}

State fast

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.walk
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.normal
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
( abs( ball.projected.angle() ) > 45 ? 0 : 500 )
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
(2 * ball.projected.angle() )
 >  This decimal output symbol is set:
    strategy.destination.x  = 
ball.position.field.x()
 >  This decimal output symbol is set:
    strategy.destination.y  = 
ball.position.field.y()
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_ball_state_fast.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() > 2000)
{
  
goto stop;
}
else
{
  
/** */
if ( ball.distance() < 400)
{
  
goto slow;
}
else
{
  
stay;
}
}