mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated swerve module optimizations and moved math to SwerveMath.
This commit is contained in:
@@ -46,6 +46,12 @@ public class SwerveModulePhysicalCharacteristics
|
||||
* Free speed rotations per minute of the motor, as described by the vendor.
|
||||
*/
|
||||
public final double angleMotorFreeSpeedRPM;
|
||||
/**
|
||||
* Angle motor kV used for second order kinematics to tune the feedforward, this variable should be adjusted so that
|
||||
* your drive train does not drift towards the direction you are rotating while you translate. When set to 0 the
|
||||
* calculated kV will be used.
|
||||
*/
|
||||
public final double angleMotorKV;
|
||||
|
||||
/**
|
||||
* Construct the swerve module physical characteristics.
|
||||
@@ -78,7 +84,8 @@ public class SwerveModulePhysicalCharacteristics
|
||||
double driveMotorRampRate,
|
||||
double angleMotorRampRate,
|
||||
int driveEncoderPulsePerRotation,
|
||||
int angleEncoderPulsePerRotation)
|
||||
int angleEncoderPulsePerRotation,
|
||||
double angleMotorKV)
|
||||
{
|
||||
this.wheelGripCoefficientOfFriction = wheelGripCoefficientOfFriction;
|
||||
this.optimalVoltage = optimalVoltage;
|
||||
@@ -94,6 +101,7 @@ public class SwerveModulePhysicalCharacteristics
|
||||
this.angleMotorCurrentLimit = angleMotorCurrentLimit;
|
||||
this.driveMotorRampRate = driveMotorRampRate;
|
||||
this.angleMotorRampRate = angleMotorRampRate;
|
||||
this.angleMotorKV = angleMotorKV;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,6 +142,6 @@ public class SwerveModulePhysicalCharacteristics
|
||||
driveMotorRampRate,
|
||||
angleMotorRampRate,
|
||||
driveEncoderPulsePerRotation,
|
||||
angleEncoderPulsePerRotation);
|
||||
angleEncoderPulsePerRotation, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user