-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all of the singular auto programs, they still need to be adjusted wit…
…h dimensions
- Loading branch information
Ishaan Ghaskadbi
authored and
Ishaan Ghaskadbi
committed
Nov 21, 2024
1 parent
f127366
commit 358d6b7
Showing
10 changed files
with
520 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
74 changes: 74 additions & 0 deletions
74
...tlin/org/firstinspires/ftc/teamcode/opModes/auto/blue/basket/right/BlueHighBasketRight.kt
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,74 @@ | ||
package org.firstinspires.ftc.teamcode.opModes.auto.blue.basket.right | ||
|
||
import com.arcrobotics.ftclib.hardware.motors.CRServo | ||
import com.arcrobotics.ftclib.hardware.motors.Motor | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode | ||
import org.firstinspires.ftc.teamcode.constants.AutoStartPose | ||
import org.firstinspires.ftc.teamcode.constants.ControlBoard | ||
import org.firstinspires.ftc.teamcode.subsystems.arm.ArmSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.drive.DriveSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.intake.IntakeSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.slides.SlidesSubsytem | ||
|
||
|
||
@Autonomous(name = "Blue High Basket Right", group = "Basket", preselectTeleOp = "MainTeleOp") | ||
class BlueHighBasketRight() : OpMode() { | ||
|
||
private lateinit var armLeft: Motor | ||
private lateinit var armRight: Motor | ||
private lateinit var elevatorLeft: Motor | ||
private lateinit var elevatorRight: Motor | ||
|
||
private lateinit var intake: CRServo | ||
|
||
private lateinit var driveSubsystem: DriveSubsystem | ||
private lateinit var intakeSubsystem: IntakeSubsystem | ||
private lateinit var armSubsystem: ArmSubsystem | ||
private lateinit var elevatorSubsystem: SlidesSubsytem | ||
|
||
override fun init() { | ||
intake = CRServo(hardwareMap, ControlBoard.INTAKE.deviceName) | ||
|
||
armLeft = Motor(hardwareMap, ControlBoard.ARM_LEFT.deviceName) | ||
armRight = Motor(hardwareMap, ControlBoard.ARM_RIGHT.deviceName) | ||
|
||
elevatorLeft = Motor(hardwareMap, ControlBoard.SLIDES_LEFT.deviceName) | ||
elevatorRight = Motor(hardwareMap, ControlBoard.SLIDES_RIGHT.deviceName) | ||
|
||
driveSubsystem = DriveSubsystem(hardwareMap) | ||
intakeSubsystem = IntakeSubsystem(intake) | ||
armSubsystem = ArmSubsystem(armLeft, armRight) | ||
elevatorSubsystem = SlidesSubsytem(elevatorLeft, elevatorRight) | ||
|
||
val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_RIGHT.startPose) | ||
.turn(Math.toRadians(90.0)) | ||
.forward(35.0) | ||
.addTemporalMarker(2.0) { | ||
armSubsystem.setpoint = Math.toRadians(150.0) | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(3.0) { | ||
elevatorSubsystem.setpoint = 2.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(5.0){ | ||
intakeSubsystem.outtake() | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(6.0) { | ||
elevatorSubsystem.setpoint = 0.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(8.0) { | ||
armSubsystem.setpoint = Math.toRadians(0.0) | ||
} | ||
.build() | ||
|
||
driveSubsystem.followTrajectorySequenceAsync(trajectory) | ||
} | ||
|
||
override fun loop() { | ||
driveSubsystem.update() | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...tlin/org/firstinspires/ftc/teamcode/opModes/auto/blue/chamber/left/BlueHighChamberLeft.kt
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,73 @@ | ||
package org.firstinspires.ftc.teamcode.opModes.auto.blue.chamber.left | ||
|
||
import com.arcrobotics.ftclib.hardware.motors.CRServo | ||
import com.arcrobotics.ftclib.hardware.motors.Motor | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode | ||
import org.firstinspires.ftc.teamcode.constants.AutoStartPose | ||
import org.firstinspires.ftc.teamcode.constants.ControlBoard | ||
import org.firstinspires.ftc.teamcode.subsystems.arm.ArmSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.drive.DriveSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.intake.IntakeSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.slides.SlidesSubsytem | ||
|
||
@Autonomous(name = "Blue High Chamber Left", group = "Chamber", preselectTeleOp = "MainTeleOp") | ||
class BlueHighChamberLeft() : OpMode() { | ||
private lateinit var armLeft: Motor | ||
private lateinit var armRight: Motor | ||
private lateinit var elevatorLeft: Motor | ||
private lateinit var elevatorRight: Motor | ||
|
||
private lateinit var intake: CRServo | ||
|
||
private lateinit var driveSubsystem: DriveSubsystem | ||
private lateinit var intakeSubsystem: IntakeSubsystem | ||
private lateinit var armSubsystem: ArmSubsystem | ||
private lateinit var elevatorSubsystem: SlidesSubsytem | ||
|
||
override fun init() { | ||
intake = CRServo(hardwareMap, ControlBoard.INTAKE.deviceName) | ||
|
||
armLeft = Motor(hardwareMap, ControlBoard.ARM_LEFT.deviceName) | ||
armRight = Motor(hardwareMap, ControlBoard.ARM_RIGHT.deviceName) | ||
|
||
elevatorLeft = Motor(hardwareMap, ControlBoard.SLIDES_LEFT.deviceName) | ||
elevatorRight = Motor(hardwareMap, ControlBoard.SLIDES_RIGHT.deviceName) | ||
|
||
driveSubsystem = DriveSubsystem(hardwareMap) | ||
intakeSubsystem = IntakeSubsystem(intake) | ||
armSubsystem = ArmSubsystem(armLeft, armRight) | ||
elevatorSubsystem = SlidesSubsytem(elevatorLeft, elevatorRight) | ||
|
||
val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_LEFT.startPose) | ||
|
||
.forward(28.0) | ||
.strafeLeft(11.0) | ||
.addTemporalMarker(2.0) { | ||
armSubsystem.setpoint = Math.toRadians(150.0) | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(3.0) { | ||
elevatorSubsystem.setpoint = 2.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(5.0) { | ||
intakeSubsystem.outtake() | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(6.0) { | ||
elevatorSubsystem.setpoint = 0.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(8.0) { | ||
armSubsystem.setpoint = Math.toRadians(0.0) | ||
} | ||
.build() | ||
|
||
driveSubsystem.followTrajectorySequenceAsync(trajectory) | ||
} | ||
|
||
override fun loop() { | ||
driveSubsystem.update() | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...in/org/firstinspires/ftc/teamcode/opModes/auto/blue/chamber/right/BlueHighChamberRight.kt
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,73 @@ | ||
package org.firstinspires.ftc.teamcode.opModes.auto.blue.chamber.right | ||
|
||
import com.arcrobotics.ftclib.hardware.motors.CRServo | ||
import com.arcrobotics.ftclib.hardware.motors.Motor | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode | ||
import org.firstinspires.ftc.teamcode.constants.AutoStartPose | ||
import org.firstinspires.ftc.teamcode.constants.ControlBoard | ||
import org.firstinspires.ftc.teamcode.subsystems.arm.ArmSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.drive.DriveSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.intake.IntakeSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.slides.SlidesSubsytem | ||
|
||
@Autonomous(name = "Blue High Chamber Right", group = "Chamber", preselectTeleOp = "MainTeleOp") | ||
class BlueHighChamberRight() : OpMode() { | ||
private lateinit var armLeft: Motor | ||
private lateinit var armRight: Motor | ||
private lateinit var elevatorLeft: Motor | ||
private lateinit var elevatorRight: Motor | ||
|
||
private lateinit var intake: CRServo | ||
|
||
private lateinit var driveSubsystem: DriveSubsystem | ||
private lateinit var intakeSubsystem: IntakeSubsystem | ||
private lateinit var armSubsystem: ArmSubsystem | ||
private lateinit var elevatorSubsystem: SlidesSubsytem | ||
|
||
override fun init() { | ||
intake = CRServo(hardwareMap, ControlBoard.INTAKE.deviceName) | ||
|
||
armLeft = Motor(hardwareMap, ControlBoard.ARM_LEFT.deviceName) | ||
armRight = Motor(hardwareMap, ControlBoard.ARM_RIGHT.deviceName) | ||
|
||
elevatorLeft = Motor(hardwareMap, ControlBoard.SLIDES_LEFT.deviceName) | ||
elevatorRight = Motor(hardwareMap, ControlBoard.SLIDES_RIGHT.deviceName) | ||
|
||
driveSubsystem = DriveSubsystem(hardwareMap) | ||
intakeSubsystem = IntakeSubsystem(intake) | ||
armSubsystem = ArmSubsystem(armLeft, armRight) | ||
elevatorSubsystem = SlidesSubsytem(elevatorLeft, elevatorRight) | ||
|
||
val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_RIGHT.startPose) | ||
|
||
.forward(28.0) | ||
.strafeRight(11.0) | ||
.addTemporalMarker(2.0) { | ||
armSubsystem.setpoint = Math.toRadians(150.0) | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(3.0) { | ||
elevatorSubsystem.setpoint = 2.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(5.0) { | ||
intakeSubsystem.outtake() | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(6.0) { | ||
elevatorSubsystem.setpoint = 0.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(8.0) { | ||
armSubsystem.setpoint = Math.toRadians(0.0) | ||
} | ||
.build() | ||
|
||
driveSubsystem.followTrajectorySequenceAsync(trajectory) | ||
} | ||
|
||
override fun loop() { | ||
driveSubsystem.update() | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
...n/kotlin/org/firstinspires/ftc/teamcode/opModes/auto/red/basket/left/RedHighBasketLeft.kt
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,73 @@ | ||
package org.firstinspires.ftc.teamcode.opModes.auto.red.basket.left | ||
|
||
import com.arcrobotics.ftclib.hardware.motors.CRServo | ||
import com.arcrobotics.ftclib.hardware.motors.Motor | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode | ||
import org.firstinspires.ftc.teamcode.constants.AutoStartPose | ||
import org.firstinspires.ftc.teamcode.constants.ControlBoard | ||
import org.firstinspires.ftc.teamcode.subsystems.arm.ArmSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.drive.DriveSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.intake.IntakeSubsystem | ||
import org.firstinspires.ftc.teamcode.subsystems.slides.SlidesSubsytem | ||
|
||
@Autonomous(name = "Red High Basket Left", group = "Basket", preselectTeleOp = "MainTeleOp") | ||
class RedHighBasketLeft() : OpMode() { | ||
|
||
private lateinit var armLeft: Motor | ||
private lateinit var armRight: Motor | ||
private lateinit var elevatorLeft: Motor | ||
private lateinit var elevatorRight: Motor | ||
|
||
private lateinit var intake: CRServo | ||
|
||
private lateinit var driveSubsystem: DriveSubsystem | ||
private lateinit var intakeSubsystem: IntakeSubsystem | ||
private lateinit var armSubsystem: ArmSubsystem | ||
private lateinit var elevatorSubsystem: SlidesSubsytem | ||
|
||
override fun init() { | ||
intake = CRServo(hardwareMap, ControlBoard.INTAKE.deviceName) | ||
|
||
armLeft = Motor(hardwareMap, ControlBoard.ARM_LEFT.deviceName) | ||
armRight = Motor(hardwareMap, ControlBoard.ARM_RIGHT.deviceName) | ||
|
||
elevatorLeft = Motor(hardwareMap, ControlBoard.SLIDES_LEFT.deviceName) | ||
elevatorRight = Motor(hardwareMap, ControlBoard.SLIDES_RIGHT.deviceName) | ||
|
||
driveSubsystem = DriveSubsystem(hardwareMap) | ||
intakeSubsystem = IntakeSubsystem(intake) | ||
armSubsystem = ArmSubsystem(armLeft, armRight) | ||
elevatorSubsystem = SlidesSubsytem(elevatorLeft, elevatorRight) | ||
|
||
val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.RED_LEFT.startPose) | ||
.turn(Math.toRadians(90.0)) | ||
.forward(35.0) | ||
.addTemporalMarker(2.0) { | ||
armSubsystem.setpoint = Math.toRadians(150.0) | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(3.0) { | ||
elevatorSubsystem.setpoint = 2.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(5.0){ | ||
intakeSubsystem.outtake() | ||
} | ||
.waitSeconds(1.0) | ||
.addTemporalMarker(6.0) { | ||
elevatorSubsystem.setpoint = 0.0 | ||
} | ||
.waitSeconds(2.0) | ||
.addTemporalMarker(8.0) { | ||
armSubsystem.setpoint = Math.toRadians(0.0) | ||
} | ||
.build() | ||
|
||
driveSubsystem.followTrajectorySequenceAsync(trajectory) | ||
} | ||
|
||
override fun loop() { | ||
driveSubsystem.update() | ||
} | ||
} |
Oops, something went wrong.