Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Event is the base class for all state machine events. The cozmo_fsm package provides its own event class and event router defined in evbase.py that are separate from the Cozmo SDK cozmo.event.Event mechanism. The SDK's event mechanism reports low-level robot events such as cubes being tapped or objects appearing and disappearing. These events all begin with "Evt", such as "EvtActionCompleted". The cozmo_fsm's Event class describes state machine events such as a node reporting success or failure, or one node signalling another.
The two event systems overlap in two areas: actions completing, and sensory events. A Cozmo action such as say_text will post an EvtActionCompleted event when the action ends, either successfully or not. A cozmo_fsm Say node will launch a say_text action, possibly restart it if the action fails due to a "robot busy" error, and eventualy post a cozmo_fsm CompletionEvent when the action succeeds and the state node completes.
cozmo_fsm includes "event generators" that listen for SDK events and generate corresponding cozmo_fsm Events. At present TapEvent and FaceEvent are the two sensory events supported, but more generators are planned.