-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Poses (o-ωq)).oO #189
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
base: main
Are you sure you want to change the base?
Fix Poses (o-ωq)).oO #189
Conversation
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 adjusts field pose constants for reef branches and refactors algae pose definitions to use dedicated endpoints before computing midpoints.
- Updates REEF_A–REEF_L Pose2d constants to new positions/angles.
- Introduces ALGAE_A–ALGAE_L endpoints and derives ALGAE_AB–ALGAE_KL as midpoints between those endpoints.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
- Reduce tolerances
- set pose align to only end if in auto
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| isPoseAligned = subDrivetrain.isAtPosition(closestPose, poseGroup.distanceTolerance) && | ||
| subDrivetrain.isAtRotation(closestPose.getRotation(), poseGroup.rotationTolerance); | ||
| return isPoseAligned; | ||
| return isPoseAligned & DriverStation.isAutonomous(); |
Copilot
AI
Oct 18, 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.
Use the short-circuit logical AND (&&) instead of bitwise AND (&) for booleans to avoid unnecessary evaluation and match Java conventions: return isPoseAligned && DriverStation.isAutonomous();
| return isPoseAligned & DriverStation.isAutonomous(); | |
| return isPoseAligned && DriverStation.isAutonomous(); |
| import frc.robot.Constants.PoseDriveGroup; | ||
| import frc.robot.Constants.constField; | ||
| import frc.robot.Field; | ||
| import frc.robot.Robot; |
Copilot
AI
Oct 18, 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.
This import appears unused in this file. Please remove it to keep imports clean, unless you plan to use it in this class.
| import frc.robot.Robot; |
| public static final double SLOW_MODE_MULTIPLIER = 0.5; | ||
|
|
||
| public static final boolean INVERT_ROTATION = true; | ||
| public static final boolean INVERT_ROTATION = !Robot.isSimulation(); |
Copilot
AI
Oct 18, 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] To reduce coupling between Constants and your Robot class, prefer WPILib's RobotBase utility: import edu.wpi.first.wpilibj.RobotBase; and use public static final boolean INVERT_ROTATION = !RobotBase.isSimulation();
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-Authored-By: Yutong Zhu <3681247216@qq.com>
Co-Authored-By: Yutong Zhu <3681247216@qq.com>
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
@TaylerUva please test it...