# PathPlanner

Documentation: <https://pathplanner.dev/home.html>

1. Open PathPlanner
2. Select your robot code folder as the project, this tell PathPlanner you are making paths for this project and it will put it in the right spot for that project
3. Design your routine in a single path file for brainstorming purposes
4. Segment it accosting to the following section
5. Create the auto class

{% content-ref url="../code/autonomous" %}
[autonomous](https://uni-rex5817.gitbook.io/programming-training/code/autonomous)
{% endcontent-ref %}

{% hint style="danger" %}
The Trajectory Library (Where your auto pulls the trajectory’s from) will detect paths in the generated location so DON'T MOVE THEM
{% endhint %}

## Segmenting

In order to sequence auto actions the auto needs to be segmented at every landmark point, for example the intake location

### Best Practices for Segmenting

* Segments should be named memorably and clearly
* Segments should be reused
* Segments should be made up of linked start and end points (ex: Source, Scoring Location A, Preplaced piece A)
* Segments should be organized in folders
* Segments should be optimized for time&#x20;
* Segments should use appropriate acceleration and velocity constraints

{% hint style="info" %}
Open the 2025Code repo in PathPlanner to see how we create the trajectories, notice how every point is linked, you edit the end point of a segment the next starting point get automattically updated
{% endhint %}

Once you have your path segments it will be useful for visualization if you use pathplanner's auto section to sequence them (this will not be referenced in code)
