-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a5d4d4
commit f0a9d10
Showing
53 changed files
with
3,968 additions
and
2,259 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
src/main/deploy/photon-configs/front-right.zip filter=lfs diff=lfs merge=lfs -text | ||
src/main/deploy/photon-configs/back-left.zip filter=lfs diff=lfs merge=lfs -text | ||
src/main/deploy/photon-configs/front-left.zip filter=lfs diff=lfs merge=lfs -text | ||
customAssets/Robot_Pumbaa/model_0.glb filter=lfs diff=lfs merge=lfs -text | ||
customAssets/Robot_Pumbaa/model_1.glb filter=lfs diff=lfs merge=lfs -text | ||
customAssets/Robot_Pumbaa/model_2.glb filter=lfs diff=lfs merge=lfs -text | ||
customAssets/Robot_Pumbaa/model_3.glb filter=lfs diff=lfs merge=lfs -text | ||
customAssets/Robot_Pumbaa/model.glb filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,16 +18,14 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 # v2 minimum required | ||
- name: Run check style | ||
uses: nikitasavinov/checkstyle-action@master | ||
uses: dbelyaev/action-checkstyle@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: 'github-check' | ||
tool_name: 'testtool' | ||
fail_on_error: true | ||
filter_mode: nofilter | ||
level: error | ||
checkstyle_config: checks.xml | ||
checkstyle_version: '9.2.1' | ||
spell_check: | ||
name: Spell Check | ||
runs-on: ubuntu-latest | ||
|
@@ -38,8 +36,7 @@ jobs: | |
uses: codespell-project/actions-codespell@master | ||
with: | ||
check_filenames: true | ||
ignore_words_file: .codespellignore | ||
merge_conflict: | ||
merge_conflict_job: | ||
runs-on: ubuntu-latest | ||
name: Find merge conflicts | ||
steps: | ||
|
@@ -48,6 +45,22 @@ jobs: | |
# Run the actual merge conflict finder | ||
- name: Merge Conflict finder | ||
uses: olivernybroe/[email protected] | ||
javadoc: | ||
name: Test Javadocs Generation | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-22.04 | ||
# This grabs the WPILib docker container | ||
container: wpilib/roborio-cross-ubuntu:2024-22.04 | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
# Grant execute permission for gradlew | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
# Runs a single command using the runners shell | ||
- name: Create Javadocs | ||
run: ./gradlew javadoc | ||
build: | ||
name: Build | ||
# The type of runner that the job will run on | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Javadoc | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push | ||
push: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
javadoc: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
name: Generate Javadocs | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-22.04 | ||
# This grabs the WPILib docker container | ||
container: wpilib/roborio-cross-ubuntu:2023-22.04 | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
# Grant execute permission for gradlew | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
# Runs a single command using the runners shell | ||
- name: Create Javadocs | ||
run: ./gradlew javadoc | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: './build/docs/javadoc' | ||
- name: Deploy to Github Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"robotWidth": 0.876, | ||
"robotLength": 0.876, | ||
"holonomicMode": true, | ||
"pathFolders": [ | ||
"P321", | ||
"P123", | ||
"Resnick 3", | ||
"Resnick 4", | ||
"Resnick 5" | ||
], | ||
"autoFolders": [], | ||
"defaultMaxVel": 5.0, | ||
"defaultMaxAccel": 4.0, | ||
"defaultMaxAngVel": 540.0, | ||
"defaultMaxAngAccel": 720.0, | ||
"maxModuleSpeed": 4.5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"vscjava.vscode-java-debug", | ||
"editorconfig.editorconfig", | ||
"vscjava.vscode-java-pack", | ||
"github.vscode-pull-request-github", | ||
"eamodio.gitlens", | ||
"redhat.java", | ||
"wpilibsuite.vscode-wpilib" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,25 @@ | ||
# BaseFalconSwerve </br> | ||
**Basic Swerve Code for a Swerve Module using Falcon Motors, a CTRE CANCoder, and a CTRE Pigeon Gyro** </br> | ||
This code was designed with SDS MK3 style modules in mind, but should be easily adaptable to other styles of modules.</br> | ||
|
||
**Setting Constants** | ||
---- | ||
The following things must be adjusted to your robot and module's specific constants in the Constants.java file (all distance units must be in meters, and rotation units in radians):</br> | ||
1. Gyro Settings: ```pigeonID``` and ```invertGyro``` (ensure that the gyro rotation is CCW+ (Counter Clockwise Positive) | ||
2. ```trackWidth``` (Center to Center distance of left and right modules) | ||
3. ```wheelBase``` (Center to Center distance of front and rear module wheels) | ||
4. ```wheelDiameter``` | ||
5. ```driveGearRatio``` (for SDS MK3 either: (8.16 / 1) or (6.86 / 1)) | ||
6. ```angleGearRatio``` (for SDS MK3: (12.8 / 1)) | ||
7. Angle Motor PID Values: | ||
* To tune start with a low P value (0.01). | ||
* Multiply by 10 until the module starts oscillating around the set point | ||
* Scale back by searching for the value (for example, if it starts oscillating at a P of 10, then try (10 -> 5 -> 7.5 -> etc)) until the module overshoots the setpoint but corrects with no oscillation. | ||
* Repeat the process for D. The D value will basically help prevent the overshoot. Ignore I. | ||
8. Get the drive characterization values (KS, KV, KA) by using the WPILib characterization tool, found [here](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-characterization/introduction.html). You will need to lock your modules straight forward, and complete the characterization as if it was a standard tank drive. | ||
9. Tune drive kP until it doesn't overshoot and doesn't oscillate around a target velocity. | ||
10. For ```maxSpeed``` and ```maxAngularVelocity``` you can use the theoretical values, but it is better to physically drive the robot and find the actual max values. | ||
11. Set ```canCoderInvert``` and ```angleMotorInvert``` such that both are CCW+. | ||
12. In the module specific constants, set the can ID's of the motors and CANCoders for the respective modules. | ||
13. Setting Offsets | ||
* For finding the offsets, use a piece of 1x1 metal that is straight against the forks of the front and back modules (on the left and right side) to ensure that the modules are straight. | ||
* You need to point the bevel gears of all the wheels in the same direction (either facing left or right). And preferably you should have the wheels facing in the direction where a positive input to the drive motor drives forward. If for some reason you set the offsets with the wheels backwards, you can change the ```driveMotorInvert``` to fix. | ||
* Open smartdashboard (or shuffleboard and go to the smartdashboard tab), you will see 4 printouts called "Mod 0 Cancoder", "Mod 1 Cancoder", etc. If you have already straightened the modules, copy those 4 numbers exactly (to 2 decimal places) to their respective ```angleOffset``` variable in constants. | ||
|
||
|
||
**Controller Mappings** | ||
---- | ||
This code is natively setup to use a xbox controller to control the swerve driver. </br> | ||
The Left Stick controls translation (forwards and sideways movement), and the Right Stick controls rotation. </br> | ||
The Y button is mapped to zero the gyro, useful if the gyro drifts mid match, just rotate the robot forwards, and press Y to rezero. | ||
# Jetsi Offseason | ||
|
||
[![CI](https://github.com/Frc5572/Jetsi-Offseason/actions/workflows/main.yml/badge.svg)](https://github.com/Frc5572/Jetsi-Offseason/actions/workflows/main.yml) [![Java Docs](https://img.shields.io/badge/docs-2024-blue)](https://frc5572.github.io/FRC2024/) | ||
|
||
Code for our 2024 robot | ||
|
||
## CAN IDs | ||
|
||
### Swerve | ||
|
||
Front Left Drive Motor - | ||
Front Left Angle Motor - | ||
Front Left canCoder - | ||
|
||
Front Right Drive Motor - | ||
Front Right Angle Motor - | ||
Front Right canCoder - | ||
|
||
Back Left Drive Motor - | ||
Back Left Angle Motor - | ||
Back Left canCoder - | ||
|
||
Back Right Drive Motor - | ||
Back Right Angle Motor - | ||
Back Right canCoder - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.