>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> goalie_clear_ball
>>>
walk
>>>
ball_behind
Option goalie_clear_ball
The goalie tries to clear the ball.
State Machine
This browser can't display the SVG file
svg/option_goalie_clear_ball.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State walk
If that state is active,
>
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.walk
>
This enumerated output symbol is set:
motion.walk_type
=
motion.walk_type.normal
>
This decimal output symbol is set:
motion.walk_speed.x
=
(500
*
cos
(
ball.angle
()
) )
>
This decimal output symbol is set:
motion.walk_speed.y
=
(500
*
sin
(
ball.angle
()
) )
>
This decimal output symbol is set:
motion.walk_speed.rot
=
(0
-
robot_pose.angle
() )
The decision tree:
This browser can't display the SVG file
svg/option_goalie_clear_ball_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:
/** ball is behind goalie */
if
(
(
abs
(
ball.position.robot.x
()
)
< 300
)
&&
(
abs
(
(
ball.angle
()
+
robot_pose.angle
() )
)
> 100
)
)
{
goto
ball_behind
;
}
else
{
stay;
}
State ball_behind
If that state is active,
>
The option
grab_and_dribble
is executed. Parameters:
grab_and_dribble.angle
=
selfloc.opponent_goal.angle
() ;
grab_and_dribble.angle_width
=
20 ;
grab_and_dribble.forward_kick
=
true ;
grab_and_dribble.time_limit
=
4500 ;
grab_and_dribble.dribble_forward
=
true ;
The decision tree:
This browser can't display the SVG file
svg/option_goalie_clear_ball_state_ball_behind.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:
/** ball is handled */
if
(
strategy.ball_is_grabbed
)
{
stay;
}
else
{
/** ball is no longer behind goalie */
if
(
abs
(
(
ball.angle
()
+
robot_pose.angle
() )
)
< 90
)
{
goto
walk
;
}
else
{
stay;
}
}