>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> grab_ball_psd
>>>
go_to_ball
>>>
grab
>>>
regrab
>>>
continue_grab
>>>
secure_grab
>>>
grabbed
Option grab_ball_psd
State Machine
This browser can't display the SVG file
svg/option_grab_ball_psd.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State go_to_ball
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.search_for_ball
>
This boolean output symbol is set:
strategy.ball_is_grabbed
=
false
>
The option
go_to_ball
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_grab_ball_psd_state_go_to_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
()
)
&&
(
ball.distance
()
< 150
)
&&
(
abs
(
ball.angle
()
)
< 15
)
)
{
goto
grab
;
}
else
{
stay;
}
State grab
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.none
>
This enumerated output symbol is set:
head.pid_setting
=
head.pid_setting.fast
>
This enumerated output symbol is set:
head.motion_type
=
head.motion_type.direct
>
This decimal output symbol is set:
head.neck_tilt
=
-30
>
This decimal output symbol is set:
head.head_pan
=
0
>
This decimal output symbol is set:
head.head_tilt
=
20
>
This decimal output symbol is set:
head.mouth
=
0
>
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
=
150
>
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_psd_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:
/** */
if
(
(
state_time
> 300
)
&&
(
sensor.bodyPSD
()
> 150000
)
)
{
goto
continue_grab
;
}
else
{
stay;
}
State regrab
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.none
>
This enumerated output symbol is set:
head.pid_setting
=
head.pid_setting.fast
>
This enumerated output symbol is set:
head.motion_type
=
head.motion_type.direct
>
This decimal output symbol is set:
head.neck_tilt
=
-30
>
This decimal output symbol is set:
head.head_pan
=
0
>
This decimal output symbol is set:
head.head_tilt
=
20
>
This decimal output symbol is set:
head.mouth
=
0
>
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
=
100
>
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_psd_state_regrab.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
(
(
ball.distance
()
> 210
)
||
(
abs
(
ball.angle
()
)
> 20
)
||
(
sensor.bodyPSD
()
< 125000
)
)
{
goto
go_to_ball
;
}
else
{
/** */
if
(
state_time
< 300
)
{
stay;
}
else
{
/** */
if
(
sensor.bodyPSD
()
> 150000
)
{
goto
continue_grab
;
}
else
{
/** */
if
(
state_time
> 1000
)
{
goto
go_to_ball
;
}
else
{
stay;
}
}
}
}
State continue_grab
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.none
>
This enumerated output symbol is set:
head.pid_setting
=
head.pid_setting.fast
>
This enumerated output symbol is set:
head.motion_type
=
head.motion_type.move_to_point
>
This decimal output symbol is set:
head.speed
=
75
>
This decimal output symbol is set:
head.neck_tilt
=
-60
>
This decimal output symbol is set:
head.head_pan
=
0
>
This decimal output symbol is set:
head.head_tilt
=
40
>
This decimal output symbol is set:
head.mouth
=
0
>
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
=
150
>
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_psd_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:
/** */
if
(
state_time
< 300
)
{
stay;
}
else
{
/** */
if
(
sensor.bodyPSD
()
> 145000
)
{
goto
secure_grab
;
}
else
{
/** */
if
(
sensor.bodyPSD
()
< 130000
)
{
goto
go_to_ball
;
}
else
{
/** */
if
(
state_time
> 800
)
{
goto
go_to_ball
;
}
else
{
stay;
}
}
}
}
State secure_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.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
=
0
The decision tree:
This browser can't display the SVG file
svg/option_grab_ball_psd_state_secure_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:
/** */
if
(
state_time
< 300
)
{
stay;
}
else
{
/** */
if
(
sensor.bodyPSD
()
< 130000
)
{
goto
regrab
;
}
else
{
/** */
if
(
sensor.bodyPSD
()
> 155000
)
{
goto
grabbed
;
}
else
{
/** */
if
(
state_time
> 600
)
{
goto
grabbed
;
}
else
{
stay;
}
}
}
}
State grabbed
This state is a target state.
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
=
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
=
0
The decision tree:
This browser can't display the SVG file
svg/option_grab_ball_psd_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:
/** */
if
(
sensor.time_since_something_was_in_front_of_chest
()
> 800
)
{
goto
go_to_ball
;
}
else
{
stay;
}