-
Notifications
You must be signed in to change notification settings - Fork 2
Swerve drive proto #6
base: main
Are you sure you want to change the base?
Conversation
Someone needs to check the odometry work because I have no clue what to do with odometry lol. Current system is how I imagine odometry will go down. Will change it for when better odometry gets made and tested |
Shreyas to do: Add Better Odometry bc my odometry sucs Shorya and Lydia to do (Aaron Supervision): Format, read, understand, find better way to configure PID, also check Bonus assignment (making/editing the SwerveDrive.java command to create a second mode. Currently it's in FO or Field orientated mode (I think depends on if I did the odometry right, but after Shreyas puts in his odometry it should be FO). Find a way to make it DO or driver orientated). Yash to do (Aaron Supervision): Documentation and porting over the current utils to the mech tech support kit. This is the kit that will be passed down every year, so this is important job. Let me know if you need help with that. Optimize the SwerveModuleConfig.java file... Very messy and could use some polishing. Aaron to do: Jakson if available (if not I got it): Sean to do: Make Vision Lock on command
|
PID tuning completed for individual modules.
//Encoder Config | ||
this.steerEncoder = steer.getEncoder(); | ||
steerEncoder.setPositionConversionFactor(2048); | ||
this.steerAbsEncoder = new CANCoder(steerEncoderID); |
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.
Somewhere here you need to sync the absolute and regular encoder
steerAbsEncoder.configAbsoluteSensorRange(AbsoluteSensorRange.Unsigned_0_to_360); | ||
|
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.
This should be signed pm 180
public static double wheelDegreesToTicks(double degrees, double gearRatio) { | ||
return (degrees * 360.0 * gearRatio / 2048); | ||
} |
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.
needs to be flipped (2048/360)
(https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand)
Need to do PID for position first in order to truly have it work
Most of the effort will be in tuning PID