Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
23bc253
Choreo Folder README.md done
sohnshaik May 7, 2026
375a4d4
choreo fork readme.md and comments
sohnshaik May 7, 2026
84722df
betterer formatting
sohnshaik May 8, 2026
df47bba
moved shot calc to own folder and made robot readme
sohnshaik May 13, 2026
302d062
oops wrong folder
sohnshaik May 13, 2026
e8ced24
i dont like some of this stuff ew
sohnshaik May 13, 2026
c8187f8
I FIGURED IT OUT I LOVE THE INTERNET
sohnshaik May 13, 2026
9b6660e
took me an hour and a half but now this class is readable :face_holdi…
sohnshaik May 13, 2026
2ab86b9
im not commit farming this space was just pissing me off
sohnshaik May 13, 2026
be1c0fa
format
sohnshaik May 16, 2026
a2ef16d
formatting
sohnshaik May 16, 2026
b18e8d6
Merge branch 'codebase-rewrite' of https://github.com/WaltonRobotics/…
sohnshaik May 16, 2026
325d5b4
more formatting of autonchooser
sohnshaik May 16, 2026
c4bb985
EVEN MORE FORMATTING >:D
sohnshaik May 16, 2026
bf43f38
changed markdowns
sohnshaik May 16, 2026
3300ee9
whole buncha MY slop fixed
sohnshaik May 17, 2026
6050ae1
tunable shenanigans and also tunable for ball detection
sohnshaik May 17, 2026
9853236
twas browsin through the repo and noticed that people wouldnt know ho…
sohnshaik May 17, 2026
329f334
JARVIS, FOLDERIZE
sohnshaik May 17, 2026
4421fbd
Revert "JARVIS, FOLDERIZE"
sohnshaik May 17, 2026
c60d61a
edited shooter markdowns and using mermaid for graph
sohnshaik May 17, 2026
bd7357f
clean up & reformatting all of shooter subsystem
sohnshaik May 22, 2026
8621753
OH MY GOD ROBOT IS DONE
sohnshaik May 22, 2026
7618a76
i think thats everything?
sohnshaik May 29, 2026
dc7ba0b
shootercalc renamed
sohnshaik Jun 8, 2026
658f543
made a little oopsies with TOF
sohnshaik Jun 8, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ simgui-ds.json
simgui-window.json
simgui.json
networktables.json
bin/main/choreo/README.md
bin/main/frc/robot/README.md
23 changes: 23 additions & 0 deletions src/main/deploy/choreo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Autonomous Paths
This folder is where all the paths that we made for autonomous pathing exist. Such paths were made using [Choreo](https://choreo.autos/), a path making software. Choreo is how we make all of our autonomous paths, and this year, we opted to make seperate paths, and chain them together for our routines.

### How to make your own paths!
If you would like to see what the paths look like for yourself, or even make your own, lucky for you its something thats very simple! First things first, you need to make sure that Choreo is installed([link for convienience](https://github.com/SleipnirGroup/Choreo/releases)), then navigate the menu (**LOCATED IN THE TOP LEFT**) to the *open project* tab. From there, navigate to where this cloned repository exists on *your* computer, and navigate to this folder. Select the ```Rebuilt.chor``` file and you're good to go! You can see the other paths there, and make your own from there as well.


![Choreo Logo](images/choreoLogo.png)

### Example of one of our autons
```java
addMultiAuton(kLeftTrenchTwoCycleBumpReturn,
new AdaptableAutonInfo(AutonK.kLeftOneBumpReturn, AutonK.kSOTMTimeout, true, 0),
new AdaptableAutonInfo(AutonK.kLeftTwoBumpToTrench, AutonK.kSOTMTimeout, true, 0),
new AdaptableAutonInfo(AutonK.kLeftTwoBumpReturn, AutonK.kSOTMTimeout, true, 0),
new AdaptableAutonInfo(AutonK.kLeftTwoBumpToTrench, AutonK.kSOTMTimeout, true, 0),
new AdaptableAutonInfo(AutonK.kLeftTwoGoOut, AutonK.kSOTMTimeout, true, 0));
```
Note that we chain 5 paths together to create an auton, in which we run the RIGHT_one_bumpReturn, the RIGHT_two_bumpToTrench, the RIGHT_two_bumpReturn, followed by the RIGHT_two_bumpToTrench, finishing with the RIGHT_two_goOut. All of these paths exist as traj's in this folder, and that is where the code pulls from; such paths are, once again, made in choreo. So in order to make a new auton, you must make a plethora of new paths, and make it so that they chain together using the logic seen above.

### Example of one of our paths (LEFT_one_bumpReturn)
We start at the GREEN waypoint (waypoint one for those of you who are colorblind), and end at the RED waypoint (waypoint 7). The arrow on the square represents the front of our robot, and this year, that is our intake (counter-intuitive, tell me about it :sob:).
![Choreo Path](images/choreoPath.png)
Binary file added src/main/deploy/choreo/images/choreoLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/choreo/images/choreoPath.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/main/java/choreo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Choreo

This folder contains our wrapper and utility classes for integrating [Choreo](https://choreo.autos/) into our robot code. Choreo is the path-planning software we use to generate and follow autonomous trajectories.

## Why we forked/duplicated Choreo's library

We duplicated Choreo's library classes locally so we could experiment with **pose correction** during path following. The idea was that if the robot drifts off its expected pose mid-path, we would pause the Choreo timer, drive the robot back to the correct pose, and then resume the timer once the robot is back on track. We weren't able to fully get this working in time, but the groundwork is here.
```java
if(kUsePoseCorrection) {
if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) > 0.2) {
activeTimer.stop();
outOfBounds.set(true);
} else if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) < 0.05) {
activeTimer.start();
outOfBounds.set(false);
}
}
```

## Structure

### auto/
Handles autonomous routine selection and execution.

- `AutoChooser.java`: lets drivers select an auto routine from the dashboard
- `AutoFactory.java`: constructs auto routines by chaining trajectory segments together
- `AutoRoutine.java`: represents a full autonomous routine made up of multiple trajectories
- `AutoTrajectory.java`: wraps a single Choreo trajectory for command-based execution

### trajectory/
Core trajectory representation and sampling logic.

- `Trajectory.java`: the main trajectory class, holds a list of samples and handles time-based lookups
- `TrajectorySample.java`: a single sampled state along a trajectory (pose, velocity, etc.)
- `SwerveSample.java`: trajectory sample specific to swerve drivetrains
- `DifferentialSample.java`: trajectory sample specific to differential drivetrains
- `EventMarker.java`: represents a timed event trigger within a trajectory

### util/
Utility and configuration classes.

- `Choreo.java`: main entry point for loading trajectories from deploy files
- `ChoreoAlert.java`: handles driver station alerts related to Choreo
- `ChoreoAllianceFlipUtil.java`: flips trajectories for red/blue alliance mirroring
- `ChoreoArrayUtil.java`: array helper methods used internally
- `FieldDimensions.java`: field size constants used for alliance flipping
- `TrajSchemaVersion.java`: version tracking for the trajectory file format
21 changes: 14 additions & 7 deletions src/main/java/choreo/auto/AutoTrajectory.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static choreo.util.ChoreoAlert.allianceNotReady;
import static edu.wpi.first.wpilibj.Alert.AlertType.kError;
import static edu.wpi.first.wpilibj.Alert.AlertType.kWarning;
import static frc.robot.Constants.*;

import choreo.Choreo.TrajectoryLogger;
import choreo.auto.AutoFactory.AllianceContext;
Expand Down Expand Up @@ -178,13 +179,19 @@ private void cmdExecute() {
return;
}
var sample = sampleOpt.get();
// if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) > 0.2) {
// activeTimer.stop();
// outOfBounds.set(true);
// } else if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) < 0.05) {
// activeTimer.start();
// outOfBounds.set(false);
// }
/*
* The entire idea of this block is to see that if we are outside of a certain range (0.2 meters in this case), we would pause the autonomous timer - * the timer just tells the robot where it should be, its nothing to
* do with pose based, as choreo is time based * - until the robot reaches the pose (0.05 meters within tolerance in this case).
*/
if(kUsePoseCorrection) {
if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) > 0.2) {
activeTimer.stop();
outOfBounds.set(true);
} else if (poseSupplier.get().getTranslation().getDistance(sample.getPose().getTranslation()) < 0.05) {
activeTimer.start();
outOfBounds.set(false);
}
}
if (sample instanceof SwerveSample swerveSample) {
var swerveController = (Consumer<SwerveSample>) this.controller;
swerveController.accept(swerveSample);
Expand Down
Loading