Skip to content

Added fallback for turret#169

Closed
Fatblabs wants to merge 36 commits intomainfrom
sotm-fallback
Closed

Added fallback for turret#169
Fatblabs wants to merge 36 commits intomainfrom
sotm-fallback

Conversation

@Fatblabs
Copy link
Copy Markdown
Contributor

@Fatblabs Fatblabs commented Apr 1, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the AutoDriveRotate command to utilize a centralized Subsystems container and the LaunchCalculator for determining target rotation. The update also incorporates a specific center of rotation for swerve requests based on turret translation. Feedback was provided regarding the execute method, highlighting critical issues such as potential null pointer exceptions for the turret subsystem, unit mismatches between degrees and radians in the PID controller, and the omission of a required 180-degree offset for correct robot alignment during launching.

Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
jamesdooley4
jamesdooley4 previously approved these changes Apr 1, 2026
@Jetblackdragon
Copy link
Copy Markdown
Contributor

needs more testing before merging

Comment thread src/main/java/frc/robot/Controls.java Outdated
Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
Comment thread src/main/java/frc/robot/Controls.java Outdated
Comment thread src/main/java/frc/robot/subsystems/LaunchCalculator.java Outdated
@Fatblabs
Copy link
Copy Markdown
Contributor Author

Fatblabs commented Apr 5, 2026

Just need a code review before testing and merging

@Fatblabs Fatblabs linked an issue Apr 5, 2026 that may be closed by this pull request
Comment thread src/main/java/frc/robot/Controls.java Outdated
Comment thread src/main/java/frc/robot/Controls.java Outdated
Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
Comment thread src/main/java/frc/robot/subsystems/launcher/TurretSubsystem.java Outdated
Comment thread src/main/java/frc/robot/Controls.java Outdated
Comment thread src/main/java/frc/robot/Controls.java Outdated
@Fatblabs Fatblabs requested a review from jamesdooley4 April 7, 2026 18:25
@Fatblabs
Copy link
Copy Markdown
Contributor Author

Fatblabs commented Apr 9, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly refactors the AutoDriveRotate command to utilize a more dynamic approach for calculating target rotation, integrating the LaunchCalculator and the Subsystems object. The autoRotate method signature has been updated, requiring corresponding changes in its calls within Controls.java (including a unit conversion for turret position from degrees to radians) and AutoLogic.java. Additionally, the LauncherSubsystem now includes a new isAtTargetFallback method and the TurretSubsystem has been updated to support variable turret tolerances. The review identifies two key areas for improvement: ensuring the turretPos parameter is correctly supplied in the AutoDriveRotate.autoRotate call within AutoLogic.java (with a specific suggestion for simulation purposes), and updating the Javadoc for AutoDriveRotate.java to reflect its new dynamic behavior, as the current documentation is contradictory.

Comment thread src/main/java/frc/robot/subsystems/auto/AutoLogic.java
Comment thread src/main/java/frc/robot/subsystems/auto/AutoDriveRotate.java Outdated
@Jetblackdragon
Copy link
Copy Markdown
Contributor

Done differently in dcmps branch not sure why you need sotm for this

@Fatblabs
Copy link
Copy Markdown
Contributor Author

drive base shoot on the move
image

@Jetblackdragon
Copy link
Copy Markdown
Contributor

launcher aim command already uses it

@RobototesProgrammers
Copy link
Copy Markdown
Contributor

no reply so bye bye

@Jetblackdragon Jetblackdragon deleted the sotm-fallback branch April 14, 2026 04:58
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.

Add reliable turret fallback

5 participants