diff --git a/src/main/deploy/pathplanner/autos/New Auto.auto b/src/main/deploy/pathplanner/autos/New Auto.auto new file mode 100644 index 0000000..440a1ea --- /dev/null +++ b/src/main/deploy/pathplanner/autos/New Auto.auto @@ -0,0 +1,12 @@ +{ + "version": "2025.0", + "command": { + "type": "sequential", + "data": { + "commands": [] + } + }, + "resetOdom": true, + "folder": null, + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Line.path b/src/main/deploy/pathplanner/paths/Line.path index d632b3d..8726d5c 100644 --- a/src/main/deploy/pathplanner/paths/Line.path +++ b/src/main/deploy/pathplanner/paths/Line.path @@ -12,7 +12,7 @@ "y": 4.61077032810271 }, "isLocked": false, - "linkedName": "StartingPointRed1" + "linkedName": null }, { "anchor": { diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index f5071cd..67e1dfb 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -53,7 +53,7 @@ public class RobotContainer { private final DriveControls driveControls = new DriveControls(drivetrain, controller,robotStatusManager ); private final ShooterControls shooterControls = new ShooterControls(shooterSubsystem, controller,robotStatusManager); - + private final ClimberControls climberControls = new ClimberControls(climberSubsystem, controller); private final DriveGainsTuner driveGainsTuner = new DriveGainsTuner(drivetrain); private ConfigTalonFXMotorTuner configFlywheelTuner = new ConfigTalonFXMotorTuner(shooterSubsystem.flywheelMotorLeft, "flywheel", Constants.Shooter.flyWheelSlot0Configs); private ConfigTalonFXMotorTuner configConveyorTuner = new ConfigTalonFXMotorTuner(shooterSubsystem.conveyorMotor, "conveyor", Constants.Shooter.conveyorSlot0Configs); diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 6ed5a32..dd7af49 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -116,6 +116,9 @@ public class ShooterSubsystem extends SubsystemBase { double pidOutput = backboardPID.calculate(getBackboardPosition()); pidOutput = Math.max(-Constants.Shooter.backboardSpeedMax, Math.min(Constants.Shooter.backboardSpeedMax, pidOutput)); // 限制输出范围 shooterNetworkTable.getEntry("backboardPIDOutput").setDouble(pidOutput); + if (Math.abs(pidOutput) < 0.8) { + pidOutput = 0.0; + }//防止抖动 // // 设置背板电机的速度,根据PID输出进行调整 setBackboardSpeedByRPS(pidOutput); }