Skip to content

Middle area red auto path#30

Open
Glowdisk wants to merge 5 commits into
masterfrom
MiddleAreaRedAutoPaths
Open

Middle area red auto path#30
Glowdisk wants to merge 5 commits into
masterfrom
MiddleAreaRedAutoPaths

Conversation

@Glowdisk
Copy link
Copy Markdown
Contributor

This auto is intended for the red team

This is similar to main auto, but instead of being close to the the goal, its farther away on the right angle of the big triangle

@Glowdisk Glowdisk changed the title Middle area red auto paths Middle area red auto path Nov 11, 2025
@NormalDuck NormalDuck requested a review from Copilot November 18, 2025 00:35
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 adds a new autonomous mode for the red team called "RedMainMiddleAreaAuto", which positions the robot farther away from the goal at the right angle of the big triangle, compared to the main auto path. The changes include creating the new auto class and updating the MeepMeep testing configuration to visualize this path.

Key changes:

  • New RedMainMiddleAreaAuto autonomous class with trajectory path starting at position (-56, 45) and moving to (0, 0) before collecting game pieces
  • Updated MeepMeepTesting configuration to use the new trajectory path instead of the previous straight line to goal path
  • Added commented code block documenting the middle area auto path

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auto/RedMainMiddleAreaAuto.java New autonomous mode implementing the middle area path with intake and shooting actions
MeepMeepTesting/src/main/java/com/example/meepmeeptesting/MeepMeepTesting.java Updated red bot trajectory to test the new middle area path and added commented documentation

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


@Override
public void runOpMode(){
Pose2d startingPose = new Pose2d(-startPoseX, startPoseY, Math.toRadians(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.

The startPoseX variable is already set to -56, but it is negated again here, resulting in a starting position of (56, 45) instead of the intended (-56, 45). Remove the negation: new Pose2d(startPoseX, startPoseY, Math.toRadians(0))

Suggested change
Pose2d startingPose = new Pose2d(-startPoseX, startPoseY, Math.toRadians(0));
Pose2d startingPose = new Pose2d(startPoseX, startPoseY, Math.toRadians(0));

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +47
public void runOpMode(){
Pose2d startingPose = new Pose2d(-startPoseX, startPoseY, Math.toRadians(0));

MecanumDrive drive = new MecanumDrive(hardwareMap, startingPose);

Action trajectoryAction = drive.actionBuilder(startingPose)
.strafeToSplineHeading(new Vector2d(0,0),Math.toRadians(135))

.waitSeconds(6) //Replace this with shoot code

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

.strafeToSplineHeading(new Vector2d(0,0),Math.toRadians(135))
//stop intake
.waitSeconds(6) //Replace this with the shoot code

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

.strafeToSplineHeading(new Vector2d(0,0),Math.toRadians(135))
//stop intake
.waitSeconds(6)
//Replace this shooter code
.build();
}
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 creates a trajectoryAction but never waits for start or executes it. Add waitForStart() after building the trajectory, then execute the action using Actions.runBlocking(new SequentialAction(trajectoryAction)) similar to RedEmergencyAuto.java. You'll also need to import the required classes: com.acmerobotics.roadrunner.SequentialAction and com.acmerobotics.roadrunner.ftc.Actions.

Copilot uses AI. Check for mistakes.
.strafeToSplineHeading(new Vector2d(0,0),Math.toRadians(135))
//stop intake
.waitSeconds(6)
//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.

Corrected 'shooter' to 'shoot' for consistency with similar comments on lines 28 and 36.

Suggested change
//Replace this shooter code
//Replace this with shoot code

Copilot uses AI. Check for mistakes.

.strafeToSplineHeading(new Vector2d(0,0),Math.toRadians(135))
//stop intake
.waitSeconds(6) //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.

Corrected 'shooter' to 'shoot' for consistency with similar comments.

Suggested change
.waitSeconds(6) //Replace this shooter code
.waitSeconds(6) //Replace this with shoot code

Copilot uses AI. Check for mistakes.
@Glowdisk Glowdisk requested a review from NormalDuck December 4, 2025 05:58
@NormalDuck
Copy link
Copy Markdown
Contributor

Please port it to blue auto too.

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.

3 participants