Option grab_ball_param

Parameters of that option:
ParameterTypeMeasureRangeDescription
grab_ball_param.grab_distancedecimalmm0..The distance to grab the ball (160)
grab_ball_param.grab_angledecimaldeg-180..180The angle to grab the ball (20)
grab_ball_param.grab_min_timedecimalms0..The minimum state time in grab state (300)
grab_ball_param.grab_max_timedecimalms0..The maximum state time in grab state (600)
grab_ball_param.neck_tilt_grabdecimaldeg-80..3The neck tilt angle in grab state (-30)
grab_ball_param.head_tilt_grabdecimaldeg-20..50The head tilt angle in grab state (20)
grab_ball_param.grab_speeddecimalmm/s1..The speed when grabbing the ball (200)
grab_ball_param.grab_rotation_paramdecimalParameter to calculate rotation speed when gabbing. Is muliplicated with ball.seen.angle (2)
grab_ball_param.cont_max_timedecimalms0..The maximum state time in continue state (400)
grab_ball_param.cont_head_speeddecimalmm/s0..The head speed in continue grab state (75)
grab_ball_param.cont_neck_tiltdecimaldeg-80..3The neck tilt angle in grab state (-60)
grab_ball_param.cont_head_tiltdecimaldeg-20..50The head tilt angle in grab state (40)
grab_ball_param.cont_grab_speeddecimalmm/s1..The speed when grabbing the ball (200)
grab_ball_param.secure_timedecimalms0..The time in state secure (500)
grab_ball_param.repeatbooleantrue/ falseSet true if robot shall grab again when missed the ball Set false if robot shall try a single grab

State Machine

This browser can't display the SVG file svg/option_grab_ball_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
 >  The option go_to_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_ball_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_param.grab_distance)
&& 
(abs( ball.angle() ) < @grab_ball_param.grab_angle)
)
{
  
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  = 
@grab_ball_param.neck_tilt_grab
 >  This decimal output symbol is set:
    head.head_pan  = 
0
 >  This decimal output symbol is set:
    head.head_tilt  = 
@grab_ball_param.head_tilt_grab
 >  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_param.grab_speed
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
(ball.angle() * @grab_ball_param.grab_rotation_param)
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_ball_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:
 
/** grab in progress */
if ( state_time < @grab_ball_param.grab_min_time)
{
  
stay;
}
else
{
  
/** */
if ( sensor.something_in_front_of_chest() )
{
  
goto secure_grab;
}
else
{
  
/** */
if ( state_time < @grab_ball_param.grab_max_time)
{
  
stay;
}
else
{
  
goto continue_grab;
}
}
}

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  = 
@grab_ball_param.cont_head_speed
 >  This decimal output symbol is set:
    head.neck_tilt  = 
@grab_ball_param.cont_neck_tilt
 >  This decimal output symbol is set:
    head.head_pan  = 
0
 >  This decimal output symbol is set:
    head.head_tilt  = 
@grab_ball_param.cont_head_tilt
 >  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_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_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 ( sensor.something_in_front_of_chest() )
{
  
goto secure_grab;
}
else
{
  
/** */
if ( state_time > @grab_ball_param.cont_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.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_grab_ball_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 (
(sensor.time_since_something_was_in_front_of_chest() > 800)
&& 
(@grab_ball_param.repeat)
)
{
  
goto go_to_ball;
}
else
{
  
/** */
if ( sensor.time_since_something_was_in_front_of_chest() > 800)
{
  
goto failed;
}
else
{
  
/** */
if ( state_time > @grab_ball_param.secure_time)
{
  
goto grabbed;
}
else
{
  
stay;
}
}
}

State grabbed

This state is a target state.



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_ball_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)
&& 
(@grab_ball_param.repeat)
)
{
  
goto go_to_ball;
}
else
{
  
stay;
}

State failed

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_ball_param_state_failed.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;