This commit is contained in:
Antoine PerreaultE 2024-03-27 17:47:29 -04:00
parent 8fa6870997
commit 41eac85819

View File

@ -7,6 +7,7 @@ package frc.robot.subsystem;
import java.io.File;
import java.io.IOException;
import com.ctre.phoenix6.hardware.Pigeon2;
import com.kauailabs.navx.frc.AHRS;
import com.pathplanner.lib.auto.AutoBuilder;
import com.pathplanner.lib.util.HolonomicPathFollowerConfig;
@ -25,7 +26,8 @@ public class Drive extends SubsystemBase {
SwerveDrive swerveDrive;
File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(),"swerve");
public AHRS Gyro = new AHRS();
Pigeon2 Gyro = new Pigeon2(0);
public void drive(double x, double y, double zRotation){
swerveDrive.drive(new Translation2d(x*5, y*5), zRotation*4, true, false);