Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practice field4 3 #128

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"x": 0.7607347530216694,
"y": 4.480646518544946
},
"rotation": 121.7
"rotation": 116.0
},
"command": {
"type": "sequential",
Expand Down
12 changes: 6 additions & 6 deletions src/main/deploy/pathplanner/paths/Blue4AutoPickupSourceSide.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
{
"anchor": {
"x": 7.156417275797516,
"y": 1.7934317350116178
"x": 6.9848151084202525,
"y": 2.113187808819271
},
"prevControl": {
"x": 6.046263311717348,
"y": 1.3552130649799718
"x": 5.8746611443400845,
"y": 1.674969138787625
},
"nextControl": null,
"isLocked": false,
Expand All @@ -31,7 +31,7 @@
"rotationTargets": [
{
"waypointRelativePos": 0.6,
"rotationDegrees": -157.01,
"rotationDegrees": -168.42994609958126,
"rotateFast": true
}
],
Expand All @@ -45,7 +45,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": -159.86,
"rotation": -165.06858282186255,
"rotateFast": false
},
"reversed": false,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ private void configureBindings() {
new WaitCommand(0.5),
new InstantCommand(()->intake.setNoteHeld(false))
);
SmartDashboard.putNumber("Indexer Amp Speed", shooterAmpSpeed);
SmartDashboard.putNumber("Indexer Amp Speed", indexerAmpSpeed);
SequentialCommandGroup orbitAmpShot = new SequentialCommandGroup(
new InstantCommand(()->shooter.shootWithSupplier(()->SmartDashboard.getNumber("amp RPS", shooterAmpSpeed), true), shooter),
new MoveMeters(driveTrain, 0.015, 0.5, 0, 0),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/CollectNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void execute() {
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
drivetrain.pointWheelsInward();
// drivetrain.pointWheelsInward();
runsInvalid = 0;
closeNote = false;
}
Expand Down
30 changes: 18 additions & 12 deletions src/main/java/frc/robot/settings/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,29 +455,35 @@ public final class PS4Operator{
public final class Field{

public static final double ROBOT_CENTER_TO_BUMBER = 0.419;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_X = 2.79;//NOT fOUND
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_Y = 4.33; //NOT FOUND
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_X = 13.99;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_Y = 3.99;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_X = 2.48;//NOT fOUND
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_Y = 4.89; //NOT FOUND
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_X = 14.11;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_Y = 4.02;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_X = AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_X-ROBOT_CENTER_TO_BUMBER;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_RED_Y = AMP_SIDE_OUTER_TAPE_CORNER_RED_ROBOT_Y+ROBOT_CENTER_TO_BUMBER;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_X = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_X+ROBOT_CENTER_TO_BUMBER;
public static final double AMP_SIDE_OUTER_TAPE_CORNER_BLUE_Y = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_ROBOT_Y-ROBOT_CENTER_TO_BUMBER;

public static final double ROBOT_BLUE_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_X-3;
public static final double ROBOT_RED_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_RED_X+3;//16.38;//16.87; changed so that shots from the side wil aim to the opposite side, and bank in
public static final double SHOOTER_BLUE_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_X-3.213;//16.38;//16.87; changed so that shots from the side wil aim to the opposite side, and bank in
public static final double SHOOTER_RED_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_RED_X+3.213;//16.38; changed so that shots from the side wil aim to the opposite side, and bank in
public static final double RED_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_RED_Y+1.263;//5.46;
public static final double BLUE_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_Y+1.263;//5.46;
public static final double SPEAKER_Z = 2.08;//1.5;//1.8;//2.08; //height of opening. Changed so that the smaller spekeaker_x shots will still go in
public static final double CALCULATED_SHOOTER_RED_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_RED_X+3.213;
public static final double CALCULATED_RED_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_RED_Y+1.263;
public static final double RED_SPEAKER_Y = CALCULATED_RED_SPEAKER_Y;
public static final double SHOOTER_RED_SPEAKER_X = CALCULATED_SHOOTER_RED_SPEAKER_X;//changed so that shots from the side wil aim to the opposite side, and bank in
public static final double ROBOT_RED_SPEAKER_X = SHOOTER_RED_SPEAKER_X-0.165;//changed so that shots from the side wil aim to the opposite side, and bank in

public static final double CALCULATED_SHOOTER_BLUE_SPEAKER_X = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_X-3.213; //changed so that shots from the side wil aim to the opposite side, and bank in
public static final double CALCULATED_BLUE_SPEAKER_Y = AMP_SIDE_OUTER_TAPE_CORNER_BLUE_Y+1.263;
public static final double BLUE_SPEAKER_Y = CALCULATED_BLUE_SPEAKER_Y;
public static final double SHOOTER_BLUE_SPEAKER_X = CALCULATED_SHOOTER_BLUE_SPEAKER_X;
public static final double ROBOT_BLUE_SPEAKER_X =SHOOTER_BLUE_SPEAKER_X+0.6;

public static final double SPEAKER_Z = 2.08;//1.5;//1.8;//2.08; //height of opening. Changed so that the smaller spekeaker_x shots will still go in

public static final double MAX_SHOOTING_DISTANCE = 9;
public static final double SHORT_RANGE_SHOOTING_DIST = 3;

public static final double AMPLIFIER_SHOOTER_ANGLE = 108;
public static final double SUBWOOFER_ANGLE = 60;
public static final double PODIUM_SHOOTER_ANGLE = 36.3;
public static final double PODIUM_SHOOTER_ANGLE = 40;//36.3;
public static final double FAR_STAGE_SHOOTER_ANGLE = 25.5;
//24.5;
public static final double OPPOSITE_STAGE_SHOOTER_ANGLE = 26;//24.5;
Expand Down
Loading