Skip to content

Conversation

ShmayaR
Copy link
Collaborator

@ShmayaR ShmayaR commented Sep 28, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Improved arm motion accuracy and simulation by adjusting arm gearing.
    • Smoother elevator movement and simulation with corrected elevator gearing.
    • Enhanced end effector responsiveness and feedback after gear ratio update.
    • More precise intake angle positioning and improved limit handling via intake gearing adjustment.

Copy link

coderabbitai bot commented Sep 28, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 31aa307 and 3098be2.

📒 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)

Walkthrough

Updated numeric gear-ratio constants in three subsystems: ArmElevator (ARM_GEAR_RATIO 40→42, ELEVATOR_GEAR_RATIO 4→3), EndEffector (END_EFFECTOR_GEAR_RATIO 17→12.82), and Intake (ANGLE_MOTOR_GEAR_RATIO 28→40). No control-flow, API, or structural changes.

Changes

Cohort / File(s) Summary of Changes
Gear ratio constant updates
src/main/java/frc/trigon/robot/subsystems/armelevator/ArmElevatorConstants.java, src/main/java/frc/trigon/robot/subsystems/endeffector/EndEffectorConstants.java, src/main/java/frc/trigon/robot/subsystems/intake/IntakeConstants.java
Numeric updates to gear ratios used in configuration and simulation: ARM_GEAR_RATIO 40→42; ELEVATOR_GEAR_RATIO 4→3; END_EFFECTOR_GEAR_RATIO 17→12.82; ANGLE_MOTOR_GEAR_RATIO 28→40. No other logic or API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Climb Commands #20 — Edits to ArmElevator-related constants/enum in the same subsystem; likely related configuration adjustments.

Poem

I tweak my gears with whisker’d care,
Click and spin — ratios in the air,
Arm and elevator, gripper too,
Numbers nudged from old to new,
(\_/) — a rabbit hums, systems true. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Gear Ratio Update” succinctly and accurately describes the primary purpose of this pull request, which is to adjust various gear ratio constants across multiple subsystems.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 65daf99 and ff89d80.

📒 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)

Comment on lines 52 to 54
INTAKE_MOTOR_GEAR_RATIO = 4,
ANGLE_MOTOR_GEAR_RATIO = 28;
ANGLE_MOTOR_GEAR_RATIO = 40;
static final boolean FOC_ENABLED = true;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
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;

Strflightmight09 and others added 3 commits October 1, 2025 01:17
Co-Authored-By: Nummun14 <142012009+Nummun14@users.noreply.github.com>
Co-Authored-By: Nummun14 <142012009+Nummun14@users.noreply.github.com>
@Strflightmight09 Strflightmight09 merged commit 743395e into main Sep 30, 2025
4 checks passed
@Strflightmight09 Strflightmight09 deleted the update-gear-ratios branch September 30, 2025 23:46
@coderabbitai coderabbitai bot mentioned this pull request Oct 3, 2025
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.

2 participants