Animation


level_1


What is it

An Animation represents a sequence of movements to be performed by Pepper.

How to use it

Animation creation relies on 2 kinds of resources:

  • a .qianim file, containing a sequence of gestures performed by Pepper limbs and head, as well as text labels associated with certain times of the animation.
  • a .pmt file, containing a trajectory performed by Pepper base.

Creating animation resources

To create an animation resource, see:

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();

Where: animationResource is the name of the resource file (.qianim or .pmt).

Retrieving labels

level_3

To retrieve the labels of an Animation, use the labels method:

Animation myAnimation = ...;

Map<String, List<Long>> labels = myAnimation.labels();

Getting started

See also