Option grab_ball_psd_param

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

State Machine

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



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

State go_to_ball

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.search_for_ball
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  The option go_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_ball_psd_param_state_go_to_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.was_seen() )
&& 
(ball.distance() < @grab_ball_psd_param.grab.distance)
&& 
(abs( ball.angle() ) < 15)
)
{
  
goto grab;
}
else
{
  
stay;
}

State grab

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.none
 >  This enumerated output symbol is set:
    head.pid_setting  = 
head.pid_setting.fast
 >  This enumerated output symbol is set:
    head.motion_type  = 
head.motion_type.direct
 >  This decimal output symbol is set:
    head.neck_tilt  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
0
 >  This decimal output symbol is set:
    head.head_tilt  = 
20
 >  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.walk_with_ball
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
@grab_ball_psd_param.grab.speed
 >  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_grab_ball_psd_param_state_grab.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 > @grab_ball_psd_param.grab.min_time)
&& 
(sensor.bodyPSD() > 150000)
)
{
  
goto continue_grab;
}
else
{
  
stay;
}

State regrab

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.none
 >  This enumerated output symbol is set:
    head.pid_setting  = 
head.pid_setting.fast
 >  This enumerated output symbol is set:
    head.motion_type  = 
head.motion_type.direct
 >  This decimal output symbol is set:
    head.neck_tilt  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
0
 >  This decimal output symbol is set:
    head.head_tilt  = 
20
 >  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  = 
@grab_ball_psd_param.regrab.speed
 >  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_grab_ball_psd_param_state_regrab.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:
 
/** grab in progress */
if ( sensor.bodyPSD() < 125000)
{
  
goto go_to_ball;
}
else
{
  
/** */
if ( state_time < @grab_ball_psd_param.regrab.min_time)
{
  
stay;
}
else
{
  
/** */
if ( sensor.bodyPSD() > 150000)
{
  
goto continue_grab;
}
else
{
  
/** */
if ( state_time > @grab_ball_psd_param.regrab.max_time)
{
  
goto go_to_ball;
}
else
{
  
stay;
}
}
}
}

State continue_grab

If that state is active,
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.none
 >  This enumerated output symbol is set:
    head.pid_setting  = 
head.pid_setting.fast
 >  This enumerated output symbol is set:
    head.motion_type  = 
head.motion_type.move_to_point
 >  This decimal output symbol is set:
    head.speed  = 
75
 >  This decimal output symbol is set:
    head.neck_tilt  = 
-60
 >  This decimal output symbol is set:
    head.head_pan  = 
0
 >  This decimal output symbol is set:
    head.head_tilt  = 
40
 >  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.walk_with_ball
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
@grab_ball_psd_param.cont_grab.speed
 >  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_grab_ball_psd_param_state_continue_grab.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 < @grab_ball_psd_param.cont_grab.min_time)
{
  
stay;
}
else
{
  
/** */
if ( sensor.bodyPSD() > 145000)
{
  
goto secure_grab;
}
else
{
  
/** */
if ( sensor.bodyPSD() < 130000)
{
  
goto go_to_ball;
}
else
{
  
/** */
if ( state_time > @grab_ball_psd_param.cont_grab.max_time)
{
  
goto go_to_ball;
}
else
{
  
stay;
}
}
}
}

State secure_grab

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.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  = 
@grab_ball_psd_param.secure_grab.speed
 >  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_grab_ball_psd_param_state_secure_grab.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 < @grab_ball_psd_param.secure_grab.min_time)
{
  
stay;
}
else
{
  
/** */
if ( sensor.bodyPSD() < 130000)
{
  
goto regrab;
}
else
{
  
/** */
if ( sensor.bodyPSD() > 155000)
{
  
goto grabbed;
}
else
{
  
/** */
if ( state_time > @grab_ball_psd_param.secure_grab.max_time)
{
  
goto grabbed;
}
else
{
  
stay;
}
}
}
}

State grabbed

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.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  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_ball_psd_param_state_grabbed.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 ( sensor.time_since_something_was_in_front_of_chest() > 800)
{
  
goto go_to_ball;
}
else
{
  
stay;
}