Skip to content

Commit a7fd7b9

Browse files
Merge pull request #92 from DeepBlueRobotics/testing-changes-7-14
Testing changes 7 14
2 parents bd4bcbc + 1791e7a commit a7fd7b9

18 files changed

+542
-351
lines changed

src/main/deploy/pathplanner/autos/Center Limelight 4 Piece Path Following.auto

Lines changed: 0 additions & 115 deletions
This file was deleted.

src/main/deploy/pathplanner/autos/Center Limelight 4 Piece.auto

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
"name": "Shoot"
1818
}
1919
},
20-
{
21-
"type": "path",
22-
"data": {
23-
"pathName": "Center Limelight 1"
24-
}
25-
},
2620
{
2721
"type": "named",
2822
"data": {

src/main/deploy/pathplanner/paths/Center Limelight 2.path

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 2.0257443358488607,
20-
"y": 6.857291439701363
19+
"x": 1.8701178634584756,
20+
"y": 6.195878932042224
2121
},
2222
"prevControl": {
23-
"x": 1.3343326564655966,
24-
"y": 6.623574815684485
23+
"x": 1.198978701274938,
24+
"y": 5.991619187029844
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -39,7 +39,7 @@
3939
},
4040
"goalEndState": {
4141
"velocity": 0,
42-
"rotation": 4.398705354995547,
42+
"rotation": 44.193070544897665,
4343
"rotateFast": false
4444
},
4545
"reversed": false,

src/main/deploy/pathplanner/paths/Center Limelight 3.path

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 2.0841042629952553,
20-
"y": 4.435354463125988
19+
"x": 1.899297827031673,
20+
"y": 4.960593807443538
2121
},
2222
"prevControl": {
23-
"x": 1.5095508956204307,
24-
"y": 4.746976628481825
23+
"x": 1.3247444596568483,
24+
"y": 5.272215972799375
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -39,7 +39,7 @@
3939
},
4040
"goalEndState": {
4141
"velocity": 0,
42-
"rotation": -16.38954033403484,
42+
"rotation": -43.36342295838326,
4343
"rotateFast": false
4444
},
4545
"reversed": false,

src/main/deploy/pathplanner/paths/Center Limelight 4.path

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 7.443490905939159,
20-
"y": 2.2857638132337867
19+
"x": 7.064151379487593,
20+
"y": 2.344123740380181
2121
},
2222
"prevControl": {
23-
"x": 6.138573088511591,
24-
"y": 1.3411591244989065
23+
"x": 5.759233562060025,
24+
"y": 1.3995190516453007
2525
},
2626
"nextControl": null,
2727
"isLocked": false,

src/main/deploy/pathplanner/paths/Center Limelight 5.path

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 2.5149846740974624,
20-
"y": 2.7559085248656867
19+
"x": 2.8330566613739863,
20+
"y": 3.4821423197348755
2121
},
2222
"prevControl": {
23-
"x": 2.9337269587943684,
24-
"y": 1.3341323954296802
23+
"x": 3.2517989460708923,
24+
"y": 2.0603661902988692
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -39,7 +39,7 @@
3939
},
4040
"goalEndState": {
4141
"velocity": 0,
42-
"rotation": -35.83765295427821,
42+
"rotation": -41.42366562500259,
4343
"rotateFast": false
4444
},
4545
"reversed": false,

src/main/deploy/pathplanner/paths/Center Limelight 6.path

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 7.832557086915123,
20-
"y": 3.2778825747224944
19+
"x": 7.696383923573536,
20+
"y": 3.063896175185714
2121
},
2222
"prevControl": {
23-
"x": 7.433291187552956,
24-
"y": 1.9047974086233364
23+
"x": 7.297118024211369,
24+
"y": 1.690811009086556
2525
},
2626
"nextControl": null,
2727
"isLocked": false,

