diff --git a/.gitignore b/.gitignore index 05cc590..bdb7062 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules docs/.vitepress/cache docs/.vitepress/dist +.idea* diff --git a/docs/PathPlanner/autonomous-selector.md b/docs/PathPlanner/autonomous-selector.md index dded3dc..6ffcc2b 100644 --- a/docs/PathPlanner/autonomous-selector.md +++ b/docs/PathPlanner/autonomous-selector.md @@ -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. This system allows you to: - Register autonomous routines @@ -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"); ``` ### 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: @@ -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: + var moveAcrossField = setAutonomousCommandProvider.get(); moveAcrossField.setAutoCommand(moveAcrossFieldCommand, Landmarks.blueStartTrenchToOutpost); moveAcrossField.includeOnSmartDashboard("Move midway through field and back."); diff --git a/docs/PathPlanner/creating-paths.md b/docs/PathPlanner/creating-paths.md index 8704017..57be7d2 100644 --- a/docs/PathPlanner/creating-paths.md +++ b/docs/PathPlanner/creating-paths.md @@ -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. --- diff --git a/docs/PathPlanner/installation-&-integration.md b/docs/PathPlanner/installation-&-integration.md index 3200ab4..a23fc62 100644 --- a/docs/PathPlanner/installation-&-integration.md +++ b/docs/PathPlanner/installation-&-integration.md @@ -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: +``` getInjectorComponent().configurePathPlannerLib(); ``` @@ -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) | \ No newline at end of file +| 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) | \ No newline at end of file diff --git a/docs/PathPlanner/overview.md b/docs/PathPlanner/overview.md index cc633da..87dbc40 100644 --- a/docs/PathPlanner/overview.md +++ b/docs/PathPlanner/overview.md @@ -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. ## Why PathPlanner? - Visual path creation