Skip to content

Conversation

@tbowers7
Copy link
Collaborator

@tbowers7 tbowers7 commented Jan 15, 2025

Actual problem seems to be a Mars Climate Orbiter - style issue with units. When wrapping the CTRE swerve code, assumed wheel radius returned was in inches -- it was in meters. See the problem?

Try canceling all scheduled commands during autoInit(), and make sure all PathPlanner PIDs point to the same place in Constants.java.

Fixes #33 ?

Also, align all PathPlanner calls to those in the AK Template and remove the manual gyro reset function.

Oh, and any vendordep updates that have been released, as well.

@tbowers7 tbowers7 added this to the v1.0.0 milestone Jan 15, 2025
@tbowers7 tbowers7 linked an issue Jan 15, 2025 that may be closed by this pull request
@tbowers7 tbowers7 changed the title Add a command cancel in autoInit() Align code with AK2025 TalonFX Template Jan 16, 2025
@tbowers7 tbowers7 added the bug Something isn't working label Jan 17, 2025
Make sure all PathPlanner PIDs point to values in `Constants.java`.

	modified:   src/main/java/frc/robot/Constants.java
	modified:   src/main/java/frc/robot/Robot.java
	modified:   src/main/java/frc/robot/subsystems/drive/Drive.java
Aligned all of the PathPlanner calls and other bits in the `Robot.java` file to
match what is in the AK2025 TalonFX Swerve Template.  The latter works fine
with PathPlanner, and here's hoping these adjustments make RBSI do the same!

Also, a couple more vendordep updates.

	modified:   src/main/java/frc/robot/Constants.java
	modified:   src/main/java/frc/robot/Robot.java
	modified:   src/main/java/frc/robot/RobotContainer.java
	modified:   vendordeps/photonlib.json
	renamed:    vendordeps/yagsl-2025.2.0.json -> vendordeps/yagsl-2025.2.1.json
Not sure if this is what's causing PathPlanner to behave oddly, but it's
something not in the AK2025 templates.

The other thing to try will be to remove the IMU accelerometer readout from
the Accelerometer subsystem, with the thought that the extra read may be
messing with the PathPlanner gyro settings.

	modified:   src/main/java/frc/robot/RobotContainer.java
	modified:   src/main/java/frc/robot/subsystems/drive/Drive.java
	modified:   src/main/java/frc/robot/subsystems/drive/GyroIO.java
	modified:   src/main/java/frc/robot/subsystems/drive/GyroIONavX.java
	modified:   src/main/java/frc/robot/subsystems/drive/GyroIOPigeon2.java
In hopes this solves some of our driving issues.

	modified:   src/main/java/frc/robot/Constants.java
	modified:   src/main/java/frc/robot/RobotContainer.java
	modified:   src/main/java/frc/robot/generated/TunerConstants.java
	modified:   src/main/java/frc/robot/subsystems/drive/Drive.java
	new file:   src/main/java/frc/robot/util/RBSIParsing.java
	renamed:    vendordeps/yagsl-2025.2.1.json -> vendordeps/yagsl-2025.2.2.json
Assumed wheel radius value was in inches, so converted it to meters... problem
is it was already in meters.  Oops.

This made the code think the wheel was tiny, hence needing to apply huge
angular velocity to make the chassis run at the expected speed.  Yeah...

	modified:   src/main/deploy/pathplanner/paths/Consistancy Test.path
	modified:   src/main/java/frc/robot/Constants.java
	modified:   src/main/java/frc/robot/commands/ChoreoAutoController.java
	modified:   src/main/java/frc/robot/commands/DriveCommands.java
	modified:   src/main/java/frc/robot/subsystems/drive/Drive.java
	modified:   src/main/java/frc/robot/subsystems/drive/ModuleIOBlended.java
	modified:   src/main/java/frc/robot/subsystems/drive/ModuleIOSpark.java
	modified:   src/main/java/frc/robot/subsystems/drive/ModuleIOSparkCANcoder.java
	modified:   src/main/java/frc/robot/subsystems/drive/SwerveConstants.java
	renamed:    vendordeps/ReduxLib-2025.0.0.json -> vendordeps/ReduxLib-2025.0.1.json
@tbowers7 tbowers7 force-pushed the 33-pathplanner-auto-not-working branch from 50962f4 to 25fe42a Compare January 20, 2025 21:00
@tbowers7 tbowers7 changed the title Align code with AK2025 TalonFX Template Fix Unit Problem and Align code with AK2025 TalonFX Template Jan 20, 2025
@tbowers7 tbowers7 merged commit 64c3c5a into develop Jan 20, 2025
4 checks passed
@tbowers7 tbowers7 deleted the 33-pathplanner-auto-not-working branch January 20, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pathplanner Auto not working

2 participants