-
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.
Merge branch 'new-structure' of https://github.com/ftc13100/IntoTheDe…
…ep-2025 into new-structure
- Loading branch information
Showing
13 changed files
with
402 additions
and
123 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...Planning/src/main/kotlin/com/example/pathplanning/legacy/blue/main/Sample1Plus3Testing.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,39 @@ | ||
package com.example.meepmeeptesting | ||
|
||
import com.acmerobotics.roadrunner.Pose2d | ||
import com.acmerobotics.roadrunner.Vector2d | ||
import com.noahbres.meepmeep.MeepMeep | ||
import com.noahbres.meepmeep.MeepMeep.Background | ||
import com.noahbres.meepmeep.core.toRadians | ||
import com.noahbres.meepmeep.roadrunner.DefaultBotBuilder | ||
|
||
object Sample1Plus3Testing { | ||
@JvmStatic | ||
fun main(args: Array<String>) { | ||
val meepMeep = MeepMeep(800) | ||
|
||
val myBot = | ||
DefaultBotBuilder(meepMeep) // Set bot constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width | ||
.setConstraints(50.0, 50.0, Math.toRadians(180.0), Math.toRadians(180.0), 4669.698132939092 * 0.002953423066) | ||
.build() | ||
|
||
myBot.runAction( | ||
myBot.drive.actionBuilder(Pose2d(10.0, 62.0, -90.0.toRadians())) | ||
.setTangent(-45.0) | ||
.splineToLinearHeading(Pose2d(56.0, 56.0, Math.toRadians(225.0)), Math.toRadians(45.0)) | ||
.turn(Math.toRadians(30.0)) | ||
.turn(Math.toRadians(-30.0)) | ||
.turn(Math.toRadians(55.0)) | ||
.turn(Math.toRadians(-55.0)) | ||
.turn(Math.toRadians(75.0)) | ||
.build() | ||
|
||
) | ||
|
||
meepMeep.setBackground(Background.FIELD_INTO_THE_DEEP_JUICE_DARK) | ||
.setDarkMode(true) | ||
.setBackgroundAlpha(0.95f) | ||
.addEntity(myBot) | ||
.start() | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/commands/intake/ThrowbackCommand.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,14 @@ | ||
package org.firstinspires.ftc.teamcode.commands.intake | ||
|
||
import com.arcrobotics.ftclib.command.CommandBase | ||
import org.firstinspires.ftc.teamcode.subsystems.intake.IntakeSubsystem | ||
|
||
class ThrowbackCommand( | ||
private val subsystem: IntakeSubsystem | ||
) : CommandBase() { | ||
override fun execute() = subsystem.wristUp() | ||
|
||
override fun isFinished() = subsystem.isPressed | ||
|
||
override fun end(interrupted: Boolean) = subsystem.reset() | ||
} |
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
55 changes: 55 additions & 0 deletions
55
TeamCode/src/main/kotlin/org/firstinspires/ftc/teamcode/opModes/auto/Sample1Plus3.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,55 @@ | ||
package org.firstinspires.ftc.teamcode.opModes.auto | ||
|
||
import com.acmerobotics.roadrunner.Action | ||
import com.acmerobotics.roadrunner.Pose2d | ||
import com.acmerobotics.roadrunner.Vector2d | ||
import com.arcrobotics.ftclib.command.CommandOpMode | ||
import com.arcrobotics.ftclib.command.InstantCommand | ||
import com.arcrobotics.ftclib.command.ParallelCommandGroup | ||
import com.arcrobotics.ftclib.command.SequentialCommandGroup | ||
import com.arcrobotics.ftclib.command.WaitCommand | ||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous | ||
import org.firstinspires.ftc.teamcode.commands.ActionCommand | ||
import org.firstinspires.ftc.teamcode.commands.arm.ArmCommand | ||
import org.firstinspires.ftc.teamcode.commands.elevator.ElevatorCommand | ||
import org.firstinspires.ftc.teamcode.commands.intake.IntakeBeltCommand | ||
import org.firstinspires.ftc.teamcode.commands.intake.IntakeCommand | ||
import org.firstinspires.ftc.teamcode.constants.AutoStartPose | ||
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.ElevatorSubsystem | ||
|
||
@Autonomous(name = "Sample 1 + 3") | ||
class Sample1Plus3 : CommandOpMode() { | ||
override fun initialize() { | ||
DriveSubsystem.initialize(hardwareMap) | ||
ArmSubsystem.initialize(hardwareMap) | ||
ElevatorSubsystem.initialize(hardwareMap) | ||
IntakeSubsystem.initialize(hardwareMap) | ||
|
||
val scorePreloaded = | ||
SequentialCommandGroup( | ||
InstantCommand({ DriveSubsystem.pose = AutoStartPose.BLUE_LEFT.startPose }), | ||
ParallelCommandGroup( | ||
ActionCommand( | ||
DriveSubsystem.actionBuilder(AutoStartPose.BLUE_LEFT::startPose) | ||
.setTangent(-45.0) | ||
.splineToLinearHeading(Pose2d(56.0, 56.0, Math.toRadians(225.0)), Math.toRadians(45.0)) .build(), | ||
DriveSubsystem | ||
), | ||
ArmCommand(Math.toRadians(90.0), ArmSubsystem).withTimeout(2000), | ||
IntakeBeltCommand(Math.toRadians(-60.0),IntakeSubsystem), | ||
InstantCommand({ IntakeSubsystem.closeClaw() }), | ||
), | ||
ElevatorCommand(30.0, ElevatorSubsystem).withTimeout(2000), | ||
IntakeBeltCommand(Math.toRadians(90.0), IntakeSubsystem).withTimeout(1000), | ||
InstantCommand({ IntakeSubsystem.openClaw() }), | ||
) | ||
|
||
schedule( | ||
scorePreloaded | ||
) | ||
} | ||
|
||
} |
Oops, something went wrong.