Skip to content

Commit

Permalink
feat: add new swerve module configs (still need encoder calibration)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGamer1002 authored and NyxAlexandra committed Mar 15, 2024
1 parent 4d52a84 commit 1b61ec9
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/deploy/maxswerve/controllerproperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"angleJoystickRadiusDeadband": 0.5,
"heading": {
"p": 1.1,
"i": 0,
"d": 0.125
}
}
23 changes: 23 additions & 0 deletions src/main/deploy/maxswerve/modules/backleft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"drive": {
"type": "sparkmax",
"id": 4
},
"angle": {
"type": "sparkmax",
"id": 3
},
"encoder": {
"type": "attached",
"id": 0
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 107.842,
"location": {
"x": -13.75,
"y": 13.75
}
}
23 changes: 23 additions & 0 deletions src/main/deploy/maxswerve/modules/backright.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"drive": {
"type": "sparkmax",
"id": 6
},
"angle": {
"type": "sparkmax",
"id": 5
},
"encoder": {
"type": "attached",
"id": 0
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 178.330,
"location": {
"x": -13.75,
"y": -13.75
}
}
23 changes: 23 additions & 0 deletions src/main/deploy/maxswerve/modules/frontleft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"drive": {
"type": "sparkmax",
"id": 2
},
"angle": {
"type": "sparkmax",
"id": 9
},
"encoder": {
"type": "attached",
"id": 0
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 250.049,
"location": {
"x": -2.75,
"y": -13.75
}
}
23 changes: 23 additions & 0 deletions src/main/deploy/maxswerve/modules/frontright.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"drive": {
"type": "sparkmax",
"id": 2
},
"angle": {
"type": "sparkmax",
"id": 3
},
"encoder": {
"type": "attached",
"id": 0
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 254.092,
"location": {
"x": 2.75,
"y": -13.75
}
}
16 changes: 16 additions & 0 deletions src/main/deploy/maxswerve/modules/physicalproperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"optimalVoltage": 12,
"wheelGripCoefficientOfFriction": 1.19,
"currentLimit": {
"drive": 40,
"angle": 25
},
"conversionFactor": {
"angle": 360,
"drive": 0.05082576649756735
},
"rampRate": {
"drive": 0.25,
"angle": 0.25
}
}
16 changes: 16 additions & 0 deletions src/main/deploy/maxswerve/modules/pidfproperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"drive": {
"p": 0.0020645,
"i": 0,
"d": 0,
"f": 0,
"iz": 0
},
"angle": {
"p": 0.01,
"i": 0,
"d": 0,
"f": 0,
"iz": 0
}
}
14 changes: 14 additions & 0 deletions src/main/deploy/maxswerve/swervedrive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"imu": {
"type": "navx_mxp",
"id": 0,
"canbus": null
},
"invertedIMU": true,
"modules": [
"frontleft.json",
"frontright.json",
"backleft.json",
"backright.json"
]
}

0 comments on commit 1b61ec9

Please sign in to comment.