changement

This commit is contained in:
Samuel
2025-12-12 11:08:36 -05:00
parent ca694c12d8
commit efd3f23fa2
3 changed files with 7 additions and 10 deletions

View File

@@ -1,4 +1,9 @@
{ {
"Joysticks": {
"window": {
"visible": false
}
},
"System Joysticks": { "System Joysticks": {
"window": { "window": {
"enabled": false "enabled": false

View File

@@ -54,7 +54,7 @@ public class Bougie extends SubsystemBase {
if(led==15){ if(led==15){
x=true; x=true;
System.out.println("false"); System.out.println("false");
}} }}
// candle.setLEDs(255, 0, 0,0,24,8); // candle.setLEDs(255, 0, 0,0,24,8);
// candle.setLEDs(255, 0, 0,0,40,8); // candle.setLEDs(255, 0, 0,0,40,8);
// candle.setLEDs(255, 0, 0,0,56,8); // candle.setLEDs(255, 0, 0,0,56,8);

View File

@@ -11,7 +11,6 @@ import com.pathplanner.lib.config.PIDConstants;
import com.pathplanner.lib.config.RobotConfig; import com.pathplanner.lib.config.RobotConfig;
import com.pathplanner.lib.controllers.PPHolonomicDriveController; import com.pathplanner.lib.controllers.PPHolonomicDriveController;
import edu.wpi.first.math.Matrix; import edu.wpi.first.math.Matrix;
import edu.wpi.first.math.estimator.SwerveDrivePoseEstimator;
import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.kinematics.SwerveDriveOdometry; import edu.wpi.first.math.kinematics.SwerveDriveOdometry;
@@ -34,7 +33,6 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
private static final double kSimLoopPeriod = 0.005; // 5 ms private static final double kSimLoopPeriod = 0.005; // 5 ms
private Notifier m_simNotifier = null; private Notifier m_simNotifier = null;
private double m_lastSimTime; private double m_lastSimTime;
private Pigeon2 pigeon2 = new Pigeon2(13);
/* Blue alliance sees forward as 0 degrees (toward red alliance wall) */ /* Blue alliance sees forward as 0 degrees (toward red alliance wall) */
private static final Rotation2d kBlueAlliancePerspectiveRotation = Rotation2d.kZero; private static final Rotation2d kBlueAlliancePerspectiveRotation = Rotation2d.kZero;
/* Red alliance sees forward as 180 degrees (toward blue alliance wall) */ /* Red alliance sees forward as 180 degrees (toward blue alliance wall) */
@@ -42,17 +40,11 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
/* Keep track if we've ever applied the operator perspective before or not */ /* Keep track if we've ever applied the operator perspective before or not */
private boolean m_hasAppliedOperatorPerspective = false; private boolean m_hasAppliedOperatorPerspective = false;
private SwerveDriveOdometry odometry; private SwerveDriveOdometry odometry;
private SwerveDrivePoseEstimator poseEstimator;
private final SwerveRequest.ApplyRobotSpeeds m_pathApplyRobotSpeeds = new SwerveRequest.ApplyRobotSpeeds(); private final SwerveRequest.ApplyRobotSpeeds m_pathApplyRobotSpeeds = new SwerveRequest.ApplyRobotSpeeds();
/* SysId routine for characterizing translation. This is used to find PID gains for the drive motors. */
private final SwerveRequest.SysIdSwerveTranslation m_translationCharacterization = new SwerveRequest.SysIdSwerveTranslation();
private final SwerveRequest.SysIdSwerveSteerGains m_steerCharacterization = new SwerveRequest.SysIdSwerveSteerGains();
private final SwerveRequest.SysIdSwerveRotation m_rotationCharacterization = new SwerveRequest.SysIdSwerveRotation();
private void configureAutoBuilder() { private void configureAutoBuilder() {
try { try {
var config = RobotConfig.fromGUISettings(); RobotConfig config = RobotConfig.fromGUISettings();
AutoBuilder.configure( AutoBuilder.configure(
() -> getState().Pose, // Supplier of current robot pose () -> getState().Pose, // Supplier of current robot pose