>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> playing_striker
>>>
attack
>>>
attack_from_corner
>>>
ball_in_own_penalty_area
>>>
search_ball
Option playing_striker
Playing as striker
State Machine
This browser can't display the SVG file
svg/option_playing_striker.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State attack
If that state is active,
>
This decimal output symbol is set:
strategy.destination.x
=
field.opponent_ground_line.x
()
>
This decimal output symbol is set:
strategy.destination.y
=
0
>
The option
play_to_angle
is executed. Parameters:
play_to_angle.angle
=
selfloc.opponent_goal.angle
() ;
play_to_angle.angle_width
=
(
selfloc.opponent_goal.angle_width
()
/ 2)
;
play_to_angle.precise
=
selfloc.distance_to
(
field.opponent_ground_line.x
() ,
0
)
< 2000
;
play_to_angle.forward_kick
=
(
abs
(
selfloc.opponent_goal.angle
()
)
<
selfloc.opponent_goal.angle_width
()
)
&&
(
(
(
selfloc.opponent_goal.grubby_seen
()
)
&&
(
abs
(
selfloc.opponent_goal.grubby_angle
()
)
<
selfloc.opponent_goal.grubby_angle_width
()
)
)
||
(
selfloc.freePartOfOpponentGoalInFront
()
)
)
;
play_to_angle.dribble_forward
=
(
robot_pose.x
()
< (
field.opponent_penalty_area.x
()
- 200)
)
||
(
abs
(
robot_pose.y
()
)
> (
field.left_penalty_area.y
()
- 200)
)
;
The decision tree:
This browser can't display the SVG file
svg/option_playing_striker_state_attack.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
(
strategy.ball_is_grabbed
)
{
stay;
}
else
{
/** */
if
(
ball.time_since_last_seen
()
> 2500
)
{
goto
search_ball
;
}
else
{
/** ball seen inside own penalty area */
if
(
(
ball.was_seen
()
)
&&
(
selfloc.distance_to_own_penalty_area
(
ball.position.field.x
() ,
ball.position.field.y
()
)
< -200
)
)
{
goto
ball_in_own_penalty_area
;
}
else
{
/** */
if
(
(
robot_pose.x
()
>
field.opponent_penalty_area.x
()
)
&&
(
abs
(
robot_pose.y
()
)
>
field.left_penalty_area.y
()
)
)
{
goto
attack_from_corner
;
}
else
{
stay;
}
}
}
}
State attack_from_corner
If that state is active,
>
This enumerated output symbol is set:
leds.face1
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face2
=
leds.blink.lool
>
This enumerated output symbol is set:
leds.face3
=
leds.blink.lool
>
This enumerated output symbol is set:
leds.face4
=
leds.blink.lool
>
This enumerated output symbol is set:
leds.face13
=
leds.blink.lool
>
This enumerated output symbol is set:
leds.face14
=
leds.blink.lool
>
This decimal output symbol is set:
strategy.destination.x
=
(
field.opponent_ground_line.x
()
- 250)
>
This decimal output symbol is set:
strategy.destination.y
=
0
>
The option
play_to_angle
is executed. Parameters:
play_to_angle.angle
=
selfloc.angle_to
(
(
field.opponent_ground_line.x
()
- 250)
,
0
) ;
play_to_angle.angle_width
=
(
selfloc.opponent_goal.angle_width
()
/ 2)
;
play_to_angle.precise
=
selfloc.distance_to
(
field.opponent_ground_line.x
() ,
0
)
< 2000
;
play_to_angle.forward_kick
=
(
abs
(
selfloc.opponent_goal.angle
()
)
<
selfloc.opponent_goal.angle_width
()
)
&&
(
selfloc.opponent_goal.grubby_seen
()
)
&&
(
abs
(
selfloc.opponent_goal.grubby_angle
()
)
<
selfloc.opponent_goal.grubby_angle_width
()
)
;
The decision tree:
This browser can't display the SVG file
svg/option_playing_striker_state_attack_from_corner.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
(
strategy.ball_is_grabbed
)
{
stay;
}
else
{
/** */
if
(
ball.time_since_last_seen
()
> 2500
)
{
goto
search_ball
;
}
else
{
/** */
if
(
!(
(
robot_pose.x
()
> (
field.opponent_penalty_area.x
()
- 150)
)
&&
(
abs
(
robot_pose.y
()
)
> (
field.left_penalty_area.y
()
- 150)
)
)
)
{
goto
attack
;
}
else
{
stay;
}
}
}
State ball_in_own_penalty_area
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.search_for_ball
>
The option
go_to_point_avoid_collisions
is executed. Parameters:
go_to_point_avoid_collisions.x
=
(
field.own_penalty_area.x
()
+ 300)
;
go_to_point_avoid_collisions.y
=
(
robot_pose.y
()
> 0
? 300 : -300 ) ;
go_to_point_avoid_collisions.angle
=
(
ball.angle
()
+
robot_pose.angle
() )
;
go_to_point_avoid_collisions.always_turn_to_angle
=
true ;
>
The option
localize
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_playing_striker_state_ball_in_own_penalty_area.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.time_since_last_seen
()
> 2500
)
{
goto
search_ball
;
}
else
{
/** ball seen outside opponent penalty area */
if
(
(
ball.was_seen
()
)
&&
(
selfloc.distance_to_own_penalty_area
(
ball.position.field.x
() ,
ball.position.field.y
()
)
> 0
)
)
{
goto
attack
;
}
else
{
stay;
}
}
State search_ball
If that state is active,
>
The option
search_ball
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_playing_striker_state_search_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
()
)
{
goto
attack
;
}
else
{
stay;
}