From b5842e23f50ad1fa8f6459eb268a552df2bd22f5 Mon Sep 17 00:00:00 2001 From: Raayed Mohammed Date: Sun, 15 Feb 2026 17:17:27 -0500 Subject: [PATCH 1/6] Refactored the JSON and constants file architectures to account for real robot vs. pushbot. --- .../{ => pushbot}/controllerproperties.json | 0 .../YAGSL/{ => pushbot}/modules/backleft.json | 0 .../{ => pushbot}/modules/backright.json | 0 .../{ => pushbot}/modules/frontleft.json | 0 .../{ => pushbot}/modules/frontright.json | 0 .../modules/physicalproperties.json | 0 .../{ => pushbot}/modules/pidfproperties.json | 0 .../YAGSL/{ => pushbot}/swervedrive.json | 0 .../YAGSL/real/controllerproperties.json | 8 ++++++ .../deploy/YAGSL/real/modules/backleft.json | 26 +++++++++++++++++++ .../deploy/YAGSL/real/modules/backright.json | 26 +++++++++++++++++++ .../deploy/YAGSL/real/modules/frontleft.json | 26 +++++++++++++++++++ .../deploy/YAGSL/real/modules/frontright.json | 26 +++++++++++++++++++ .../real/modules/physicalproperties.json | 23 ++++++++++++++++ .../YAGSL/real/modules/pidfproperties.json | 16 ++++++++++++ src/main/deploy/YAGSL/real/swervedrive.json | 15 +++++++++++ src/main/java/frc/robot/RobotContainer.java | 6 ++--- .../java/frc/robot/constants/Constants.java | 6 +++-- ...nts2026.java => ConstantsPushbot2026.java} | 6 ++--- .../robot/constants/ConstantsReal2026.java | 5 ++++ .../robot/constants/ConstantsTestbed2026.java | 18 ++++++------- 21 files changed, 190 insertions(+), 17 deletions(-) rename src/main/deploy/YAGSL/{ => pushbot}/controllerproperties.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/backleft.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/backright.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/frontleft.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/frontright.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/physicalproperties.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/modules/pidfproperties.json (100%) rename src/main/deploy/YAGSL/{ => pushbot}/swervedrive.json (100%) create mode 100644 src/main/deploy/YAGSL/real/controllerproperties.json create mode 100644 src/main/deploy/YAGSL/real/modules/backleft.json create mode 100644 src/main/deploy/YAGSL/real/modules/backright.json create mode 100644 src/main/deploy/YAGSL/real/modules/frontleft.json create mode 100644 src/main/deploy/YAGSL/real/modules/frontright.json create mode 100644 src/main/deploy/YAGSL/real/modules/physicalproperties.json create mode 100644 src/main/deploy/YAGSL/real/modules/pidfproperties.json create mode 100644 src/main/deploy/YAGSL/real/swervedrive.json rename src/main/java/frc/robot/constants/{Constants2026.java => ConstantsPushbot2026.java} (82%) create mode 100644 src/main/java/frc/robot/constants/ConstantsReal2026.java diff --git a/src/main/deploy/YAGSL/controllerproperties.json b/src/main/deploy/YAGSL/pushbot/controllerproperties.json similarity index 100% rename from src/main/deploy/YAGSL/controllerproperties.json rename to src/main/deploy/YAGSL/pushbot/controllerproperties.json diff --git a/src/main/deploy/YAGSL/modules/backleft.json b/src/main/deploy/YAGSL/pushbot/modules/backleft.json similarity index 100% rename from src/main/deploy/YAGSL/modules/backleft.json rename to src/main/deploy/YAGSL/pushbot/modules/backleft.json diff --git a/src/main/deploy/YAGSL/modules/backright.json b/src/main/deploy/YAGSL/pushbot/modules/backright.json similarity index 100% rename from src/main/deploy/YAGSL/modules/backright.json rename to src/main/deploy/YAGSL/pushbot/modules/backright.json diff --git a/src/main/deploy/YAGSL/modules/frontleft.json b/src/main/deploy/YAGSL/pushbot/modules/frontleft.json similarity index 100% rename from src/main/deploy/YAGSL/modules/frontleft.json rename to src/main/deploy/YAGSL/pushbot/modules/frontleft.json diff --git a/src/main/deploy/YAGSL/modules/frontright.json b/src/main/deploy/YAGSL/pushbot/modules/frontright.json similarity index 100% rename from src/main/deploy/YAGSL/modules/frontright.json rename to src/main/deploy/YAGSL/pushbot/modules/frontright.json diff --git a/src/main/deploy/YAGSL/modules/physicalproperties.json b/src/main/deploy/YAGSL/pushbot/modules/physicalproperties.json similarity index 100% rename from src/main/deploy/YAGSL/modules/physicalproperties.json rename to src/main/deploy/YAGSL/pushbot/modules/physicalproperties.json diff --git a/src/main/deploy/YAGSL/modules/pidfproperties.json b/src/main/deploy/YAGSL/pushbot/modules/pidfproperties.json similarity index 100% rename from src/main/deploy/YAGSL/modules/pidfproperties.json rename to src/main/deploy/YAGSL/pushbot/modules/pidfproperties.json diff --git a/src/main/deploy/YAGSL/swervedrive.json b/src/main/deploy/YAGSL/pushbot/swervedrive.json similarity index 100% rename from src/main/deploy/YAGSL/swervedrive.json rename to src/main/deploy/YAGSL/pushbot/swervedrive.json diff --git a/src/main/deploy/YAGSL/real/controllerproperties.json b/src/main/deploy/YAGSL/real/controllerproperties.json new file mode 100644 index 00000000..669097e7 --- /dev/null +++ b/src/main/deploy/YAGSL/real/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/YAGSL/real/modules/backleft.json b/src/main/deploy/YAGSL/real/modules/backleft.json new file mode 100644 index 00000000..c0bdcade --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/backleft.json @@ -0,0 +1,26 @@ +{ + "drive": { + "type": "sparkmax_neo", + "id": 51, + "canbus": null + }, + "angle": { + "type": "sparkmax_neo", + "id": 49, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 14, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderOffset": -46.143, + "location": { + "front": -12, + "left": 12 + } +} \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/backright.json b/src/main/deploy/YAGSL/real/modules/backright.json new file mode 100644 index 00000000..3d89716c --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/backright.json @@ -0,0 +1,26 @@ +{ + "drive": { + "type": "sparkmax_neo", + "id": 31, + "canbus": null + }, + "angle": { + "type": "sparkmax_neo", + "id": 43, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 13, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderOffset": 107.22, + "location": { + "front": -12, + "left": -12 + } +} \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/frontleft.json b/src/main/deploy/YAGSL/real/modules/frontleft.json new file mode 100644 index 00000000..d6e8e950 --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/frontleft.json @@ -0,0 +1,26 @@ +{ + "drive": { + "type": "sparkmax_neo", + "id": 56, + "canbus": null + }, + "angle": { + "type": "sparkmax_neo", + "id": 55, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 11, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderOffset": 158.730, + "location": { + "front": 12, + "left": 12 + } +} \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/frontright.json b/src/main/deploy/YAGSL/real/modules/frontright.json new file mode 100644 index 00000000..49cb323c --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/frontright.json @@ -0,0 +1,26 @@ +{ + "drive": { + "type": "sparkmax_neo", + "id": 34, + "canbus": null + }, + "angle": { + "type": "sparkmax_neo", + "id": 46, + "canbus": null + }, + "encoder": { + "type": "cancoder", + "id": 12, + "canbus": null + }, + "inverted": { + "drive": true, + "angle": true + }, + "absoluteEncoderOffset": -36.211, + "location": { + "front": 12, + "left": -12 + } +} \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/physicalproperties.json b/src/main/deploy/YAGSL/real/modules/physicalproperties.json new file mode 100644 index 00000000..c0606903 --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/physicalproperties.json @@ -0,0 +1,23 @@ +{ + "conversionFactors": { + "angle": { + "gearRatio": 21.4285, + "factor": 0 + }, + "drive": { + "gearRatio": 8.14, + "diameter": 4, + "factor": 0 + } + }, + "currentLimit": { + "drive": 40, + "angle": 20 + }, + "rampRate": { + "drive": 0.25, + "angle": 0.25 + }, + "wheelGripCoefficientOfFriction": 1.19, + "optimalVoltage": 12 +} \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/pidfproperties.json b/src/main/deploy/YAGSL/real/modules/pidfproperties.json new file mode 100644 index 00000000..1f0b34bd --- /dev/null +++ b/src/main/deploy/YAGSL/real/modules/pidfproperties.json @@ -0,0 +1,16 @@ +{ + "drive": { + "p": 0.00023, + "i": 0.0000002, + "d": 1, + "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/YAGSL/real/swervedrive.json b/src/main/deploy/YAGSL/real/swervedrive.json new file mode 100644 index 00000000..62e3561b --- /dev/null +++ b/src/main/deploy/YAGSL/real/swervedrive.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/swervedrive_schema.json", + "imu": { + "type": "navx_spi", + "id": 0, + "canbus": null + }, + "invertedIMU": false, + "modules": [ + "frontleft.json", + "frontright.json", + "backleft.json", + "backright.json" + ] +} \ No newline at end of file diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 0be04330..0480ee92 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -109,7 +109,7 @@ public RobotContainer() { gyroSubsystem = new GyroSubsystem(gyroIo); SwerveIMU swerveIMU = new ThreadedGyroSwerveIMU(threadedGyro); - drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL"), swerveIMU) : null; + drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), swerveIMU) : null; } case REPLAY -> { //rollerSubsystem = new RollerSubsystem(RollerSubsystem.createMockIo()); @@ -123,7 +123,7 @@ public RobotContainer() { shooterSubsystem = new ShooterSubsystem(ShooterSubsystem.createMockIo()); // No GyroSubsystem in REPLAY for now // create the drive subsystem with null gyro (use default json) - drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL"), null) : null; + drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), null) : null; } case SIM -> { robotVisualizer = new RobotVisualizer(); @@ -138,7 +138,7 @@ public RobotContainer() { shooterSubsystem = new ShooterSubsystem(ShooterSubsystem.createSimIo(robotVisualizer)); // No GyroSubsystem in REPLAY for now // create the drive subsystem with null gyro (use default json) - drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL"), null) : null; + drivebase = !Constants.TESTBED ? new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), null) : null; } default -> { diff --git a/src/main/java/frc/robot/constants/Constants.java b/src/main/java/frc/robot/constants/Constants.java index 40168f6a..5797b3e7 100644 --- a/src/main/java/frc/robot/constants/Constants.java +++ b/src/main/java/frc/robot/constants/Constants.java @@ -13,5 +13,7 @@ * constants are needed, to reduce verbosity. */ -public class Constants extends Constants2026 {} - +public class Constants extends ConstantsPushbot2026 { +// public class Constants extends ConstantsReal2026 { +// public class Constants extends ConstantsTestbed2026 { +} \ No newline at end of file diff --git a/src/main/java/frc/robot/constants/Constants2026.java b/src/main/java/frc/robot/constants/ConstantsPushbot2026.java similarity index 82% rename from src/main/java/frc/robot/constants/Constants2026.java rename to src/main/java/frc/robot/constants/ConstantsPushbot2026.java index fb296b6d..b3f39c05 100644 --- a/src/main/java/frc/robot/constants/Constants2026.java +++ b/src/main/java/frc/robot/constants/ConstantsPushbot2026.java @@ -1,8 +1,8 @@ package frc.robot.constants; -public class Constants2026 extends GameConstants { +public class ConstantsPushbot2026 extends GameConstants { - // Constants2026 is only for CANIDs and nothing else, everything else goes into GameConstants. + // ConstantsPushbot2026 is only for CANIDs and nothing else, everything else goes into GameConstants. public static final int ROLLER_MOTOR_ID = 1; public static final int TILT_MOTOR_ID = 2; @@ -31,6 +31,6 @@ public class Constants2026 extends GameConstants { public static final int SERVER_SOCKET_ATTEMPT_DELAY = 100; public static final int TCP_SERVER_PORT = 5806; - + public static final String JSON_DIRECTORY = "pushbot"; } diff --git a/src/main/java/frc/robot/constants/ConstantsReal2026.java b/src/main/java/frc/robot/constants/ConstantsReal2026.java new file mode 100644 index 00000000..7a2d89a7 --- /dev/null +++ b/src/main/java/frc/robot/constants/ConstantsReal2026.java @@ -0,0 +1,5 @@ +package frc.robot.constants; + +public class ConstantsReal2026 extends GameConstants { + public static final String JSON_DIRECTORY = "real"; +} diff --git a/src/main/java/frc/robot/constants/ConstantsTestbed2026.java b/src/main/java/frc/robot/constants/ConstantsTestbed2026.java index 8fb98737..3865b566 100644 --- a/src/main/java/frc/robot/constants/ConstantsTestbed2026.java +++ b/src/main/java/frc/robot/constants/ConstantsTestbed2026.java @@ -1,19 +1,19 @@ package frc.robot.constants; -public class ConstantsTestbed2026 extends Constants2026 { +/** + * To use the TestBed constants, change Constants.java to read: {@code public class Constants extends + * ConstantsTestbed2026} + * + *

instead of: {@code public class Constants extends ConstantsPushbot2026} + * + *

Then revert changes to Constants.java and ConstantsTestBed.java before committing. + */ +public class ConstantsTestbed2026 extends ConstantsPushbot2026 { // public static final int ROLLER_MOTOR_ID = 40; // public static final int TILT_MOTOR_ID = 42; //Intake motor id (43) isn't real // public static final int HOPPER_MOTOR_ID = 43; - /** - * To use the TestBed constants, change Constants.java to read: public class Constants extends - * ConstantsTestbedClean2025 - * - *

instead of: public class Constants extends Constants2025 - * - *

Then revert changes to Constants.java and ConstantsTestBed.java before committing. - */ /** * This an example of overriding a specific motor ID for testing, no changes to this file should From 0383cd13bc001b9c4fd0158bfa7720c01a16bd31 Mon Sep 17 00:00:00 2001 From: Raayed Mohammed Date: Tue, 17 Feb 2026 11:17:23 -0500 Subject: [PATCH 2/6] adding canid constants --- .../java/frc/robot/constants/ConstantsReal2026.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/frc/robot/constants/ConstantsReal2026.java b/src/main/java/frc/robot/constants/ConstantsReal2026.java index 7a2d89a7..3c8d30ea 100644 --- a/src/main/java/frc/robot/constants/ConstantsReal2026.java +++ b/src/main/java/frc/robot/constants/ConstantsReal2026.java @@ -2,4 +2,15 @@ public class ConstantsReal2026 extends GameConstants { public static final String JSON_DIRECTORY = "real"; + + public static final int SHOOTER_MOTOR_ID = 53; + public static final int SHOOTER_FOLLOWER_MOTOR_ID = 54; + public static final int ANGLER_MOTOR_ID = 11; + public static final int TURRET_MOTOR_ID = 1; + public static final int FEEDER_MOTOR_ID = 2; + public static final int HOPPER_MOTOR_ID = 3; + public static final int INTAKE_MOTOR_ID = 4; + public static final int INTAKE_DEPLOY_MOTOR_ID = 5; + public static final int CLIMBER_MOTOR_ID = 6; + } From be76e32f8e124aed2a09737bf47a3be6e47e623f Mon Sep 17 00:00:00 2001 From: Raayed Mohammed Date: Tue, 17 Feb 2026 11:33:41 -0500 Subject: [PATCH 3/6] Changed the name of one constant --- src/main/java/frc/robot/constants/ConstantsReal2026.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/constants/ConstantsReal2026.java b/src/main/java/frc/robot/constants/ConstantsReal2026.java index 3c8d30ea..627971ac 100644 --- a/src/main/java/frc/robot/constants/ConstantsReal2026.java +++ b/src/main/java/frc/robot/constants/ConstantsReal2026.java @@ -1,16 +1,20 @@ package frc.robot.constants; -public class ConstantsReal2026 extends GameConstants { +public class ConstantsReal2026 extends ConstantsPushbot2026 { + public static final String JSON_DIRECTORY = "real"; + // shooter related public static final int SHOOTER_MOTOR_ID = 53; public static final int SHOOTER_FOLLOWER_MOTOR_ID = 54; public static final int ANGLER_MOTOR_ID = 11; + + // other CAN-ID's public static final int TURRET_MOTOR_ID = 1; public static final int FEEDER_MOTOR_ID = 2; public static final int HOPPER_MOTOR_ID = 3; public static final int INTAKE_MOTOR_ID = 4; - public static final int INTAKE_DEPLOY_MOTOR_ID = 5; + public static final int INTAKE_DEPLOYMENT_ID = 5; public static final int CLIMBER_MOTOR_ID = 6; } From ebb4f860280b622f72c6852ef3547a19d3f2023f Mon Sep 17 00:00:00 2001 From: Jackson Wess Date: Tue, 17 Feb 2026 11:34:53 -0500 Subject: [PATCH 4/6] Added Real swervedrive JSON files --- .../deploy/YAGSL/real/modules/backleft.json | 21 ++++++++++--------- .../deploy/YAGSL/real/modules/backright.json | 21 ++++++++++--------- .../deploy/YAGSL/real/modules/frontleft.json | 21 ++++++++++--------- .../deploy/YAGSL/real/modules/frontright.json | 21 ++++++++++--------- .../real/modules/physicalproperties.json | 19 +++++++++-------- .../YAGSL/real/modules/pidfproperties.json | 8 +++---- src/main/deploy/YAGSL/real/swervedrive.json | 1 - 7 files changed, 58 insertions(+), 54 deletions(-) diff --git a/src/main/deploy/YAGSL/real/modules/backleft.json b/src/main/deploy/YAGSL/real/modules/backleft.json index c0bdcade..355e4ec8 100644 --- a/src/main/deploy/YAGSL/real/modules/backleft.json +++ b/src/main/deploy/YAGSL/real/modules/backleft.json @@ -1,26 +1,27 @@ { + "location": { + "front": -9, + "left": 9 + }, + "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax_neo", - "id": 51, + "id": 58, "canbus": null }, "angle": { "type": "sparkmax_neo", - "id": 49, + "id": 28, "canbus": null }, "encoder": { "type": "cancoder", - "id": 14, + "id": 0, "canbus": null }, "inverted": { - "drive": true, - "angle": true + "drive": false, + "angle": false }, - "absoluteEncoderOffset": -46.143, - "location": { - "front": -12, - "left": 12 - } + "absoluteEncoderInverted": false } \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/backright.json b/src/main/deploy/YAGSL/real/modules/backright.json index 3d89716c..15eda212 100644 --- a/src/main/deploy/YAGSL/real/modules/backright.json +++ b/src/main/deploy/YAGSL/real/modules/backright.json @@ -1,26 +1,27 @@ { + "location": { + "front": -9, + "left": -9 + }, + "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax_neo", - "id": 31, + "id": 59, "canbus": null }, "angle": { "type": "sparkmax_neo", - "id": 43, + "id": 29, "canbus": null }, "encoder": { "type": "cancoder", - "id": 13, + "id": 0, "canbus": null }, "inverted": { - "drive": true, - "angle": true + "drive": false, + "angle": false }, - "absoluteEncoderOffset": 107.22, - "location": { - "front": -12, - "left": -12 - } + "absoluteEncoderInverted": false } \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/frontleft.json b/src/main/deploy/YAGSL/real/modules/frontleft.json index d6e8e950..4db82ebd 100644 --- a/src/main/deploy/YAGSL/real/modules/frontleft.json +++ b/src/main/deploy/YAGSL/real/modules/frontleft.json @@ -1,26 +1,27 @@ { + "location": { + "front": 9, + "left": 9 + }, + "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax_neo", - "id": 56, + "id": 57, "canbus": null }, "angle": { "type": "sparkmax_neo", - "id": 55, + "id": 27, "canbus": null }, "encoder": { "type": "cancoder", - "id": 11, + "id": 0, "canbus": null }, "inverted": { - "drive": true, - "angle": true + "drive": false, + "angle": false }, - "absoluteEncoderOffset": 158.730, - "location": { - "front": 12, - "left": 12 - } + "absoluteEncoderInverted": false } \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/frontright.json b/src/main/deploy/YAGSL/real/modules/frontright.json index 49cb323c..0f459a53 100644 --- a/src/main/deploy/YAGSL/real/modules/frontright.json +++ b/src/main/deploy/YAGSL/real/modules/frontright.json @@ -1,26 +1,27 @@ { + "location": { + "front": 9, + "left": -9 + }, + "absoluteEncoderOffset": 0, "drive": { "type": "sparkmax_neo", - "id": 34, + "id": 60, "canbus": null }, "angle": { "type": "sparkmax_neo", - "id": 46, + "id": 30, "canbus": null }, "encoder": { "type": "cancoder", - "id": 12, + "id": 0, "canbus": null }, "inverted": { - "drive": true, - "angle": true + "drive": false, + "angle": false }, - "absoluteEncoderOffset": -36.211, - "location": { - "front": 12, - "left": -12 - } + "absoluteEncoderInverted": false } \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/physicalproperties.json b/src/main/deploy/YAGSL/real/modules/physicalproperties.json index c0606903..66d5a84c 100644 --- a/src/main/deploy/YAGSL/real/modules/physicalproperties.json +++ b/src/main/deploy/YAGSL/real/modules/physicalproperties.json @@ -1,23 +1,24 @@ { + "optimalVoltage": 12, + "robotMass": 137, + "wheelGripCoefficientOfFriction": 1.19, + "currentLimit": { + "drive": 40, + "angle": 20 + }, "conversionFactors": { "angle": { - "gearRatio": 21.4285, + "gearRatio": 12.8, "factor": 0 }, "drive": { - "gearRatio": 8.14, "diameter": 4, + "gearRatio": 6.75, "factor": 0 } }, - "currentLimit": { - "drive": 40, - "angle": 20 - }, "rampRate": { "drive": 0.25, "angle": 0.25 - }, - "wheelGripCoefficientOfFriction": 1.19, - "optimalVoltage": 12 + } } \ No newline at end of file diff --git a/src/main/deploy/YAGSL/real/modules/pidfproperties.json b/src/main/deploy/YAGSL/real/modules/pidfproperties.json index 1f0b34bd..3834a362 100644 --- a/src/main/deploy/YAGSL/real/modules/pidfproperties.json +++ b/src/main/deploy/YAGSL/real/modules/pidfproperties.json @@ -1,13 +1,13 @@ { "drive": { - "p": 0.00023, - "i": 0.0000002, - "d": 1, + "p": 0.0020645, + "i": 0, + "d": 0, "f": 0, "iz": 0 }, "angle": { - "p": 0.01, + "p": 0.0020645, "i": 0, "d": 0, "f": 0, diff --git a/src/main/deploy/YAGSL/real/swervedrive.json b/src/main/deploy/YAGSL/real/swervedrive.json index 62e3561b..da972747 100644 --- a/src/main/deploy/YAGSL/real/swervedrive.json +++ b/src/main/deploy/YAGSL/real/swervedrive.json @@ -1,5 +1,4 @@ { - "$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/swervedrive_schema.json", "imu": { "type": "navx_spi", "id": 0, From 84bd9c75c8e2705d97773c10fae891d84129a073 Mon Sep 17 00:00:00 2001 From: Raayed Mohammed Date: Tue, 17 Feb 2026 12:16:34 -0500 Subject: [PATCH 5/6] Added back code that disappeared when sloving merge conflicts. --- src/main/java/frc/robot/RobotContainer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 21bd6816..2c4936e1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -119,7 +119,7 @@ public RobotContainer() { SwerveIMU swerveIMU = new ThreadedGyroSwerveIMU(threadedGyro); drivebase = !Constants.TESTBED ? new SwerveSubsystem( - new File(Filesystem.getDeployDirectory(), "YAGSL"), swerveIMU) : null; + new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), swerveIMU) : null; } case REPLAY -> { // rollerSubsystem = new RollerSubsystem(RollerSubsystem.createMockIo()); @@ -136,7 +136,7 @@ public RobotContainer() { // No GyroSubsystem in REPLAY for now // create the drive subsystem with null gyro (use default json) drivebase = !Constants.TESTBED ? new SwerveSubsystem( - new File(Filesystem.getDeployDirectory(), "YAGSL"), null) : null; + new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), null) : null; } case SIM -> { robotVisualizer = new RobotVisualizer(); @@ -157,7 +157,7 @@ public RobotContainer() { // No GyroSubsystem in REPLAY for now // create the drive subsystem with null gyro (use default json) drivebase = !Constants.TESTBED ? new SwerveSubsystem( - new File(Filesystem.getDeployDirectory(), "YAGSL"), null) : null; + new File(Filesystem.getDeployDirectory(), "YAGSL/" + Constants.JSON_DIRECTORY), null) : null; } default -> { From cd048d90e04ad762cbd1fc4ce8efe827b9312204 Mon Sep 17 00:00:00 2001 From: Raayed Mohammed Date: Tue, 17 Feb 2026 12:47:39 -0500 Subject: [PATCH 6/6] added comment --- src/main/java/frc/robot/constants/Constants.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/frc/robot/constants/Constants.java b/src/main/java/frc/robot/constants/Constants.java index 01fde93e..51da79d0 100644 --- a/src/main/java/frc/robot/constants/Constants.java +++ b/src/main/java/frc/robot/constants/Constants.java @@ -14,6 +14,9 @@ * constants are needed, to reduce verbosity. */ + +// To use the other constatns files, change which line is not commented out here. +// Then discard changes to this file before committing. public class Constants extends ConstantsPushbot2026 { // public class Constants extends ConstantsReal2026 { // public class Constants extends ConstantsTestbed2026 {