>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> dodge
>>>
decide
>>>
left
>>>
right
Option dodge
Parameters of that option:
Parameter
Type
Measure
Range
Description
dodge.dribble_time
decimal
how long is the ball being dribbled
State Machine
This browser can't display the SVG file
svg/option_dodge.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State decide
This state is a target state.
If that state is active,
The decision tree:
This browser can't display the SVG file
svg/option_dodge_state_decide.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
(
@
dodge.dribble_time
< 500
)
{
goto
decide
;
}
else
{
/** */
if
(
!(
(
sensor.time_since_something_was_in_front_of_head
()
< 400
)
||
(
obstacle.obstacle_distance.ahead
()
< 200
)
||
(
abs
(
robot_pose.angle
()
)
< 45
)
||
(
state_time
< 500
)
)
)
{
goto
decide
;
}
else
{
/** */
if
(
(
obstacle.obstacle_distance.ahead
()
< 200
)
||
(
sensor.something_in_front_of_head
()
)
)
{
/** */
if
(
selfloc.masspoint_of_seen_parts_of_opponent_goal_is_valid
()
)
{
/** */
if
(
selfloc.masspoint_of_seen_parts_of_opponent_goal.y
()
> 0
)
{
goto
left
;
}
else
{
goto
right
;
}
}
else
{
/** */
if
(
robot_pose.y
()
< 0
)
{
goto
left
;
}
else
{
goto
right
;
}
}
}
else
{
stay;
}
}
}
State left
If that state is active,
>
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
=
500
>
This decimal output symbol is set:
motion.walk_speed.rot
=
-30
The decision tree:
This browser can't display the SVG file
svg/option_dodge_state_left.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
(
@
dodge.dribble_time
< 500
)
{
goto
decide
;
}
else
{
/** */
if
(
!(
(
sensor.time_since_something_was_in_front_of_head
()
< 400
)
||
(
obstacle.obstacle_distance.ahead
()
< 200
)
||
(
abs
(
robot_pose.angle
()
)
< 45
)
||
(
state_time
< 500
)
)
)
{
goto
decide
;
}
else
{
stay;
}
}
State right
If that state is active,
>
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
=
-500
>
This decimal output symbol is set:
motion.walk_speed.rot
=
30
The decision tree:
This browser can't display the SVG file
svg/option_dodge_state_right.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
(
@
dodge.dribble_time
< 500
)
{
goto
decide
;
}
else
{
/** */
if
(
!(
(
sensor.time_since_something_was_in_front_of_head
()
< 400
)
||
(
obstacle.obstacle_distance.ahead
()
< 200
)
||
(
abs
(
robot_pose.angle
()
)
< 45
)
||
(
state_time
< 500
)
)
)
{
goto
decide
;
}
else
{
stay;
}
}