Animation Browser / Viewer

The Pepper SDK Plugin provides sample animation files to create robot animation.

Run Animation Browser

Click File > New > Import animation... and the browser will appear like the image below.


The tree view on the left shows the sample animation files categorized into folders and when an animation file is selected, the preview of the animation is shown in the robot view to the right.

Import animation files to your project

Animation Browser is used to import animation files within your project. Choose the animation file you want and click Select and then you will see that the animation file has been imported to your project under the resource directory.

“/Project/app/src/main/assets/robot/animations/Category/Selected animation file”

Preview animation files in the project

Any .anim file found in your Android project can be previewed independently. From your project view, right-click on your .anim file and click Preview: it will run a stand-alone Robot Viewer showing a 3D robot playing the selected animation in loop.

Use animation in Java

For an animation file named elephant.anim found in the raw resources, the following piece of code will load the contained animation and make the robot play it.

// Loads the animation data from the file, and transfer it to the robot.
Animation animation = Animation.fromResources(ctx, R.raw.elephant);

// Prepare your Animate action, and run it.
Animate animate = new Animate(this);;