Skip to content

Auto Programs#32

Open
NormalDuck wants to merge 22 commits into
masterfrom
auto-testing
Open

Auto Programs#32
NormalDuck wants to merge 22 commits into
masterfrom
auto-testing

Conversation

@NormalDuck
Copy link
Copy Markdown
Contributor

A collection of all auto programs.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive collection of autonomous programs for both Red and Blue alliance teams in an FTC robotics competition. The changes reorganize existing auto programs into alliance-specific packages and add new autonomous routines.

Key Changes:

  • Organized autonomous programs into /auto/red and /auto/blue packages with corresponding MeepMeep testing files
  • Updated MecanumDrive tuning parameters (drive model, feedforward, and path controller gains)
  • Added SmallTriangleAuto, MainAuto, and EmergencyAuto variants for both alliances

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
TeamCode/.../red/SmallTriangleAuto.java New red alliance small triangle autonomous routine
TeamCode/.../red/MainAuto.java Moved and updated main red autonomous program
TeamCode/.../red/EmergencyAuto.java Refactored emergency autonomous with updated trajectory
TeamCode/.../red/EmergencyAutoNonRR.java Package reorganization for non-RoadRunner emergency auto
TeamCode/.../blue/SmallTriangleAuto.java New blue alliance small triangle autonomous routine
TeamCode/.../blue/MainAuto.java New blue alliance main autonomous program
TeamCode/.../blue/EmergencyAuto.java New blue alliance emergency autonomous
TeamCode/.../RedSmallTriangleAuto.java Removed old file from incorrect package location
TeamCode/.../MecanumDrive.java Updated drive tuning parameters and gains
MeepMeepTesting/.../red/* Red alliance trajectory visualization files
MeepMeepTesting/.../blue/* Blue alliance trajectory visualization files
MeepMeepTesting/.../MeepMeepTesting.java Updated main testing file with new trajectories
MeepMeepTesting/.../BaseMeepMeepTesting.java New base template for MeepMeep testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


@Autonomous(name = "BlueMainAuto", group = "Autonomous")
public class MainAuto extends LinearOpMode {
;
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty statement serves no purpose and should be removed. This semicolon on its own line appears to be a typo.

Suggested change
;

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +45
public void runOpMode() {
double minYValue = -31;
double maxYValue = -54;

double startPoseX = -56;
double startPoseY = -45;

Pose2d startingPose = new Pose2d(startPoseX, startPoseY, Math.toRadians(-127));

MecanumDrive drive = new MecanumDrive(hardwareMap, startingPose);

Action trajectoryAction = drive.actionBuilder(startingPose)
.waitSeconds(6) //Replace this with shoot code

.strafeToSplineHeading(new Vector2d(-20,minYValue), Math.toRadians(-90))
//Start intake
.splineToConstantHeading(new Vector2d(-11,maxYValue),Math.toRadians(-90))

.strafeToSplineHeading(new Vector2d(startPoseX,startPoseY),Math.toRadians(-127))
//stop intake
.waitSeconds(6) //Replace this with the shoot code

.strafeToSplineHeading(new Vector2d(3,minYValue), Math.toRadians(-90))
//Start intake
.splineToConstantHeading(new Vector2d(12,maxYValue),Math.toRadians(-90))

.strafeToSplineHeading(new Vector2d(startPoseX,startPoseY),Math.toRadians(-127))
//stop intake
.waitSeconds(6)
.build(); //Replace this shooter code
}
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runOpMode() method is missing the initialization loop, waitForStart(), and Actions.runBlocking() call to execute the trajectory. This autonomous program will build the trajectory but never run it, making the autonomous non-functional. Add the initialization loop, waitForStart(), and Actions.runBlocking() similar to the red MainAuto implementation.

Copilot uses AI. Check for mistakes.
public class EmergencyAuto extends LinearOpMode {

double startPoseX = -56; //SmallTriangleAuto = 58
double startPoseY = 45; //SmallTriangleAuto = 0
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect startPoseY value for blue alliance. The comment indicates this should be different from SmallTriangleAuto, and the Pose2d construction on line 25 uses -45. The variable should be initialized as -45 to match the actual pose construction and mirror the red alliance's positioning.

Suggested change
double startPoseY = 45; //SmallTriangleAuto = 0
double startPoseY = -45; //SmallTriangleAuto = 0

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +67
// drive model parameters
// drive model parameters
public double inPerTick = 0.00197655585;
public double lateralInPerTick = 2.5976069280291227;
public double trackWidthTicks = 1;
// drive model parameters
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate comment lines. Remove the redundant '// drive model parameters' comments on lines 65 and 67, keeping only line 66.

Copilot uses AI. Check for mistakes.
.turn(Math.toRadians(150))
.waitSeconds(1)
.splineTo(new Vector2d(35,56),Math.toRadians(90))
..waitSeconds(1)
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syntax error with double dots before waitSeconds. Should be a single dot: '.waitSeconds(1)'

Suggested change
..waitSeconds(1)
.waitSeconds(1)

Copilot uses AI. Check for mistakes.
@danzuo
Copy link
Copy Markdown
Contributor

danzuo commented Nov 24, 2025

What's the current status of these modes? Are they good to go, or still need work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants