diff --git a/src/main/kotlin/frc/team449/subsystems/drive/DriveSubsystem.kt b/src/main/kotlin/frc/team449/subsystems/drive/DriveSubsystem.kt index f4ae8c6..c74898d 100644 --- a/src/main/kotlin/frc/team449/subsystems/drive/DriveSubsystem.kt +++ b/src/main/kotlin/frc/team449/subsystems/drive/DriveSubsystem.kt @@ -9,15 +9,16 @@ import edu.wpi.first.math.geometry.Translation2d import edu.wpi.first.math.kinematics.ChassisSpeeds import edu.wpi.first.wpilibj2.command.Subsystem + /** A drivetrain that uses closed-loop velocity control. */ interface DriveSubsystem : Subsystem { private val xController: PIDController get() = PIDController(10.0, 0.0, 0.0) private val yController: PIDController - get() = PIDController(10.0, 0.0, 0.0) + get()=PIDController(10.0, 0.0, 0.0) private val headingController: PIDController - get() = PIDController(7.5, 0.0, 0.0) + get()= PIDController(7.5, 0.0, 0.0) var heading: Rotation2d get() = Rotation2d(MathUtil.angleModulus(this.pose.rotation.radians)) @@ -27,12 +28,12 @@ interface DriveSubsystem : Subsystem { var pose: Pose2d - fun getPos(): Pose2d { - return Pose2d(pose.x, pose.y, heading) + fun getPose(): Pose2d { + return Pose2d(pose.x , pose.y , heading) } fun followTrajectory(sample: SwerveSample) { // Get the current pose of the robot - val pose: Pose2d = getPos() + val pose: Pose2d = getPose(); // Generate the next speeds for the robot val speeds: ChassisSpeeds = ChassisSpeeds( @@ -47,15 +48,12 @@ interface DriveSubsystem : Subsystem { fun driveFieldRelative(speeds: ChassisSpeeds) - /** Sets the drivetrain's desired speeds. */ - fun set(desiredSpeeds: ChassisSpeeds){ - } + /** Sets the drivetrain's desired speeds. */ + fun set(desiredSpeeds: ChassisSpeeds) /** Sets all the robot's drive motors to 0. */ - fun stop(){ - - } + fun stop() /** * Used to simulate a drivetrain. Only one instance of this class should be made per drivetrain. diff --git a/src/main/kotlin/frc/team449/subsystems/drive/differential/DifferentialDrive.kt b/src/main/kotlin/frc/team449/subsystems/drive/differential/DifferentialDrive.kt index 65978b4..5dbec4d 100644 --- a/src/main/kotlin/frc/team449/subsystems/drive/differential/DifferentialDrive.kt +++ b/src/main/kotlin/frc/team449/subsystems/drive/differential/DifferentialDrive.kt @@ -105,10 +105,6 @@ open class DifferentialDrive( this.poseEstimator.resetPosition(ahrs.heading, leftEncoder.position, rightEncoder.position, pose) } - override fun driveFieldRelative(speeds: ChassisSpeeds) { - TODO("Not yet implemented") - } - override fun stop() { this.set(ChassisSpeeds(0.0, 0.0, 0.0)) } diff --git a/vendordeps/ChoreoLib2025.json b/vendordeps/ChoreoLib2025.json deleted file mode 100644 index 16de3a6..0000000 --- a/vendordeps/ChoreoLib2025.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "fileName": "ChoreoLib2025.json", - "name": "ChoreoLib", - "version": "2025.0.0", - "uuid": "b5e23f0a-dac9-4ad2-8dd6-02767c520aca", - "frcYear": "2025", - "mavenUrls": [ - "https://lib.choreo.autos/dep", - "https://repo1.maven.org/maven2" - ], - "jsonUrl": "https://lib.choreo.autos/dep/ChoreoLib2025.json", - "javaDependencies": [ - { - "groupId": "choreo", - "artifactId": "ChoreoLib-java", - "version": "2025.0.0" - }, - { - "groupId": "com.google.code.gson", - "artifactId": "gson", - "version": "2.11.0" - } - ], - "jniDependencies": [], - "cppDependencies": [ - { - "groupId": "choreo", - "artifactId": "ChoreoLib-cpp", - "version": "2025.0.0", - "libName": "ChoreoLib", - "headerClassifier": "headers", - "sharedLibrary": false, - "skipInvalidPlatforms": true, - "binaryPlatforms": [ - "windowsx86-64", - "linuxx86-64", - "osxuniversal", - "linuxathena", - "linuxarm32", - "linuxarm64" - ] - } - ] -}