From 025d9e47f0b4572a1794e730f1a7da43cb31f931 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 23 Oct 2024 19:22:23 -0400 Subject: [PATCH] --- .../deploy/swerve/controllerproperties.json | 8 +++++ src/main/deploy/swerve/modules/backleft.json | 30 +++++++++++++++++++ src/main/deploy/swerve/modules/backright.json | 30 +++++++++++++++++++ src/main/deploy/swerve/modules/frontleft.json | 30 +++++++++++++++++++ .../deploy/swerve/modules/frontright.json | 30 +++++++++++++++++++ .../swerve/modules/physicalproperties.json | 16 ++++++++++ .../deploy/swerve/modules/pidfproperties.json | 16 ++++++++++ src/main/deploy/swerve/swervedrive.json | 14 +++++++++ 8 files changed, 174 insertions(+) create mode 100644 src/main/deploy/swerve/controllerproperties.json create mode 100644 src/main/deploy/swerve/modules/backleft.json create mode 100644 src/main/deploy/swerve/modules/backright.json create mode 100644 src/main/deploy/swerve/modules/frontleft.json create mode 100644 src/main/deploy/swerve/modules/frontright.json create mode 100644 src/main/deploy/swerve/modules/physicalproperties.json create mode 100644 src/main/deploy/swerve/modules/pidfproperties.json create mode 100644 src/main/deploy/swerve/swervedrive.json diff --git a/src/main/deploy/swerve/controllerproperties.json b/src/main/deploy/swerve/controllerproperties.json new file mode 100644 index 0000000..669097e --- /dev/null +++ b/src/main/deploy/swerve/controllerproperties.json @@ -0,0 +1,8 @@ +{ + "angleJoystickRadiusDeadband": 0.5, + "heading": { + "p": 0.4, + "i": 0, + "d": 0.01 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/backleft.json b/src/main/deploy/swerve/modules/backleft.json new file mode 100644 index 0000000..0d3c214 --- /dev/null +++ b/src/main/deploy/swerve/modules/backleft.json @@ -0,0 +1,30 @@ +{ + "location": { + "front": -12.375, + "left": 12.375 + }, + "absoluteEncoderOffset":209.443, + "drive": { + "type": "sparkmax", + "id": 8, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 9, + "canbus": null + }, + "inverted": { + "angle": true, + "drive": false + }, + "conversionFactor": { + "angle": 0, + "drive": 0 + }, + "encoder": { + "type": "cancoder", + "id": 6, + "canbus": null + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/backright.json b/src/main/deploy/swerve/modules/backright.json new file mode 100644 index 0000000..a2b0c92 --- /dev/null +++ b/src/main/deploy/swerve/modules/backright.json @@ -0,0 +1,30 @@ +{ + "location": { + "front": -12.375, + "left": -12.375 + }, + "absoluteEncoderOffset": 5.537, + "drive": { + "type": "sparkmax", + "id": 11, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 12, + "canbus": null + }, + "inverted": { + "angle": true, + "drive": false + }, + "conversionFactor": { + "angle": 0, + "drive": 0 + }, + "encoder": { + "type": "cancoder", + "id": 7, + "canbus": null + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/frontleft.json b/src/main/deploy/swerve/modules/frontleft.json new file mode 100644 index 0000000..5cd53a4 --- /dev/null +++ b/src/main/deploy/swerve/modules/frontleft.json @@ -0,0 +1,30 @@ +{ + "location": { + "front": 12.375, + "left": 12.375 + }, + "absoluteEncoderOffset":258.223 , + "drive": { + "type": "sparkmax", + "id": 2, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 3, + "canbus": null + }, + "inverted": { + "angle": true, + "drive": false + }, + "conversionFactor": { + "angle": 0, + "drive": 0 + }, + "encoder": { + "type": "cancoder", + "id": 4, + "canbus": null + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/frontright.json b/src/main/deploy/swerve/modules/frontright.json new file mode 100644 index 0000000..cd1f7a6 --- /dev/null +++ b/src/main/deploy/swerve/modules/frontright.json @@ -0,0 +1,30 @@ +{ + "location": { + "front": 12.375, + "left": -12.375 + }, + "absoluteEncoderOffset": 110.215, + "drive": { + "type": "sparkmax", + "id": 18, + "canbus": null + }, + "angle": { + "type": "sparkmax", + "id": 17, + "canbus": null + }, + "inverted": { + "angle": true, + "drive": false + }, + "conversionFactor": { + "angle": 0, + "drive": 0 + }, + "encoder": { + "type": "cancoder", + "id": 5, + "canbus": null + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/physicalproperties.json b/src/main/deploy/swerve/modules/physicalproperties.json new file mode 100644 index 0000000..4994775 --- /dev/null +++ b/src/main/deploy/swerve/modules/physicalproperties.json @@ -0,0 +1,16 @@ +{ + "optimalVoltage": 12, + "wheelGripCoefficientOfFriction": 1.19, + "currentLimit": { + "drive": 40, + "angle": 20 + }, + "conversionFactor": { + "angle": 16.8, + "drive": 0.04 + }, + "rampRate": { + "drive": 0.25, + "angle": 0.25 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/modules/pidfproperties.json b/src/main/deploy/swerve/modules/pidfproperties.json new file mode 100644 index 0000000..99664bb --- /dev/null +++ b/src/main/deploy/swerve/modules/pidfproperties.json @@ -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 + } +} \ No newline at end of file diff --git a/src/main/deploy/swerve/swervedrive.json b/src/main/deploy/swerve/swervedrive.json new file mode 100644 index 0000000..1604d61 --- /dev/null +++ b/src/main/deploy/swerve/swervedrive.json @@ -0,0 +1,14 @@ +{ + "imu": { + "type": "pigeon", + "id": 0, + "canbus": null + }, + "invertedIMU": false, + "modules": [ + "frontleft.json", + "frontright.json", + "backleft.json", + "backright.json" + ] +} \ No newline at end of file