-
Notifications
You must be signed in to change notification settings - Fork 0
Gear Ratio Update #25
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
Warning Rate limit exceeded@Strflightmight09 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 1 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughUpdated numeric gear-ratio constants in three subsystems: ArmElevator ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/frc/trigon/robot/subsystems/armelevator/ArmElevatorConstants.java
(1 hunks)src/main/java/frc/trigon/robot/subsystems/endeffector/EndEffectorConstants.java
(1 hunks)src/main/java/frc/trigon/robot/subsystems/intake/IntakeConstants.java
(1 hunks)
INTAKE_MOTOR_GEAR_RATIO = 4, | ||
ANGLE_MOTOR_GEAR_RATIO = 28; | ||
ANGLE_MOTOR_GEAR_RATIO = 40; | ||
static final boolean FOC_ENABLED = true; |
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.
Update gravity feedforward after gear ratio change.
Switching the angle motor reduction from 28:1 to 40:1 increases mechanical leverage, so the existing config.Slot0.kG
(0.32151 real / 0.35427 sim) is now ~40% too large. On the real robot this constant is the only non-zero loop gain, so it will overdrive the wrist upward and fight the limit switches. Please re-identify the wrist feedforward gains (at minimum scale kG
by 28/40 ≈ 0.7, plus rerun SysId for the sim gains) so they match the new reduction before merging. (api.ctr-electronics.com)
Apply this diff as a first-order fix, then re-tune to measured values:
- config.Slot0.kG = RobotHardwareStats.isSimulation() ? 0.35427 : 0.32151;
+ config.Slot0.kG = RobotHardwareStats.isSimulation() ? 0.248 : 0.225;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
INTAKE_MOTOR_GEAR_RATIO = 4, | |
ANGLE_MOTOR_GEAR_RATIO = 28; | |
ANGLE_MOTOR_GEAR_RATIO = 40; | |
static final boolean FOC_ENABLED = true; | |
// Scale kG by 28/40≈0.7 after changing the gear ratio from 28:1→40:1 | |
config.Slot0.kG = RobotHardwareStats.isSimulation() ? 0.248 : 0.225; |
Co-Authored-By: Nummun14 <142012009+Nummun14@users.noreply.github.com>
Summary by CodeRabbit