We all love Cozmo animations. At Kinvert we encourage all of our STEM students to add a Cozmo animation and custom victory dance at the end of their coding projects. Whenever they accomplish a task like solving a maze, we have them use a Cozmo animation to celebrate. We’ll use cozmo.robot.Robot.play_anim_trigger for this.
Fun Cozmo Animations with play_anim_trigger()
One thing that helps Cozmo shine over other learning platforms is how interactive and engaging he is. We like to keep things interesting for students and Cozmo animations is one of them.
At the end of an exercise we have students make their own custom victory dances. We’ve done this with other robots as well. However Cozmo has a large list of amazing animations. This leaves students much more room to unleash their creativity.
What could be better at the end of a project than to have Cozmo dance or give a high five?
To play Cozmo animations we’ll use cozmo.robot.Robot.play_anim_trigger(). Let’s look at this method in more detail.
We’ll start by looking at the parameters.
The main one we will be using is the trigger. However if we want Cozmo to stay still for some reason we can set some of the ignore parameters to True.
You can find more detail at:
Coding Cozmo Animations – play_anim_trigger Code
Here is the program we wrote for this simple introduction to Cozmo animations.
import cozmo def kinvert_victory_dance(robot: cozmo.robot.Robot): robot.play_anim_trigger(cozmo.anim.Triggers.CodeLabWin).wait_for_completed() cozmo.run_program(kinvert_victory_dance)
You can find a list of Cozmo’s animation names online. There are a ton to choose from. We chose the Cozmo animation CodeLabWin for this example / tutorial.
Conclusion – Cozmo Animations with play_anim_trigger()
This is a simple introduction. We normally have students create more unique victory dances to celebrate projects. See how you can make your own custom victory dance and please share it below in the comments!
If you’re interested in getting Cozmo in your school:
We have a lot more information about the Anki Cozmo SDK Programmable Robot for Kids in Python. This is our main Cozmo hub where you can find more information on Cozmo animations and a whole lot more.