What is it¶
Animation represents a sequence of movements to be performed by Pepper.
How to use it¶
Creating animation resources¶
Animation creation relies on 2 kinds of resources:
.qianimfile, also called Animation Timeline, contains a sequence of gestures performed by Pepper limbs and head, as well as text labels associated with certain times of the animation.
.pmtfile, also called Animation Trajectory, contains a trajectory performed by Pepper base.
You can also import an Animation Timeline. For further details, see: Animation Browser / Viewer.
Playing an animation on Pepper¶
Here is the pattern to build an
Animation and play it on Pepper:
Animation myAnimation = AnimationBuilder.with(qiContext) .withResources(R.raw.animationResource) .build(); Animate animate = AnimateBuilder.with(qiContext) .withAnimation(myAnimation) .build(); animate.async().run();
animationResource is the name of the resource file (
To retrieve the labels of an
Animation, use the
Animation myAnimation = ...; Map<String, List<Long>> labels = myAnimation.labels();