Didnt commit everything for some reason
This commit is contained in:
parent
cef200a864
commit
ff3ecf6d1d
@ -98,7 +98,7 @@ public class RobotContainer {
|
||||
);
|
||||
|
||||
manipulatorPivot.setDefaultCommand(
|
||||
manipulatorPivot.runAssistedArm(operator::getRightY)
|
||||
manipulatorPivot.runAssistedPivot(operator::getRightY)
|
||||
);
|
||||
|
||||
//Driver inputs
|
||||
|
@ -87,7 +87,7 @@ public class ManipulatorPivot extends SubsystemBase {
|
||||
* @param speed The velocity at which the arm rotates
|
||||
* @return Sets motor voltage to achieve the target velocity
|
||||
*/
|
||||
public Command runAssistedArm(DoubleSupplier speed) {
|
||||
public Command runAssistedPivot(DoubleSupplier speed) {
|
||||
double clampedSpeed = MathUtil.clamp(
|
||||
speed.getAsDouble(),
|
||||
-1,
|
||||
|
@ -13,23 +13,23 @@ import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine;
|
||||
import frc.robot.constants.ManipulatorPivotConstants;
|
||||
import frc.robot.subsystems.ManipulatorPivot;
|
||||
|
||||
public class ArmSysID extends ManipulatorPivot {
|
||||
public class ManipulatorPivotSysID extends ManipulatorPivot {
|
||||
private MutVoltage appliedVoltage;
|
||||
|
||||
private MutAngle armPosition;
|
||||
private MutAngle pivotPosition;
|
||||
|
||||
private MutAngularVelocity armVelocity;
|
||||
private MutAngularVelocity pivotVelocity;
|
||||
|
||||
private SysIdRoutine routine;
|
||||
|
||||
public ArmSysID() {
|
||||
public ManipulatorPivotSysID() {
|
||||
super();
|
||||
|
||||
appliedVoltage = Volts.mutable(0);
|
||||
|
||||
armPosition = Radians.mutable(0);
|
||||
pivotPosition = Radians.mutable(0);
|
||||
|
||||
armVelocity = RadiansPerSecond.mutable(0);
|
||||
pivotVelocity = RadiansPerSecond.mutable(0);
|
||||
|
||||
routine = new SysIdRoutine(
|
||||
ManipulatorPivotConstants.kSysIDConfig,
|
||||
@ -40,10 +40,10 @@ public class ArmSysID extends ManipulatorPivot {
|
||||
.voltage(appliedVoltage.mut_replace(
|
||||
armMotor.get() * RobotController.getBatteryVoltage(), Volts
|
||||
))
|
||||
.angularPosition(armPosition.mut_replace(
|
||||
.angularPosition(pivotPosition.mut_replace(
|
||||
getEncoderPosition(), Radians
|
||||
))
|
||||
.angularVelocity(armVelocity.mut_replace(
|
||||
.angularVelocity(pivotVelocity.mut_replace(
|
||||
getEncoderVelocity(), RadiansPerSecond
|
||||
));
|
||||
},
|
Loading…
Reference in New Issue
Block a user