Option grab_opt

Parameters of that option:
ParameterTypeMeasureRangeDescription
grab_opt.grab.distancedecimalmm0..The distance to grab the ball (150)
grab_opt.grab.min_timedecimalms1..The minimum time of grab state (300)
grab_opt.grab.speeddecimalmm/s1..The speed when grabbing the ball (150)
grab_opt.regrab.min_timedecimalms1..The minimum time of regrab state (300)
grab_opt.regrab.speeddecimalmm/s1..The speed when regrabbing the ball (100)
grab_opt.cont_grab.min_timedecimalms1..The minimum time of continue grab state (300)
grab_opt.cont_grab.speeddecimalmm/s1..The speed when continous grabbing the ball (150)
grab_opt.secure_grab.min_timedecimalms1..The minimum time of secure grab state (300)

State Machine

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



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

State setup

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  The option position_for_grab_optimization is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_setup.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 ( debug.remaining_capacity() < 40)
{
  
goto battery_low;
}
else
{
  
/** */
if (
(ball.was_seen() )
&& 
(abs( (ball.distance() - 1000) ) < 100)
&& 
(abs( ball.angle() ) < 15)
)
{
  
goto approach;
}
else
{
  
/** */
if ( action_done)
{
  
goto approach;
}
else
{
  
stay;
}
}
}

State approach

If that state is active,
 >  The option go_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_approach.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.distance() < 500)
{
  
goto start_counting;
}
else
{
  
stay;
}

State start_counting

If that state is active,
 >  This decimal output symbol is set:
    optimization.time_of_last_grab_try  = 
state_time
 >  The option grab_ball_seif_param is executed. Parameters:
    grab_ball_seif_param.grab.distance  =  @grab_opt.grab.distance ;
    grab_ball_seif_param.grab.min_time  =  @grab_opt.grab.min_time ;
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_start_counting.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 > 5000)
{
  
goto failure;
}
else
{
  
/** */
if ( action_done)
{
  
goto turn;
}
else
{
  
stay;
}
}

State turn

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  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
( state_time < 200 ? 60 : 180 )
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_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 ( state_time < 800)
{
  
stay;
}
else
{
  
/** */
if ( sensor.time_since_something_was_in_front_of_chest() > 800)
{
  
goto lostball;
}
else
{
  
/** */
if ( state_time > 2500)
{
  
goto release;
}
else
{
  
stay;
}
}
}

State release

If that state is active,
 >  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
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_release.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 > 400)
{
  
goto success;
}
else
{
  
stay;
}

State success

If that state is active,
 >  This boolean output symbol is set:
    optimization.grab_was_successful  = 
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_grab_opt_state_success.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 count_up;
}
else
{
  
stay;
}

State failure

If that state is active,
 >  This decimal output symbol is set:
    optimization.time_of_last_grab_try  = 
-1
 >  This boolean output symbol is set:
    optimization.grab_was_successful  = 
false
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_failure.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:
 
goto count_up;

State lostball

If that state is active,
 >  This boolean output symbol is set:
    optimization.grab_was_successful  = 
false
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_lostball.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:
 
goto count_up;

State count_up

If that state is active,
 >  This decimal output symbol is set:
    optimization.index_of_last_grab_try  = 
(optimization.index_of_last_grab_try + 1)
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_count_up.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:
 
goto finished;

State finished

This state is a target state.



If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_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;

State battery_low

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.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_opt_state_battery_low.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;