You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* updated akit stuff, and added more gear ratio calc constructors
* Realized some of these constructors are really unnecacery
* this bugged me
* made spark sim more efficiant, and removed usage of deprecated methods
* added jdocs, and corrected cf in spark sim
* jdoc changes
* name change
* This constructor takes a motor to run the gear ratio calculation on, and to measure the distance the rotor travels.
37
+
* It also takes an encoder to measure the distance traveled.
38
+
* This constructor will record the starting positions without any delay. This might be problematic when the subsystem has backlash.
39
+
* When you have backlash and want to account for it with a measuring delay, use {@link GearRatioCalculationCommand#GearRatioCalculationCommand(TalonFXMotor, CANcoderEncoder, double, SubsystemBase)}.
40
+
*
41
+
* @param motor the motor that drives the rotor
42
+
* @param encoder the encoder that measures the distance traveled
43
+
* @param requirement the subsystem that this command requires
* This constructor takes a motor to run the gear ratio calculation on, and to measure the distance the rotor travels.
@@ -51,11 +66,29 @@ public GearRatioCalculationCommand(TalonFXMotor motor, CANcoderEncoder encoder,
51
66
);
52
67
}
53
68
69
+
/**
70
+
* Creates a new GearRatioCalculationCommand.
71
+
* This constructor will record the starting positions without any delay. This might be problematic when the system has backlash.
72
+
* When you have backlash and want to account for it with a measuring delay, use {@link GearRatioCalculationCommand#GearRatioCalculationCommand(DoubleSupplier, DoubleSupplier, DoubleConsumer, double, SubsystemBase)}.
73
+
*
74
+
* @param rotorPositionSupplier a supplier that returns the current position of the rotor. Must be in the same units as the encoder position supplier
75
+
* @param encoderPositionSupplier a supplier that returns the current position of the encoder. Must be in the same units as the rotor position supplier
76
+
* @param runGearRatioCalculation a consumer that drives the motor with a given voltage
77
+
* @param requirement the subsystem that this command requires
* A command for characterizing the wheel radius of each module of a swerve drive system by calculating the radius of each drive wheel based on rotational data and robot yaw during operation.
* Gets the velocity from the physics simulation in the units set in the conversion factor. This is used in the iterate method to update the motor simulation.
126
+
*
127
+
* @return the velocity from the physics simulation
0 commit comments