Tutorial: animate a robot trajectory
In this tutorial, we will see how to animate a robot to follow a trajectory.
Import and physicalize your robot
-
Let's start by creating a new simulation.
- Go to INTERACT Menu and click on INTERACT > Create New Simulation
- Select your favorite environment
- Add a desktop or VR player
-
Import the robot from CAD file. To import CAD files use Asset Transformer toolkit, or import an FBX file through Unity native importer.
Import URDF
You can also import an URDF file to directly import your CAD model with kinematic links.
For this tutorial, we will use a robot from the INTERACT's library, which comes already physicalized. Let's import UR5 robot:
- From the main menu, click INTERACT > Industrial Library > Robots > Universal Robot > UR5.
- The robot is added in your scene.

If you chose your own model, configure the kinematics joints on the robot.
Configure a manipulator to move the robot effector
- Select the end-effector Link6 in the Unity's Hierarchy tab.
- From the top menu, click on INTERACT > Physics > Add Manipulator...
- Select Unity Transform as Device Type, then click Add button
You can learn more about manipulators here.
- Click on Play to launch your simulation, select and and move around the Unity Transform game object to see the animated robot.
Use Unity Timeline to define keyframes
-
Open the Timeline window in Window > Sequencing > Timeline.

-
Select the Unity Transform game object in the Hierarchy tab.
- On the Timeline tab, click the Create button to create a new Timeline Asset and save it in the Unity's project.
-
By default, the timeline is labeled with frame numbers. Robotics engineers usually prefers to express positions with regard to time. Switch to Seconds instead of Frames by clicking the gear icons in the top-right part of window's timeline.

-
Move Unity Transform game object and add Keyframes. Learn more on this : https://docs.unity3d.com/Manual/animeditor-AnimatingAGameObject.html
When simulation is running, Unity Transform will move, according to the animation. The robot will try to follow this trajectory, while taking into account joints limits, inertia and kinematic.