Option dribble_forward

* play the grabbed ball forward

Parameters of that option:
ParameterTypeMeasureRangeDescription
dribble_forward.angledecimaldeg-180..180The angle where to dribble the ball to relative to the robot
dribble_forward.angle_widthdecimaldeg-180..180The width of the angle where to dribble the ball to
dribble_forward.dribble_timedecimalhow long is the ball being dribbled
dribble_forward.forward_kickbooleantrue/ falsekick the ball when the correct angle is reached
dribble_forward.dribble_forwardbooleantrue/ falsedribble the ball forward

State Machine

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



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

State dribble_ahead

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.grab_ball
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  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  = 
( @dribble_forward.dribble_forward ? ( state_time < 300 ? 250 : 450 ) : 0 )
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
0
 >  The option dodge is executed. Parameters:
    dodge.dribble_time  =  @dribble_forward.dribble_time ;
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_dribble_ahead.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:
 
/** abort if angle is not ahead */
if ( abs( @dribble_forward.angle ) > (@dribble_forward.angle_width + 45))
{
  
goto finished;
}
else
{
  
/** */
if ( @dribble_forward.angle > @dribble_forward.angle_width)
{
  
goto dribble_turnleft;
}
else
{
  
/** */
if ( @dribble_forward.angle < (0 - @dribble_forward.angle_width))
{
  
goto dribble_turnright;
}
else
{
  
/** */
if ( @dribble_forward.forward_kick)
{
  
goto kick_forward_1;
}
else
{
  
/** */
if (
!(action_done)
)
{
  
stay;
}
else
{
  
/** */
if ( state_time < 100)
{
  
stay;
}
else
{
  
/** */
if (
!(@dribble_forward.dribble_forward)
)
{
  
goto finished;
}
else
{
  
stay;
}
}
}
}
}
}
}

State dribble_turnleft

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.grab_ball
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  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  = 
( state_time < 300 ? 250 : 350 )
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
50
 >  The option dodge is executed. Parameters:
    dodge.dribble_time  =  @dribble_forward.dribble_time ;
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_dribble_turnleft.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:
 
/** abort if angle is not ahead */
if ( abs( @dribble_forward.angle ) > (@dribble_forward.angle_width + 45))
{
  
goto finished;
}
else
{
  
/** */
if ( @dribble_forward.angle < 0)
{
  
goto dribble_ahead;
}
else
{
  
stay;
}
}

State dribble_turnright

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.grab_ball
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  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  = 
( state_time < 300 ? 250 : 350 )
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
-50
 >  The option dodge is executed. Parameters:
    dodge.dribble_time  =  @dribble_forward.dribble_time ;
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_dribble_turnright.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:
 
/** abort if angle is not ahead */
if ( abs( @dribble_forward.angle ) > (@dribble_forward.angle_width + 45))
{
  
goto finished;
}
else
{
  
/** */
if ( @dribble_forward.angle >= 0)
{
  
goto dribble_ahead;
}
else
{
  
stay;
}
}

State kick_forward_1

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.ddd_head_bash ;
    special_action.mirror  =  false ;
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_kick_forward_1.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:
 
/** Kick finished */
if ( action_done)
{
  
goto after_kick;
}
else
{
  
stay;
}

State kick_forward_2

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option special_action is executed. Parameters:
    special_action.id  =  motion.special_action.forward_kick_fast ;
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_kick_forward_2.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:
 
/** Kick finished */
if ( action_done)
{
  
goto after_kick;
}
else
{
  
stay;
}

State after_kick

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  This boolean output symbol is set:
    strategy.ball_was_kicked  = 
true
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.look_straight_ahead
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_state_after_kick.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 > 300)
{
  
goto kicked;
}
else
{
  
stay;
}

State kicked

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  This boolean output symbol is set:
    strategy.ball_was_kicked  = 
false
 >  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_dribble_forward_state_kicked.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;

State finished

This state is a target state.



If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
true
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.grab_ball
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 >  This enumerated output symbol is set:
    motion.walk_type  = 
motion.walk_type.walk_with_ball
 
The decision tree:
  This browser can't display the SVG file svg/option_dribble_forward_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;