Auto Programs#32
Conversation
*Emergency auto is not straight but going straight then doing a small turn but its fine for now
Auto for the first comp
Optimizing red auto for using small triangle
There was a problem hiding this comment.
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/redand/auto/bluepackages 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 { | ||
| ; |
There was a problem hiding this comment.
Empty statement serves no purpose and should be removed. This semicolon on its own line appears to be a typo.
| ; |
| 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 | ||
| } |
There was a problem hiding this comment.
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.
| public class EmergencyAuto extends LinearOpMode { | ||
|
|
||
| double startPoseX = -56; //SmallTriangleAuto = 58 | ||
| double startPoseY = 45; //SmallTriangleAuto = 0 |
There was a problem hiding this comment.
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.
| double startPoseY = 45; //SmallTriangleAuto = 0 | |
| double startPoseY = -45; //SmallTriangleAuto = 0 |
| // drive model parameters | ||
| // drive model parameters | ||
| public double inPerTick = 0.00197655585; | ||
| public double lateralInPerTick = 2.5976069280291227; | ||
| public double trackWidthTicks = 1; | ||
| // drive model parameters |
There was a problem hiding this comment.
Duplicate comment lines. Remove the redundant '// drive model parameters' comments on lines 65 and 67, keeping only line 66.
| .turn(Math.toRadians(150)) | ||
| .waitSeconds(1) | ||
| .splineTo(new Vector2d(35,56),Math.toRadians(90)) | ||
| ..waitSeconds(1) |
There was a problem hiding this comment.
Syntax error with double dots before waitSeconds. Should be a single dot: '.waitSeconds(1)'
| ..waitSeconds(1) | |
| .waitSeconds(1) |
|
What's the current status of these modes? Are they good to go, or still need work? |
A collection of all auto programs.