Skip to content

Commit

Permalink
auto programs that are all park
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishaan Ghaskadbi authored and Ishaan Ghaskadbi committed Nov 19, 2024
1 parent 67e6e9e commit 60406d9
Show file tree
Hide file tree
Showing 25 changed files with 220 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object BlueHighBasket1 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, 62.0, (270.0).toRadians()))
.turn((90.0).toRadians())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object BlueHighBasket2 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, 62.0, (270.0).toRadians()))
.turn((90.0).toRadians())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object BlueHighChamber1 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, 62.0, (270.0).toRadians()))
.forward(28.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object BlueHighChamber2 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, 62.0, (270.0).toRadians()))
.forward(28.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object BlueParkObservation1 {
object BlueParkObservationLeft {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, 62.0, (270.0).toRadians()))
.strafeRight(48.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object BlueParkObservation2 {
object BlueParkObservationRight {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, 62.0, (270.0).toRadians()))
.strafeRight(72.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object BlueParkTouchSubmmersible1 {
object BlueParkTouchSubmmersibleLeft {

@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, 62.0, (270.0).toRadians()))
.forward(27.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object BlueParkTouchSubmmersible2 {
object BlueParkTouchSubmmersibleRight {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, 62.0, (270.0).toRadians()))
.forward(27.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object RedHighBasket1 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, -62.0, (90.0).toRadians()))
.turn((90.0).toRadians())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object RedHighBasket2 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, -62.0, (90.0).toRadians()))
.turn((90.0).toRadians())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object RedHighChamber1 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, -62.0, (90.0).toRadians()))
.forward(28.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object RedHighChamber2 {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, -62.0, (90.0).toRadians()))
.forward(28.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object RedParkObservation1 {
object RedParkObservationLeft {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, -62.0, (90.0).toRadians()))
.strafeRight(72.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object RedParkObservation2 {
object RedParkObservationRight {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, -62.0, (90.0).toRadians()))
.strafeRight(48.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object RedParkTouchSubmmersible1 {
object RedParkTouchSubmmersibleLeft {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(-12.0, -62.0, (90.0).toRadians()))
.forward(27.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import java.io.File
import java.io.IOException
import javax.imageio.ImageIO

object RedParkTouchSubmmersible2 {
object RedParkTouchSubmmersibleRight {
@JvmStatic
fun main(args: Array<String>) {
val meepMeep = MeepMeep(800)

val myBot = DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width
.setConstraints(30.0, 30.0, Math.toRadians(180.0), Math.toRadians(170.0), 14.0)
.setConstraints(30.0, 30.0, Math.toRadians(170.0), Math.toRadians(170.0), 13.94)
.followTrajectorySequence { drive ->
drive.trajectorySequenceBuilder(Pose2d(12.0, -62.0, (90.0).toRadians()))
.forward(27.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.firstinspires.ftc.teamcode.opModes.auto.blue.park
package org.firstinspires.ftc.teamcode.opModes.auto.blue.park.left

import com.qualcomm.robotcore.eventloop.opmode.Autonomous
import com.qualcomm.robotcore.eventloop.opmode.OpMode
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.firstinspires.ftc.teamcode.opModes.auto.blue.park.left

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Blue Park (Submmersible) Left", group = "Submmersible", preselectTeleOp = "MainTeleOp")
class BlueParkSubmmersibleLeft: OpMode() {

private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_LEFT.startPose)
.forward(27.0)
.strafeLeft(48.0)
.forward(24.0)
.strafeRight(12.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)
}

override fun loop() {
driveSubsystem.update()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.firstinspires.ftc.teamcode.opModes.auto.blue.park.right

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Blue Park (Observation) Right", group = "Observation", preselectTeleOp = "MainTeleOp")
class BlueParkObservationRight: OpMode() {
private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_RIGHT.startPose)
.strafeRight(72.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)
}

override fun loop() {
driveSubsystem.update()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.firstinspires.ftc.teamcode.opModes.auto.blue.park.right

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Blue Park (Submmersible) Right", group = "Submmersible", preselectTeleOp = "MainTeleOp")
class BlueParkSubmmersibleRight: OpMode() {

private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.BLUE_RIGHT.startPose)
.forward(27.0)
.strafeLeft(24.0)
.forward(24.0)
.strafeRight(12.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)

}

override fun loop() {
driveSubsystem.update()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.firstinspires.ftc.teamcode.opModes.auto.red.park.left

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Red Park (Observation) Left", group = "Observation", preselectTeleOp = "MainTeleOp")
class RedParkObservationLeft: OpMode() {

private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.RED_LEFT.startPose)
.strafeRight(72.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)
}

override fun loop() {
driveSubsystem.update()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.firstinspires.ftc.teamcode.opModes.auto.red.park.left

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Red Park (Submmersible) Left", group = "Submmersible", preselectTeleOp = "MainTeleOp")
class RedParkSubmmersibleLeft: OpMode() {

private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.RED_LEFT.startPose)
.forward(27.0)
.strafeLeft(24.0)
.forward(24.0)
.strafeRight(12.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)
}

override fun loop() {
driveSubsystem.update()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.firstinspires.ftc.teamcode.opModes.auto.red.park.right

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.subsystems.drive.DriveSubsystem

@Autonomous(name = "Red Park (Observation) Right", group = "Observation", preselectTeleOp = "MainTeleOp")
class RedParkObservationRight: OpMode() {

private lateinit var driveSubsystem: DriveSubsystem

override fun init() {
driveSubsystem = DriveSubsystem(hardwareMap)

val trajectory = driveSubsystem.trajectorySequenceBuilder(AutoStartPose.RED_RIGHT.startPose)
.strafeRight(48.0)
.build()

driveSubsystem.followTrajectorySequenceAsync(trajectory)
}

override fun loop() {
driveSubsystem.update()
}
}
Loading

0 comments on commit 60406d9

Please sign in to comment.