Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
docs/.vitepress/cache
docs/.vitepress/dist
.idea*
24 changes: 15 additions & 9 deletions docs/PathPlanner/autonomous-selector.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Adding Autonomous Routines to the OperatorCommandMap

XBOT does not use a traditional WPILib `SendableChooser` for autonomous selection.
Instead, it provides a higher‑level system built around the **OperatorCommandMap** and **AutonomousCommandProvider** classes.
Instead, it provides a higher‑level system built around the
**OperatorCommandMap** and **AutonomousCommandProvider** classes.
Comment on lines +4 to +5

This system allows you to:
- Register autonomous routines
Expand Down Expand Up @@ -37,16 +38,19 @@ Once configured, the auto is automatically added to the XBOT auto selector.
# Registering the Auto with OperatorCommandMap

### Use the AutonomousCommandProvider to register the auto:
```java
var shootFromHub = setAutonomousCommandProvider.get();
shootFromHub.setAutoCommand(shootFromHubCommandGroup, Landmarks.blueStartTrenchToOutpost);
shootFromHub.includeOnSmartDashboard("Shoot from hub.");
```
Here is an example of registering a single auto routine:

var hubToDepoToTower = setAutonomousCommandProvider.get();
hubToDepoToTower.setAutoCommand(AutoBuilder.buildAuto("HubToDepoToTower"));
hubToDepoToTower.includeOnSmartDashboard("Hub to Depo to Tower Auto");
Comment on lines +41 to +46
```
### Breakdown:

#### 1. setAutoCommand(command, landmark)
- `command`: The command or command group to run during autonomous.
- `landmark`: The starting position on the field.
#### 1. setAutoCommand(AutoBuilder.buildAuto("AutoName"));
- `AutoBuilder`: A utility class used to build auto routines.
- `.buildAuto("AutoName")`: Builds an auto routine based on the name of an auto you created in the PathPlanner GUI.
- The string you pass must match the name of an auto in your PathPlanner project.

#### 2. includeOnSmartDashboard("Name")
- Adds the auto to:
Expand All @@ -58,7 +62,9 @@ The string you pass becomes the selectable name.
## Adding Multiple Autos

You can register as many autos as you want:
```java
```
Here is an example of registering multiple autonomous programs:

Comment on lines +65 to +67
var moveAcrossField = setAutonomousCommandProvider.get();
moveAcrossField.setAutoCommand(moveAcrossFieldCommand, Landmarks.blueStartTrenchToOutpost);
moveAcrossField.includeOnSmartDashboard("Move midway through field and back.");
Expand Down
5 changes: 4 additions & 1 deletion docs/PathPlanner/creating-paths.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Creating Paths and Autos in PathPlanner

This guide explains how to create paths, configure constraints, add event markers, and build full autonomous routines using the PathPlanner GUI.
This guide explains how to create paths,
configure constraints,
add event markers,
and build full autonomous routines using the PathPlanner GUI.
Comment on lines +3 to +6

---

Expand Down
18 changes: 9 additions & 9 deletions docs/PathPlanner/installation-&-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ maven { url "https://3015rangerrobotics.github.io/pathplannerlib/repo"}

PathPlanner is configured in the robot initialization:

```java
// In Robot.java
In Robot.java:
```
Comment on lines +21 to +22
getInjectorComponent().configurePathPlannerLib();
```

Expand All @@ -44,10 +44,10 @@ PathPlannerAuto auto = new PathPlannerAuto("MyAutoPath");

## Key Concepts

| Concept | Description |
|---------|-------------|
| **Waypoint** | A point the robot path passes through |
| **Constraint** | Max speed and acceleration for a path segment |
| **Event** | Triggers a command at a specific point on the path |
| **Holonomic** | Uses swerve's ability to rotate independently while moving |
| **Choreo** | Alternative path planner (also supported by WPILib) |
| Concept | Description |
|----------------|------------------------------------------------------------|
| **Waypoint** | A point the robot path passes through |
| **Constraint** | Max speed and acceleration for a path segment |
| **Event** | Triggers a command at a specific point on the path |
| **Holonomic** | Uses swerve's ability to rotate independently while moving |
| **Choreo** | Alternative path planner (also supported by WPILib) |
4 changes: 3 additions & 1 deletion docs/PathPlanner/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# PathPlanner Overview

PathPlanner is a motion‑planning tool used in FRC to create autonomous paths and full autonomous routines. It allows teams to design smooth, constraint‑aware trajectories and embed event markers that trigger robot commands during autonomous.
PathPlanner is a motion‑planning tool used in FRC to create autonomous paths and full autonomous routines.
It allows teams to design smooth,
constraint‑aware trajectories and embed event markers that trigger robot commands during autonomous.
Comment on lines +3 to +5

## Why PathPlanner?
- Visual path creation
Expand Down