Trajectory editor

What is trajectory

While animation lets you define the movement of the robot’s actuators, trajectory lets you set the path that the robot will move along. By using Trajectory tool, you can define your trajectory file to make your robot move to a destination.

Creating trajectory

This section shows how to create a trajectory file and define a movement using the tool.

Step Action
1

Choose File > New > Animation Trajectory.

image53

2

Enter the name of the file to create.

image54

After clicking OK, the file will be created under the directory “/assets/robot/trajectories”.

image55

3 The created file will be opened automatically through trajectory tool.
4 Use the tool to define your robot’s movement and click OK to store the movement to your file.

Trajectory tool

This section describes the features of trajectory tool.

image56

Item Name Description
A Edition Zone

Display the selected Trajectory(ies).

Allows you to manipulate the poses and paths.

image58 Start Pose (green): Cannot be manipulated

image57 End Pose (red): Drag it to move it or scroll the mouse wheel to change its orientation.

B Properties

Allows you to set the properties of the Planar move.

Offset

  • Delay the trajectories

Frame rate / Tick every

  • Modify the distance between each tick displayed in the trajectory
C New Path button

Allows you to add intermediate points on the current Trajectory.

Once having clicked, move the end pose in order to extend the trajectory starting from this intermediate point.

It produces arcs of circles to ensure continuous moves.

D Trajectory orientation Allows you to change the edition mode so that the orientation of the poses are computed automatically or not, in function of the direction of their leading path.
E Keyframes Allows you to fine-tune the time taken for a trajectory to be executed.
F Preview buttons Preview/pause the trajectory or record a trajectory
G End point Allows you to fine-tune the last pose of your trajectory.
H Trajectories

Allows you to add and select a Trajectory.

All trajectories compounding your planar move are displayed here, each behind an index button.

  • Click the New trajectory button to add a trajectory to the current Planar move.
  • Click one index button, to select a trajectory and show it in the edition zone.
  • Shift-Click or Ctrl+A to select several trajectories, their concatenation is then displayed in the edition zone.

Use a trajectory in Java

For an animation file named dance.pmt 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.dance);

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