action tracks - touretzkyds/cozmopedia GitHub Wiki
The Cozmo software architecture has 7 independent action tracks (source):
- HEAD raise/lower
- LIFT raise/lower
- BODY (the wheels/treads; used for driving and turning)
- FACE_IMAGE (the OLED display)
- EVENT (Anki says "ignore for now")
- BACKPACK_LIGHTS
- AUDIO (robot speech and sound effects)
Each track can perform only one action at a time. If a new action is attempted before the current action has completed, the new action fails with a "tracks locked" failure code.
Animations and behaviors typically use combinations of tracks. When executing basic actions such as say_text or drive_straight, by default the SDK only executes one at a time, which would prevent Cozmo from, say, talking and driving simultaneously. But adding an in_parallel=True argument to each action call allows basic actions to be performed in parallel, provided that they use different tracks.
Action nodes in the cozmo_fsm package have in_parallel=True set by default. Also, they will automatically retry an action if it fails with a "tracks locked" error.