Option passing_ready

Behavior for Pass Playing Challenge 2007 Ready State

Parameters of that option:
ParameterTypeMeasureRangeDescription
passing_ready.in_gamebooleantrue/ falseingame situation or initial setup

State Machine

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



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

State ready_state

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_landmarks
 >  The option go_to_point is executed. Parameters:
    go_to_point.x  =  passing_challenge.position.x( game.player_number() ) ;
    go_to_point.y  =  passing_challenge.position.y( game.player_number() ) ;
 
The decision tree:
  This browser can't display the SVG file svg/option_passing_ready_state_ready_state.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 (
(abs( (robot_pose.x() - passing_challenge.position.x( game.player_number() ) ) ) < 200)
&& 
(abs( (robot_pose.y() - passing_challenge.position.y( game.player_number() ) ) ) < 200)
)
{
  
goto turn;
}
else
{
  
stay;
}

State turn

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_landmarks
 >  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  = 
selfloc.angle_to( passing_challenge.position.x( passing_challenge.sender_number() ) , passing_challenge.position.y( passing_challenge.sender_number() ) )
 
The decision tree:
  This browser can't display the SVG file svg/option_passing_ready_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 (
(@passing_ready.in_game)
&& 
(abs( selfloc.angle_to( passing_challenge.position.x( passing_challenge.sender_number() ) , passing_challenge.position.y( passing_challenge.sender_number() ) ) ) < 18)
)
{
  
goto stand_ready;
}
else
{
  
/** */
if (
(state_time > 500)
&& 
(abs( selfloc.angle_to( passing_challenge.position.x( passing_challenge.sender_number() ) , passing_challenge.position.y( passing_challenge.sender_number() ) ) ) < 10)
)
{
  
goto stand_ready;
}
else
{
  
stay;
}
}

State stand_ready

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_landmarks
 >  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  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_passing_ready_state_stand_ready.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 ( state_time < 500)
{
  
stay;
}
else
{
  
/** */
if (
(abs( (robot_pose.x() - passing_challenge.position.x( game.player_number() ) ) ) > 300)
&& 
(abs( (robot_pose.y() - passing_challenge.position.y( game.player_number() ) ) ) > 300)
)
{
  
goto ready_state;
}
else
{
  
/** */
if ( abs( selfloc.angle_to( passing_challenge.position.x( passing_challenge.sender_number() ) , passing_challenge.position.y( passing_challenge.sender_number() ) ) ) > 20)
{
  
goto turn;
}
else
{
  
/** */
if ( @passing_ready.in_game)
{
  
goto finished;
}
else
{
  
/** */
if ( state_time > 3000)
{
  
goto finished;
}
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.look_straight_ahead
 >  This decimal output symbol is set:
    head.mouth  = 
0
 >  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  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_passing_ready_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:
 
stay;