cozmo.behavior
Behaviors represent a task that Cozmo may perform for an indefinite amount of time.
For example, the “LookAroundInPlace” behavior causes Cozmo to start looking
around him (without driving), which will cause events such as
cozmo.objects.EvtObjectObserved
to be generated as he comes across
objects.
Behaviors must be explicitly stopped before having the robot do something else (for example, pick up the object he just observed).
Behaviors are started by a call to cozmo.robot.Robot.start_behavior()
,
which returns a Behavior
object. Calling the stop()
method on that object terminate the behavior.
The BehaviorTypes
class in this module holds a list of all available
behaviors.
Module Attributes
|
Behavior idle state (not requested to run) |
|
Behavior requested state (waiting for engine to start it) |
|
Behavior running state |
|
Behavior stopped state |
Classes
|
A Behavior instance describes a behavior the robot is currently performing. |
|
Defines all executable robot behaviors. |
|
Triggered when a behavior is requested to start. |
|
Triggered when a behavior starts running on the robot. |
|
Triggered when a behavior stops. |