This commit is contained in:
Scott Jackson 2026-04-13 18:31:25 -04:00
commit fe41bbd735
11 changed files with 95 additions and 23 deletions

View File

@ -7,7 +7,7 @@
{
"type": "path",
"data": {
"pathName": "1.1 Hub to Shoot Path"
"pathName": "1.1 Hub to Shoot"
}
},
{

View File

@ -9,6 +9,12 @@
"data": {
"pathName": "9.1 Chaos Monkey Path"
}
},
{
"type": "named",
"data": {
"name": "Shoot preload"
}
}
]
}

View File

@ -33,8 +33,8 @@
"pointTowardsZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxVelocity": 1.5,
"maxAcceleration": 1.5,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
@ -42,13 +42,17 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0
"rotation": -177.9047474356738
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
<<<<<<< HEAD:src/main/deploy/pathplanner/paths/Hub to Depot.path
"rotation": -179.99999999992184
=======
"rotation": -179.69626968995792
>>>>>>> c2fa27aa5cc22124b930645e802b8176658edb7a:src/main/deploy/pathplanner/paths/1.1 Hub to Shoot Path.path
},
"useDefaultConstraints": true
"useDefaultConstraints": false
}

View File

@ -0,0 +1,54 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 3.5,
"y": 4.0
},
"prevControl": null,
"nextControl": {
"x": 2.75,
"y": 4.0
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.0,
"y": 4.0
},
"prevControl": {
"x": 2.75,
"y": 4.0
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 177.4888349270938
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
"rotation": -179.0393266954795
},
"useDefaultConstraints": true
}

View File

@ -33,16 +33,16 @@
"pointTowardsZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"maxVelocity": 1.5,
"maxAcceleration": 1.5,
"maxAngularVelocity": 100.0,
"maxAngularAcceleration": 100.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0
"rotation": -179.02897806892076
},
"reversed": false,
"folder": null,
@ -50,5 +50,5 @@
"velocity": 0,
"rotation": -179.69626968995792
},
"useDefaultConstraints": true
"useDefaultConstraints": false
}

View File

@ -82,10 +82,11 @@ public class RobotContainer {
// m_driverController:wa.a().whileTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem));
m_driverController.leftBumper().onTrue(Commands.runOnce(() -> turretSubsystem.homeTurret(), turretSubsystem));
m_driverController.rightBumper().onTrue(intakeSubsystem.intake());
m_driverController.rightBumper().onTrue(Commands.parallel(intakeSubsystem.intake()));
m_driverController.y().whileTrue(new RelayCommand(hopperSubsystem, turretSubsystem, intakeSubsystem));
m_driverController.start().whileTrue(intakeSubsystem.resetDeploy());
m_driverController.x().toggleOnTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem));
m_driverController.x().whileTrue(new AutoShootCommandChassisTurret(driveSubsystem, hopperSubsystem, turretSubsystem));
m_driverController.b().toggleOnTrue(new ZoneCheck(driveSubsystem));
}
/**

View File

@ -75,7 +75,7 @@ public class AutoShootCommandChassisTurret extends Command{
}
});
turretSubsystem.setLauncher(6000);
turretSubsystem.setLauncher(3000);
turretSubsystem.setTargetElevation(Constants.ShooterConstants.DEFLECTOR_STORED_ANGLE);
hopperSubsystem.spindexerOn();
cameraAutoCenterController.calculate(-100);

View File

@ -41,10 +41,13 @@ public class ZoneCheck extends Command {
switch (zone) {
case Blue:
System.out.println("BLUE");
break;
case Neutral:
System.out.println("NEUTRAL");
break;
case Red:
System.out.println("RED");
break;
default:
System.out.println("****");
}
@ -52,10 +55,13 @@ public class ZoneCheck extends Command {
switch (zone) {
case Blue:
System.out.println("BLUE");
break;
case Neutral:
System.out.println("NEUTRAL");
break;
case Red:
System.out.println("RED");
break;
default:
System.out.println("****");
}

View File

@ -165,8 +165,8 @@ public class DriveSubsystem extends TestableSubsystem {
driveSystem::getRobotRelativeSpeeds,
(speeds, feedforwards) -> driveSystem.setChassisSpeed(speeds, new Translation2d()),
new PPHolonomicDriveController(
new PIDConstants(1.5, 0, 0),
new PIDConstants(Math.PI / 2, 0, 0)),
new PIDConstants(3, 0, 0),
new PIDConstants(Math.PI, 0, 0)),
config,
() -> {
var alliance = DriverStation.getAlliance();

View File

@ -19,6 +19,7 @@ import com.ctre.phoenix6.hardware.TalonFX;
import edu.wpi.first.units.AngularVelocityUnit;
import edu.wpi.first.units.Units;
import edu.wpi.first.units.measure.AngularVelocity;
import edu.wpi.first.wpilibj2.command.Command;
import static org.fairportrobotics.frc.posty.assertions.Assertions.*;
import frc.robot.Constants;
@ -64,13 +65,13 @@ public class HopperSubsystem extends TestableSubsystem {
}
public void feedKicker() {
kickerMotor.setControl(kickerControl.withVelocity(1000));
// kickerMotor.set(0.75);
//kickerMotor.setControl(kickerControl.withVelocity(1000));
kickerMotor.set(0.75);
}
public void reverseKicker() {
kickerMotor.setControl(kickerControl.withVelocity(-500));
// kickerMotor.set(-0.5);
//kickerMotor.setControl(kickerControl.withVelocity(-500));
kickerMotor.set(-0.5);
}
public void stopKicker() {kickerMotor.stopMotor();}

View File

@ -110,8 +110,8 @@ public class TurretSubsystem extends TestableSubsystem {
SparkMaxConfig config = new SparkMaxConfig().apply((SparkMaxConfig) SparkMaxConfig.Presets.REV_NEO);
config.inverted(Constants.ShooterConstants.LAUNCHER_MOTOR_INVERTED);
config.voltageCompensation(10);
config.closedLoop.p(0.0001).i(0).d(0.0); // I = 0.0000001
config.closedLoop.feedForward.kS(0.2).kV(0.002).kA(0.00);
config.closedLoop.p(0.0002).i(0.000001).d(0.0005); // I = 0.0000001
config.closedLoop.feedForward.kS(0.2).kV(0.000).kA(0.000);
// config.closedLoop.allowedClosedLoopError(10, ClosedLoopSlot.kSlot0);
config.closedLoop.feedbackSensor(FeedbackSensor.kPrimaryEncoder);
config.closedLoop.positionWrappingEnabled(false);