src/main/java/org/carlmontrobotics/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public abstract class Config implements Sendable {
2424
protected boolean exampleFlagEnabled = false;
2525
protected boolean swimShady = false;
2626
protected boolean setupSysId = false;
27-
protected boolean limelightDisabled = false;
27+
protected boolean limelightDisabled = false;
2828
protected boolean useSmartDashboardControl = false; // whether to control arm position + rpm of
2929
// outtake through SmartDashboard
3030
// Note: disables joystick control of arm and

src/main/java/org/carlmontrobotics/Constants.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ public static final class Effectorc {
109109
public static final class Armc {
110110

111111
// Motor port
112-
public static final int ARM_MOTOR_PORT_MASTER = 13;
112+
public static final int ARM_MOTOR_PORT_MASTER =
113+
CONFIG.isSwimShady() ? 20 : 13;
113114
public final static int ARM_MOTOR_PORT_FOLLOWER = 18;
114115
// Config for motors
115116
public static final boolean MOTOR_INVERTED_MASTER = false;
@@ -300,7 +301,7 @@ public static final class Drivetrainc {
300301
: new double[] { 2, 0.0, 0.0 };
301302
public static final double[] yPIDController = xPIDController;
302303
public static final double[] thetaPIDController = CONFIG.isSwimShady() ? new double[] { 0.10, 0.0, 0.001 }
303-
: new double[] {0.10, 0.0, 0.001};
304+
: new double[] {0.05, 0.0, 0.00};
304305

305306
public static final SwerveConfig swerveConfig = new SwerveConfig(wheelDiameterMeters, driveGearing, mu,
306307
autoCentripetalAccel, kForwardVolts, kForwardVels, kForwardAccels, kBackwardVolts, kBackwardVels,

src/main/java/org/carlmontrobotics/RobotContainer.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ public class RobotContainer {
111111
"Right Limelight 4 Piece", "Left Limelight 4 Piece",
112112
"Center Limelight 4 Piece", "Center Limelight 4 Piece Path Following",
113113

114-
"Left-Amp",
115-
114+
"Left-Amp",
116115
};
117116
DigitalInput[] autoSelectors =
118117
new DigitalInput[Math.min(autoNames.length, 10)];
@@ -141,7 +140,7 @@ public RobotContainer() {
141140
for (String n : autoNames) {
142141
autoSelector.addOption(n, i);
143142
i++;
144-
}
143+
}
145144

146145
ShuffleboardTab autoSelectorTab = Shuffleboard.getTab("Auto Chooser Tab");
147146
autoSelectorTab.add(autoSelector).withSize(2, 1);
@@ -220,6 +219,9 @@ private void setBindingsManipulator() {
220219
new SequentialCommandGroup(new AimArmSpeaker(arm, limelight),
221220
new PassToOuttake(intakeShooter)));
222221

222+
// axisTrigger(manipulatorController, Manipulator.SHOOTER_BUTTON).whileTrue(
223+
// new PassToOuttake(intakeShooter));
224+
223225
new JoystickButton(manipulatorController, RAMP_OUTTAKE)
224226
.whileTrue(new RampMaxRPM(intakeShooter));
225227
new JoystickButton(manipulatorController, OPPOSITE_EJECT)
@@ -359,9 +361,10 @@ private void registerAutoCommands() {
359361
NamedCommands.registerCommand("AlignToAprilTagMegaTag2",
360362
new AlignToApriltag(drivetrain, limelight));
361363
NamedCommands.registerCommand("Shoot", new SequentialCommandGroup(
362-
new ParallelCommandGroup(new AlignToApriltag(drivetrain, limelight),
363-
new AimArmSpeaker(arm, limelight)),
364-
new RampRPMAuton(intakeShooter), new PassToOuttake(intakeShooter),
364+
new ParallelCommandGroup(new AlignDrivetrain(drivetrain),
365+
new AimArmSpeaker(arm, limelight),
366+
new RampRPMAuton(intakeShooter)),
367+
new PassToOuttake(intakeShooter),
365368
new ArmToPos(arm, GROUND_INTAKE_POS)));
366369
NamedCommands.registerCommand("Limelight Intake CCW",
367370
new ParallelCommandGroup(new Intake(intakeShooter),
@@ -372,19 +375,18 @@ private void registerAutoCommands() {
372375
new AutoMATICALLYGetNote(drivetrain, limelight,
373376
intakeShooter, -1)));
374377

375-
376378
NamedCommands.registerCommand("StopIntake",
377379
new InstantCommand(intakeShooter::stopIntake));
378380
NamedCommands.registerCommand("StopOutake",
379381
new InstantCommand(intakeShooter::stopOuttake));
380382
NamedCommands.registerCommand("StopBoth",
381383
new ParallelCommandGroup(new InstantCommand(intakeShooter::stopIntake),
382-
new InstantCommand(intakeShooter::stopOuttake)));
383-
for (int i = 0; i < 6; i++) {
384-
NamedCommands.registerCommand("Follow Center Limelight " + i,
385-
new AutonPathfind(drivetrain, "Center Limelight " + i));
386-
}
384+
new InstantCommand(intakeShooter::stopOuttake)));
387385

386+
NamedCommands.registerCommand("Auto Intake",
387+
new SequentialCommandGroup(
388+
new AlignToNoteMath(drivetrain, intakeShooter),
389+
new DriveAndIntake(intakeShooter, drivetrain)));
388390
}
389391

390392
private void setupAutos() {
@@ -402,7 +404,7 @@ private void setupAutos() {
402404
* PathPlannerAuto.getPathGroupFromAutoFile(name).get(0).getPreviewStartingHolonomicPose(),
403405
* Autoc.pathConstraints ), new PathPlannerAuto(name) );
404406
*/
405-
}
407+
}
406408
}
407409

408410

0 commit comments

Comments
 (0)