>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> grab_ball_with_head_direct
>>>
grab
>>>
continue_grab
>>>
grabbed
Option grab_ball_with_head_direct
Grabs the ball with the head
State Machine
This browser can't display the SVG file
svg/option_grab_ball_with_head_direct.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State 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.walk
>
This enumerated output symbol is set:
motion.walk_type
=
motion.walk_type.normal
>
This decimal output symbol is set:
motion.walk_speed.x
=
250
>
This decimal output symbol is set:
motion.walk_speed.y
=
0
>
This decimal output symbol is set:
motion.walk_speed.rot
=
(
ball.angle
()
* 2)
The decision tree:
This browser can't display the SVG file
svg/option_grab_ball_with_head_direct_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
< 300
)
{
stay;
}
else
{
/** ball in front of chest */
if
(
sensor.something_in_front_of_chest
()
)
{
goto
grabbed
;
}
else
{
/** grab in progress */
if
(
state_time
< 600
)
{
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.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.normal
>
This decimal output symbol is set:
motion.walk_speed.x
=
400
>
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_with_head_direct_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:
/** ball in front of chest */
if
(
sensor.something_in_front_of_chest
()
)
{
goto
grabbed
;
}
else
{
/** grab in progress */
if
(
state_time
< 400
)
{
stay;
}
else
{
goto
grabbed
;
}
}
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_with_head_direct_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:
stay;