Conversation
|
bro I forgot to commit during the meeting what the heck |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a wheel radius characterization routine, which is a valuable addition for improving odometry accuracy. The implementation is well-structured, using a dedicated command and state class. My feedback focuses on improving robustness, maintainability, and safety. Key suggestions include avoiding hardcoded values for module counts, using a proper logger instead of System.out.println, making the characterization auto opt-in instead of enabled by default, and cleaning up some temporary/debug code.
src/main/java/frc/robot/subsystems/drivebase/CommandSwerveDrivetrain.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Code Review
This pull request introduces a wheel radius characterization command, which is a valuable tool for tuning the robot's autonomous routines. The implementation is well-structured, using a command-based approach with parallel execution for driving and measurement. My feedback focuses on improving maintainability by removing dead code and magic numbers, and a high-severity suggestion to change a default flag value to prevent accidental execution of the characterization routine during a match. Overall, this is a great contribution.
src/main/java/frc/robot/subsystems/drivebase/CommandSwerveDrivetrain.java
Outdated
Show resolved
Hide resolved
|
|
||
| public double[] getWheelRotations() { | ||
| double wheelCircumference = 2 * Math.PI * CompTunerConstants.kWheelRadius.abs(Meter); | ||
| double[] values = new double[4]; |
There was a problem hiding this comment.
Use wheels.count instead of hard-coding 4.
| wheelDelta *= 2 * Math.PI; | ||
| double wheelRadius = (state.gyroDelta * DRIVE_BASE_RADIUS) / wheelDelta; | ||
|
|
||
| System.out.println( |
There was a problem hiding this comment.
Should this be using our logger instead of System.out.println
| : Commands.none()) | ||
| .withName("Manual Coral Intake")); | ||
| // Ground Intake Hold out | ||
| // soloController |
Inspo: https://github.com/Mechanical-Advantage/AdvantageKit/blob/main/template_projects/sources/talonfx_swerve/src/main/java/frc/robot/commands/DriveCommands.java
see guys I contribute too
This was brought up to me on one of the programming discords as a way to measure your robots wheel radius.
This is critical for us, because this year we struggled with auto tuning, and being able to diagnose and find wheel radius instantly is incredibly important.
Want to test on monday 11/17 @Jetblackdragon