Skip to content

Commit

Permalink
Week 4 (Owings Mill) (#41)
Browse files Browse the repository at this point in the history
* camera tag corners

* angle estimation strategy

* lol

* fix merge conflicts

* auto tuning so far today

* tuned vision shot

* add tuning to week2

* driver practice 3/11

* speed up dt

* theta PID constants + proper serialization + Logger.recordDebugOutput

* ff characterization command

* finished ff characterization command

* auto tuning 3/13

* field oriented closed loop driving for module tuning

* attempted module tuning

* add untested 5 note auto

* five notegit add .

* finished debug stuff

* passing shot stuff

* remove /12

* auto fixes and shooting tuning

* fix merge conflicts

* log encoder position

* fix merge conflicts p2

* work from today:

* remote sensor working

* fix merge conflicts p3

* fix merge conflicts p4

* fix merge conflicts p5

* fix merge

* p6

* sm merge conflicts

* almost done

* merge conflicts

* merge conflicts fixed again

* five note working

* fix all merge conflicts

* change extensions.kt to debug logger

* fix leds hopefully

* parrallelize 5 notes auto wrist

* week 4 q1-29

* fix passing shot

* 2 note centerline

* hopefully no delay in autos

* make auto aim work using odometry

* three note centerline amp auto

* three note + pickup from source auto

* fix wrist and climb angle

* end of week 4 comp

* latest code

* 5 note changes

* more auto changes

* theta recorrects

* intake and vision fixes

* changes idk

* 5 note auto almost working -- pathfollowing tuning

* (hopefully) working 5 note

* auto in the wrong place

* flywheel and otf tuning

* more 5 note shi

* 5 note

* 6 note auto

* retune amp and feeder

* fix merge conflicts

* more 5 note stuff

* add smart amp and note auto alignment

* add smart amp and note auto alignment

* make 3 note 4 note

* working code

* switch to profiled PID for drive path command

Profiled PID controller means that our PID will be more snappy for larger amounts of error, which happens a lot with the rotation of the robot.

* Add back the commands for the 5 note

* Remove unnecessary comments in Robot.kt

* Spotless apply before merge.

---------

Co-authored-by: AlphaPranav9102 <[email protected]>
Co-authored-by: Matthew Choulas <[email protected]>
Co-authored-by: Saraansh Wadkar <[email protected]>
  • Loading branch information
4 people authored Mar 31, 2024
1 parent 740e068 commit ae5b851
Show file tree
Hide file tree
Showing 104 changed files with 5,703 additions and 1,173 deletions.
8 changes: 4 additions & 4 deletions .pathplanner/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"robotWidth": 0.85,
"robotLength": 0.952,
"robotWidth": 0.66,
"robotLength": 0.66,
"holonomicMode": true,
"pathFolders": [],
"autoFolders": [],
"defaultMaxVel": 3.0,
"defaultMaxVel": 3.5,
"defaultMaxAccel": 3.0,
"defaultMaxAngVel": 270.0,
"defaultMaxAngAccel": 600.0,
"maxModuleSpeed": 3.0
"maxModuleSpeed": 3.5
}
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import edu.wpi.first.gradlerio.deploy.roborio.RoboRIO

plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.10"
id "edu.wpi.first.GradleRIO" version "2024.2.1"
id "org.jetbrains.kotlin.jvm" version "1.6.0"
id "edu.wpi.first.GradleRIO" version "2024.3.1"
id "com.diffplug.spotless" version "6.3.0"
id "com.peterabeles.gversion" version "1.10"
id "org.jetbrains.kotlinx.kover" version "0.4.2"
Expand Down Expand Up @@ -87,6 +87,7 @@ dependencies {
implementation 'org.apache.commons:commons-collections4:4.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation "io.javalin:javalin:5.3.2"
implementation "gov.nist.math:jama:1.0.3"

// We need to add the Kotlin stdlib in order to use most Kotlin language features.
// compile "org.jetbrains.kotlin:kotlin-stdlib"
Expand Down
3 changes: 3 additions & 0 deletions simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"Clients": {
"open": true
},
"Connections": {
"open": true
},
"Server": {
"open": true
},
Expand Down
65 changes: 65 additions & 0 deletions src/main/deploy/pathplanner/paths/3 note auto.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 1.4353122681168922,
"y": 6.599687955484906
},
"prevControl": null,
"nextControl": {
"x": 2.4089441986763847,
"y": 6.384061887043822
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.7240209790758945,
"y": 6.292790417717031
},
"prevControl": {
"x": 3.1076892656431605,
"y": 6.27784919159728
},
"nextControl": {
"x": 5.6050847267357975,
"y": 6.300934892375481
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.125444951049996,
"y": 7.452889295278789
},
"prevControl": {
"x": 7.130589600518487,
"y": 6.610606330110338
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 270.0,
"maxAngularAcceleration": 600.0
},
"goalEndState": {
"velocity": 0,
"rotation": 0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": null,
"useDefaultConstraints": false
}
159 changes: 159 additions & 0 deletions src/main/deploy/pathplanner/paths/4 note centerline auto.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.7173996760500974,
"y": 6.565508998353678
},
"prevControl": null,
"nextControl": {
"x": 3.555119295355076,
"y": 5.634077091436045
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.742647710559476,
"y": 6.944752946475545
},
"prevControl": {
"x": 5.205260844050375,
"y": 6.83199871446017
},
"nextControl": {
"x": 6.307184491030538,
"y": 7.063203759276289
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.011889957811333,
"y": 7.437737927960554
},
"prevControl": {
"x": 6.9255550889526285,
"y": 7.401962318832323
},
"nextControl": {
"x": 8.41341650196685,
"y": 7.450961158761761
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.534309232539927,
"y": 6.433553662792256
},
"prevControl": {
"x": 6.5112943859614205,
"y": 6.918469113918448
},
"nextControl": {
"x": 3.973961025110295,
"y": 6.296111303489134
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.182455809721393,
"y": 5.789537970066136
},
"prevControl": {
"x": 6.86458841371461,
"y": 6.557616907301846
},
"nextControl": {
"x": 8.388072766841134,
"y": 5.669700379136495
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.534309232539927,
"y": 5.789537970066136
},
"prevControl": {
"x": 5.898939970481958,
"y": 7.056402536275015
},
"nextControl": {
"x": 3.169678494597896,
"y": 4.522673403857257
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.011889957811333,
"y": 4.091051042493323
},
"prevControl": {
"x": 7.17446454036676,
"y": 4.223585978625708
},
"nextControl": {
"x": 8.56422220208809,
"y": 4.003636310155177
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 4.2542200299280735,
"y": 5.010933615765413
},
"prevControl": {
"x": 6.077102383375072,
"y": 4.143657250497984
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [
{
"waypointRelativePos": 2,
"rotationDegrees": 0.0,
"rotateFast": false
},
{
"waypointRelativePos": 4,
"rotationDegrees": 0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 270.0,
"maxAngularAcceleration": 600.0
},
"goalEndState": {
"velocity": 0,
"rotation": -23.431739603226806,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 60.17646968828584,
"velocity": 0
},
"useDefaultConstraints": false
}
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/paths/4AndPickupNoteAuto.path
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxVelocity": 3.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 270.0,
"maxAngularAcceleration": 600.0
Expand Down
18 changes: 9 additions & 9 deletions src/main/deploy/pathplanner/paths/4NoteAuto.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
},
{
"anchor": {
"x": 2.4,
"y": 6.975077486323955
"x": 2.930867001997314,
"y": 7.04927269938452
},
"prevControl": {
"x": 1.8081527395083707,
"y": 6.967733500350662
"x": 2.339019741505685,
"y": 7.041928713411227
},
"nextControl": {
"x": 2.6463913517236755,
"y": 6.978134853911492
"x": 3.1772583537209895,
"y": 7.052330066972057
},
"isLocked": false,
"linkedName": null
Expand All @@ -48,15 +48,15 @@
},
{
"anchor": {
"x": 2.337981361851478,
"x": 2.8039263987960847,
"y": 5.501318674946378
},
"prevControl": {
"x": 1.7239291602064108,
"x": 2.1898741971510174,
"y": 5.488891565963109
},
"nextControl": {
"x": 2.7674829050953003,
"x": 3.233427942039907,
"y": 5.510010871590367
},
"isLocked": false,
Expand Down
Loading

0 comments on commit ae5b851

Please sign in to comment.