-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add working backpack
- Loading branch information
Showing
34 changed files
with
172 additions
and
93 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N5-S0-C0123_driveToC0.pathblob
Binary file not shown.
Binary file modified
BIN
-18 Bytes
(100%)
src/main/deploy/trajectories/N5-S0-C0123_driveToC1.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N5-S0-C0123_driveToC2.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N5-S0-C0123_driveToS0.pathblob
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+134 Bytes
(100%)
src/main/deploy/trajectories/N5-S1-C234_driveToC3.pathblob
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N6-S12-C0123_driveToC0.pathblob
Binary file not shown.
Binary file modified
BIN
+58 Bytes
(100%)
src/main/deploy/trajectories/N6-S12-C0123_driveToC1.pathblob
Binary file not shown.
Binary file modified
BIN
-9 Bytes
(100%)
src/main/deploy/trajectories/N6-S12-C0123_driveToC2.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N6-S12-C0123_driveToS1.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/N6-S12-C0123_driveToS2.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/davisEthicalAuto_driveToCenterline0.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/davisEthicalAuto_driveToCenterline1.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/davisEthicalAuto_driveToCenterline2.pathblob
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/main/deploy/trajectories/davisEthicalAuto_driveToPodium.pathblob
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 20 additions & 13 deletions
33
src/main/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/Backpack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
// Copyright (c) 2024 FRC 6328 | ||
// http://github.com/Mechanical-Advantage | ||
// | ||
// Use of this source code is governed by an MIT-style | ||
// license that can be found in the LICENSE file at | ||
// the root directory of this project. | ||
|
||
package org.littletonrobotics.frc2024.subsystems.rollers.backpack; | ||
|
||
import java.util.function.DoubleSupplier; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Setter; | ||
import org.littletonrobotics.frc2024.util.LoggedTunableNumber; | ||
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystem; | ||
|
||
import java.util.function.DoubleSupplier; | ||
|
||
@Setter | ||
@Getter | ||
public class Backpack extends GenericRollerSystem<Backpack.Goal> { | ||
@RequiredArgsConstructor | ||
@Getter | ||
public enum Goal implements VoltageGoal { | ||
IDLING(() -> 0), | ||
AMP_SCORING(new LoggedTunableNumber("Backpack/AmpScoringVoltage")); | ||
@RequiredArgsConstructor | ||
@Getter | ||
public enum Goal implements VoltageGoal { | ||
IDLING(() -> 0), | ||
EJECTING(new LoggedTunableNumber("Backpack/EjectingVoltage", -12.0)), | ||
AMP_SCORING(new LoggedTunableNumber("Backpack/AmpScoringVoltage", 12.0)); | ||
|
||
private final DoubleSupplier voltageSupplier; | ||
} | ||
private final DoubleSupplier voltageSupplier; | ||
} | ||
|
||
private Goal goal = Goal.IDLING; | ||
private Goal goal = Goal.IDLING; | ||
|
||
public Backpack(BackpackIO io) { | ||
super("Backpack", io); | ||
} | ||
public Backpack(BackpackIO io) { | ||
super("Backpack", io); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/BackpackIO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 13 additions & 6 deletions
19
src/main/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/BackpackIOSim.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
// Copyright (c) 2024 FRC 6328 | ||
// http://github.com/Mechanical-Advantage | ||
// | ||
// Use of this source code is governed by an MIT-style | ||
// license that can be found in the LICENSE file at | ||
// the root directory of this project. | ||
|
||
package org.littletonrobotics.frc2024.subsystems.rollers.backpack; | ||
|
||
import edu.wpi.first.math.system.plant.DCMotor; | ||
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSim; | ||
|
||
public class BackpackIOSim extends GenericRollerSystemIOSim implements BackpackIO { | ||
private static final DCMotor motorModel = DCMotor.getNeoVortex(1); | ||
private static final double reduction = (1.0 / 1.0); | ||
private static final double moi = 0.001; | ||
private static final DCMotor motorModel = DCMotor.getNeoVortex(1); | ||
private static final double reduction = (1.0 / 1.0); | ||
private static final double moi = 0.001; | ||
|
||
public BackpackIOSim() { | ||
super(motorModel, reduction, moi); | ||
} | ||
public BackpackIOSim() { | ||
super(motorModel, reduction, moi); | ||
} | ||
} |
25 changes: 16 additions & 9 deletions
25
...n/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/BackpackIOSparkFlex.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
// Copyright (c) 2024 FRC 6328 | ||
// http://github.com/Mechanical-Advantage | ||
// | ||
// Use of this source code is governed by an MIT-style | ||
// license that can be found in the LICENSE file at | ||
// the root directory of this project. | ||
|
||
package org.littletonrobotics.frc2024.subsystems.rollers.backpack; | ||
|
||
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSparkFlex; | ||
|
||
public class BackpackIOSparkFlex extends GenericRollerSystemIOSparkFlex implements BackpackIO { | ||
private static final int id = 0; | ||
private static final int currentLimitAmps = 40; | ||
private static final boolean invert = false; | ||
private static final boolean brake = true; | ||
private static final double reduction = (1.0 / 1.0); | ||
|
||
public BackpackIOSparkFlex() { | ||
super(id, currentLimitAmps, invert, brake, reduction); | ||
} | ||
private static final int id = 6; | ||
private static final int currentLimitAmps = 40; | ||
private static final boolean invert = true; | ||
private static final boolean brake = true; | ||
private static final double reduction = (1.0 / 1.0); | ||
|
||
public BackpackIOSparkFlex() { | ||
super(id, currentLimitAmps, invert, brake, reduction); | ||
} | ||
} |
Oops, something went wrong.