-
Notifications
You must be signed in to change notification settings - Fork 0
Created my first OpMode for Mecanum Drive #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BdogAsix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a
There was a problem hiding this 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 new learning OpMode for mecanum drive control, created by Chase. It follows the established pattern of other learning OpModes in the team's repository, using the Constants class for motor names and implementing basic field-centric mecanum drive kinematics.
- Uses Constants class for motor name configuration
- Implements standard mecanum drive kinematics with joystick control
- Sets motor directions for proper mecanum drive operation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @Override | ||
| public void loop() { | ||
| double y = gamepad1.left_stick_y; |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Y-axis should be negated. In FTC, the gamepad's left_stick_y returns negative values when pushed forward. Other learning OpModes in this directory (BrodysFIRSTOpMode.java and NicksFIRSTJavaOpMode.java) use -gamepad1.left_stick_y to ensure pushing the stick forward makes the robot move forward. Without negation, the robot will move backward when the stick is pushed forward.
| double y = gamepad1.left_stick_y; | |
| double y = -gamepad1.left_stick_y; |
|
|
||
| import org.firstinspires.ftc.teamcode.Constants; | ||
|
|
||
| @TeleOp(name="Chase's OpMode", group = "Example OpMode") |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing @disabled annotation. All other learning OpModes (BrodysFIRSTOpMode.java and NicksFIRSTJavaOpMode.java) include the @disabled annotation to prevent accidental selection during competition. Add @Disabled on line 11 before the class declaration for consistency with the team's learning OpMode pattern.
| @TeleOp(name="Chase's OpMode", group = "Example OpMode") | |
| @TeleOp(name="Chase's OpMode", group = "Example OpMode") | |
| @com.qualcomm.robotcore.eventloop.opmode.Disabled |
|
|
||
| telemetry.addData("Status", "Running"); | ||
| telemetry.update(); | ||
| } |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Missing stop() method override. For consistency with other learning OpModes in this directory, consider adding a stop() method that updates telemetry status to 'Stopped', similar to BrodysFIRSTOpMode.java and NicksFIRSTJavaOpMode.java. This helps students understand the complete OpMode lifecycle.
| } | |
| } | |
| @Override | |
| public void stop() { | |
| telemetry.addData("Status", "Stopped"); | |
| telemetry.update(); | |
| } |
Before issuing a pull request: