# Trajectory planner

> Plan and run robot motions through a list of poses directly in Isaac Sim. Learn how to create a skill, calculate the inverse kinematics, plan with Wandelbots NOVA, and execute the trajectory.

The `Trajectory Planner` turns an ordered list of poses into a robot motion.
Wandelbots NOVA calculates the joint configurations and plans the trajectory.
Isaac Sim shows the result and runs it on the connected robot.

The planner calls a list of poses with its settings a skill.

### Prerequisites

1. [Add a robot and connect its motion group](/simulation/build-scene/scene-from-nova) to a [virtual controller](/simulation/installation#create-a-virtual-controller-for-a-robot-in-the-scene).\
   Planning works with any controller. `Execute`, `Start from here`, and `Go to` set the joints of the virtual controller and fail with a physical controller.
2. Create the target poses as [ghost objects or poses](/simulation/build-scene/scene-from-nova#mark-target-poses).

### Step 1: Create a skill

1. Open `Tools` → `Wandelbots NOVA` → `Trajectory Planner`.
2. Enter a name and click `Create Skill`.\
   → A skill section opens. If the scene has one motion group, the planner selects it.
3. Check `Motion Group` and `Default TCP`.
4. Optional: Select a `Collision Scene` from the collision setups stored in Wandelbots NOVA.

### Step 2: Add poses

1. In `Poses`, click `Add poses`.
2. Select the poses in the order the robot should visit them and click `Select`.\
   → The first pose is the `START` pose. Each other pose shows its motion type and joint configuration.
3. Optional: Change the motion type per pose: `Cartesian PTP`, `Linear`, or `Joint PTP`.
4. Optional: Click `Edit` to reorder, hide, or remove poses.

### Step 3: Calculate the inverse kinematics

Click `Calculate IKs`.\
→ Each pose shows a joint configuration. Poses without a solution are red.

Select a pose to preview the robot at its joint configuration in the viewport.
Select another joint configuration in the list to compare the postures.

![Screenshot of the Trajectory Planner with three poses and a robot preview at the selected pose](/assets/nova/omniservice/trajectory_planner/trajectory-planner-preview.webp)

### Step 4: Plan the trajectory

Click `Plan`.\
→ The trajectory appears in the viewport, and `Expected execution time` shows its duration.

The planner stores the plan in the object store of the cell under `trajectory-plan/<skill name>`.
`Load` reads stored plans back into the planner.

If a pose is out of reach, planning stops and a red robot shows the failing configuration.

### Step 5: Execute the trajectory

Click `Execute`.\
→ The simulation starts and the robot moves along the trajectory.

`Pause` and `Resume` hold and continue the motion. `Stop` cancels it.
To run only part of the trajectory, select a pose and click `Start from here`.

> **Warning:** `Execute`, `Start from here`, and `Go to` move the motion group in Wandelbots NOVA.
> Without `Move to Start`, a virtual controller jumps to the first pose before the robot moves.

## Adjust the planning

Open `Settings` in a skill to change how the planner plans the trajectory:

- `Open Motion Settings`: Set blending and limits for all poses.
- `Payload Name` and `Payload Mass [kg]`: Plan with the payload of the tool.
- `CF Max Iterations` and `CF Step Size`: Tune collision-free planning.
- `Move to Start`: Plan a motion to the start pose before the trajectory.

To plan around obstacles, select a `Collision Scene` and check `Collision-free Planning`.
Collision-free planning takes longer than planning without obstacles.
Amber spheres on the trajectory mark the via points the collision-free planner added.

With the live update switch next to `Replan`, moving a pose calculates the inverse kinematics and the plan again.
