From 1ac99d0df443e9aaf8609143adfecbd9504a64e0 Mon Sep 17 00:00:00 2001 From: caTrixLiu Date: Thu, 28 Nov 2024 12:09:51 +0800 Subject: [PATCH] upgraded path planner to latest --- build.gradle | 1 + .../robot/subsystems/drive/HolonomicDriveSubsystem.java | 3 +-- src/main/java/frc/robot/utils/AIRobotInSimulation.java | 7 +++---- vendordeps/PathplannerLib-beta.json | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index ea13af3..61f8cc8 100644 --- a/build.gradle +++ b/build.gradle @@ -67,6 +67,7 @@ repositories { password = "\u0067\u0068\u0070\u005f\u006e\u0056\u0051\u006a\u0055\u004f\u004c\u0061\u0079\u0066\u006e\u0078\u006e\u0037\u0051\u0049\u0054\u0042\u0032\u004c\u004a\u006d\u0055\u0070\u0073\u0031\u006d\u0037\u004c\u005a\u0030\u0076\u0062\u0070\u0063\u0051" } } + mavenLocal() } configurations.all { diff --git a/src/main/java/frc/robot/subsystems/drive/HolonomicDriveSubsystem.java b/src/main/java/frc/robot/subsystems/drive/HolonomicDriveSubsystem.java index 06ecf23..284544d 100644 --- a/src/main/java/frc/robot/subsystems/drive/HolonomicDriveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/drive/HolonomicDriveSubsystem.java @@ -132,8 +132,7 @@ default void configHolonomicPathPlannerAutoBuilder() { DriveTrainConstants.DRIVE_MOTOR.withReduction(DriveTrainConstants.DRIVE_GEAR_RATIO), DriveTrainConstants.DRIVE_CURRENT_LIMIT, 1), - DriveTrainConstants.TRACK_WIDTH, - DriveTrainConstants.TRACK_LENGTH), + DriveTrainConstants.MODULE_TRANSLATIONS), FieldMirroringUtils::isSidePresentedAsRed, this); Pathfinding.setPathfinder(new LocalADStarAK()); diff --git a/src/main/java/frc/robot/utils/AIRobotInSimulation.java b/src/main/java/frc/robot/utils/AIRobotInSimulation.java index 64085b0..09c5e3b 100644 --- a/src/main/java/frc/robot/utils/AIRobotInSimulation.java +++ b/src/main/java/frc/robot/utils/AIRobotInSimulation.java @@ -70,12 +70,11 @@ public class AIRobotInSimulation extends SubsystemBase { /* The PathPlanner configuration for the opponent robots. */ private static final RobotConfig PP_CONFIG = new RobotConfig( - 55, - 8, + Kilograms.of(55), + KilogramSquareMeters.of(6), new ModuleConfig( Units.inchesToMeters(2), 3.5, 1.2, DCMotor.getFalcon500(1).withReduction(8.14), 60, 1), - 0.6, - 0.6); + Meters.of(0.6)); private static final PPHolonomicDriveController driveController = new PPHolonomicDriveController(new PIDConstants(5.0, 0.02), new PIDConstants(7.0, 0.05)); diff --git a/vendordeps/PathplannerLib-beta.json b/vendordeps/PathplannerLib-beta.json index 8a53e68..e79fe1a 100644 --- a/vendordeps/PathplannerLib-beta.json +++ b/vendordeps/PathplannerLib-beta.json @@ -1,7 +1,7 @@ { "fileName": "PathplannerLib-beta.json", "name": "PathplannerLib", - "version": "2025.0.0-beta-3.1", + "version": "2025.0.0-beta-5", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2025", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2025.0.0-beta-3.1" + "version": "2025.0.0-beta-5" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2025.0.0-beta-3.1", + "version": "2025.0.0-beta-5", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false,