-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harshini drivebase i love drivebases (#80)
* 11/18/24 - Harshini i made a forward backward side opmode and tested it (it goes in a square) for kevin :D * 11/18/24 - Harshini after consulting with kevin on monday, yesterday, odopods are actually messed up and we(I) need to test to see which ones need to be reversed teehee yay yippee yahooooooo * 11/19/24 - Harshini methods for slide buttons * 11/19/24 - Harshini changed PID constants and feed fwd constant (not fully tested yet, will finish on friday hopefullyyy) * 11/21/24 - Harshini updated kid shampoo constants, should be all correct now (tested on bot) :DDD --------- Co-authored-by: FTC16750 <[email protected]>
- Loading branch information
1 parent
6c8322b
commit 770ce6d
Showing
11 changed files
with
267 additions
and
20 deletions.
There are no files selected for viewing
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
100 changes: 100 additions & 0 deletions
100
Twenty403/src/main/java/org/firstinspires/ftc/twenty403/controls/KidShamTestController.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 |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package org.firstinspires.ftc.twenty403.controls; | ||
|
||
import com.technototes.library.command.Command; | ||
import com.technototes.library.control.CommandButton; | ||
import com.technototes.library.control.CommandGamepad; | ||
|
||
import org.firstinspires.ftc.twenty403.Robot; | ||
import org.firstinspires.ftc.twenty403.Setup; | ||
|
||
public class KidShamTestController { | ||
|
||
public Robot robot; | ||
public CommandGamepad gamepad; | ||
public CommandButton openRetainer; | ||
public CommandButton closeRetainer; | ||
public CommandButton eatRetainer; | ||
public CommandButton biteJaw; | ||
public CommandButton releaseJaw; | ||
public CommandButton slurpIntake; | ||
public CommandButton spitIntake; | ||
public CommandButton stopIntake; | ||
public CommandButton suspend; | ||
public CommandButton SuspendReverse; | ||
public CommandButton armIntake; | ||
public CommandButton armLowNet; | ||
public CommandButton armLowSpecimen; | ||
public CommandButton armHighSpecimen; | ||
public CommandButton armHorizontal; | ||
public CommandButton armVertical; | ||
public CommandButton armIncrement; | ||
public CommandButton armDecrement; | ||
public CommandButton dumpWrist; | ||
public CommandButton scoopWrist; | ||
public CommandButton slideIn; | ||
public CommandButton slideOut; | ||
public CommandButton slideMax; | ||
public CommandButton slideMin; | ||
|
||
|
||
public KidShamTestController(CommandGamepad g, Robot r) { | ||
robot = r; | ||
gamepad = g; | ||
AssignNamedControllerButton(); | ||
BindControls(); | ||
} | ||
|
||
private void AssignNamedControllerButton() { | ||
openRetainer = gamepad.dpadUp; | ||
closeRetainer = gamepad.dpadRight; | ||
slurpIntake = gamepad.leftBumper; | ||
spitIntake = gamepad.rightBumper; | ||
//temp changing the button below from biteJaw to intake :DD | ||
biteJaw = gamepad.dpadLeft; | ||
releaseJaw = gamepad.dpadDown; | ||
dumpWrist = gamepad.ps_circle; | ||
scoopWrist = gamepad.ps_square; | ||
|
||
} | ||
|
||
public void BindControls() { | ||
if (Setup.Connected.KIDSSHAMPOOSUBSYSTEM) { | ||
bindKidShampooControls(); | ||
} | ||
} | ||
|
||
public void bindKidShampooControls() { | ||
openRetainer.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::openRetainer, robot.kidShampooSubsystem) | ||
); | ||
closeRetainer.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::closeRetainer, robot.kidShampooSubsystem) | ||
); | ||
biteJaw.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::biteJaw, robot.kidShampooSubsystem) | ||
); | ||
releaseJaw.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::releaseJaw, robot.kidShampooSubsystem) | ||
); | ||
slurpIntake.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::slurpIntake, robot.kidShampooSubsystem) | ||
); | ||
spitIntake.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::spitIntake, robot.kidShampooSubsystem) | ||
); | ||
slurpIntake.whenReleased( | ||
Command.create(robot.kidShampooSubsystem::stopIntake, robot.kidShampooSubsystem) | ||
); | ||
spitIntake.whenReleased( | ||
Command.create(robot.kidShampooSubsystem::stopIntake, robot.kidShampooSubsystem) | ||
); | ||
dumpWrist.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::dumpWrist, robot.kidShampooSubsystem) | ||
); | ||
scoopWrist.whenPressed( | ||
Command.create(robot.kidShampooSubsystem::scoopWrist, robot.kidShampooSubsystem) | ||
); | ||
} | ||
} | ||
|
||
|
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
42 changes: 42 additions & 0 deletions
42
Twenty403/src/main/java/org/firstinspires/ftc/twenty403/opmodes/KidShamTest.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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.firstinspires.ftc.twenty403.opmodes; | ||
|
||
import com.acmerobotics.dashboard.FtcDashboard; | ||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry; | ||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | ||
import com.technototes.library.command.CommandScheduler; | ||
import com.technototes.library.structure.CommandOpMode; | ||
import com.technototes.library.util.Alliance; | ||
|
||
import org.firstinspires.ftc.twenty403.AutoConstants; | ||
import org.firstinspires.ftc.twenty403.Hardware; | ||
import org.firstinspires.ftc.twenty403.Robot; | ||
import org.firstinspires.ftc.twenty403.Setup; | ||
import org.firstinspires.ftc.twenty403.commands.EZCmd; | ||
import org.firstinspires.ftc.twenty403.controls.DriverController; | ||
import org.firstinspires.ftc.twenty403.controls.KidShamTestController; | ||
import org.firstinspires.ftc.twenty403.controls.OperatorController; | ||
import org.firstinspires.ftc.twenty403.helpers.StartingPosition; | ||
|
||
@TeleOp(name = "KidShamTest") | ||
@SuppressWarnings("unused") | ||
public class KidShamTest extends CommandOpMode { | ||
|
||
public Robot robot; | ||
public KidShamTestController kidShamTestController; | ||
public Hardware hardware; | ||
|
||
@Override | ||
public void uponInit() { | ||
telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry()); | ||
hardware = new Hardware(hardwareMap); | ||
robot = new Robot(hardware, Alliance.BLUE, StartingPosition.Unspecified); | ||
kidShamTestController = new KidShamTestController(codriverGamepad, robot); | ||
if (Setup.Connected.DRIVEBASE) { | ||
|
||
CommandScheduler.scheduleForState( | ||
EZCmd.Drive.ResetGyro(robot.drivebaseSubsystem), | ||
OpModeState.INIT | ||
); | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...ty403/src/main/java/org/firstinspires/ftc/twenty403/opmodes/auto/ForwardBackwardSide.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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.firstinspires.ftc.twenty403.opmodes.auto; | ||
|
||
import com.acmerobotics.dashboard.FtcDashboard; | ||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry; | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.technototes.library.command.CommandScheduler; | ||
import com.technototes.library.command.SequentialCommandGroup; | ||
import com.technototes.library.structure.CommandOpMode; | ||
import com.technototes.library.util.Alliance; | ||
|
||
import org.firstinspires.ftc.twenty403.AutoConstants; | ||
import org.firstinspires.ftc.twenty403.Hardware; | ||
import org.firstinspires.ftc.twenty403.Robot; | ||
import org.firstinspires.ftc.twenty403.commands.EZCmd; | ||
import org.firstinspires.ftc.twenty403.commands.auto.Paths; | ||
import org.firstinspires.ftc.twenty403.controls.DriverController; | ||
import org.firstinspires.ftc.twenty403.controls.SafetyTestController; | ||
import org.firstinspires.ftc.twenty403.helpers.StartingPosition; | ||
|
||
//TODO: figure out where the other splineTest is coming from (duplicate spline error) | ||
@Autonomous(name = "ForwardBackwardSide") | ||
@SuppressWarnings("unused") | ||
public class ForwardBackwardSide extends CommandOpMode { | ||
|
||
public Robot robot; | ||
public DriverController controls; | ||
public SafetyTestController safety; | ||
public Hardware hardware; | ||
|
||
@Override | ||
public void uponInit() { | ||
telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry()); | ||
hardware = new Hardware(hardwareMap); | ||
robot = new Robot(hardware, Alliance.RED, StartingPosition.Observation); | ||
robot.drivebaseSubsystem.setPoseEstimate(AutoConstants.REST.toPose()); | ||
// safety = new SafetyTestController(driverGamepad, robot); | ||
//robot.safetySubsystem.startMonitoring(); | ||
CommandScheduler.scheduleForState( | ||
new SequentialCommandGroup( | ||
Paths.ForwardBackwardSide(robot), | ||
EZCmd.Drive.RecordHeading(robot.drivebaseSubsystem), | ||
CommandScheduler::terminateOpMode | ||
), | ||
OpModeState.RUN | ||
); | ||
// CommandScheduler.scheduleForState( | ||
// new SafetyStartCommand(robot.safetySubsystem), | ||
// OpModeState.RUN | ||
// ); | ||
} | ||
} |
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
Oops, something went wrong.