Option walk_with_ball_test

Option for testing walk request with grabbed ball without leaving the field. * Automatically turns towards the center of the field when robot is not in the middle of the field.

Parameters of that option:
ParameterTypeMeasureRangeDescription
walk_with_ball_test.speed_xdecimalmm/s...X Speed.
walk_with_ball_test.speed_ydecimalmm/s...Y Speed.
walk_with_ball_test.rotation_speeddecimaldeg/s...Rotational speed.
walk_with_ball_test.moving_angledecimaldeg-180..180Expected angle of robot movement.
walk_with_ball_test.typeenumeratedmotion.walk_typeSpecifies the used walking type.
walk_with_ball_test.turn_typeenumeratedmotion.walk_typeSpecifies the used walking type for turning.

State Machine

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



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

State turn

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  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  = 
normalize( (selfloc.angle_to( 0 , 0 ) - @walk_with_ball_test.moving_angle) )
 
The decision tree:
  This browser can't display the SVG file svg/option_walk_with_ball_test_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 ( debug.remaining_capacity() < 40)
{
  
goto battery_low;
}
else
{
  
/** */
if (
(sensor.time_since_something_was_in_front_of_chest() > 600)
|| 
(ball.was_seen() )
)
{
  
goto grab_ball;
}
else
{
  
/** */
if ( abs( normalize( (selfloc.angle_to( 0 , 0 ) - @walk_with_ball_test.moving_angle) ) ) > 15)
{
  
stay;
}
else
{
  
goto walk;
}
}
}

State walk

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  = 
@walk_with_ball_test.type
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
@walk_with_ball_test.speed_x
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
@walk_with_ball_test.speed_y
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
@walk_with_ball_test.rotation_speed
 
The decision tree:
  This browser can't display the SVG file svg/option_walk_with_ball_test_state_walk.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 (
(sensor.time_since_something_was_in_front_of_chest() > 600)
|| 
(ball.was_seen() )
)
{
  
goto grab_ball;
}
else
{
  
/** */
if ( abs( normalize( (selfloc.angle_to( 0 , 0 ) - @walk_with_ball_test.moving_angle) ) ) < 20)
{
  
stay;
}
else
{
  
/** */
if (
(abs( robot_pose.x() ) > 1500)
|| 
(abs( robot_pose.y() ) > 1000)
)
{
  
/** */
if ( state_time < 1500)
{
  
goto gotocenter;
}
else
{
  
goto turn;
}
}
else
{
  
stay;
}
}
}
}

State battery_low

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

State gotocenter

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.grab_ball
 >  The option go_to_point_forward is executed. Parameters:
    go_to_point_forward.x  =  0 ;
    go_to_point_forward.y  =  0 ;
 
The decision tree:
  This browser can't display the SVG file svg/option_walk_with_ball_test_state_gotocenter.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 (
(sensor.time_since_something_was_in_front_of_chest() > 600)
|| 
(ball.was_seen() )
)
{
  
goto grab_ball;
}
else
{
  
/** */
if (
(abs( robot_pose.x() ) < 500)
&& 
(abs( robot_pose.y() ) < 500)
)
{
  
goto walk;
}
else
{
  
stay;
}
}
}

State grab_ball

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  The option grab_ball is executed.
 
The decision tree:
  This browser can't display the SVG file svg/option_walk_with_ball_test_state_grab_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 ( action_done)
{
  
goto walk;
}
else
{
  
/** */
if ( abs( ball.position.robot.x() ) > 1500)
{
  
goto turn_for_ball;
}
else
{
  
/** */
if ( abs( ball.position.robot.y() ) > 1000)
{
  
goto turn_for_ball;
}
else
{
  
stay;
}
}
}

State turn_for_ball

If that state is active,
 >  This boolean output symbol is set:
    strategy.ball_is_grabbed  = 
false
 >  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  = 
90
 >  This enumerated output symbol is set:
    head.control_mode  = 
head.control_mode.none
 >  This enumerated output symbol is set:
    head.motion_type  = 
head.motion_type.move_to_point
 >  This enumerated output symbol is set:
    head.pid_setting  = 
head.pid_setting.normal
 >  This decimal output symbol is set:
    head.neck_tilt  = 
-30
 >  This decimal output symbol is set:
    head.head_pan  = 
70
 >  This decimal output symbol is set:
    head.head_tilt  = 
0
 >  This decimal output symbol is set:
    head.mouth  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_walk_with_ball_test_state_turn_for_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 ( abs( ball.position.robot.x() ) > 1500)
{
  
stay;
}
else
{
  
/** */
if ( abs( ball.position.robot.y() ) > 1000)
{
  
stay;
}
else
{
  
goto grab_ball;
}
}