1 Commits

Author SHA1 Message Date
fb7f160a9f Updated motor/encoder names with that of SCDS Robot configuration 2024-08-29 12:24:10 -07:00

View File

@ -58,19 +58,18 @@ public final class MecanumDrive {
// TODO: fill in these values based on // TODO: fill in these values based on
// see https://ftc-docs.firstinspires.org/en/latest/programming_resources/imu/imu.html?highlight=imu#physical-hub-mounting // see https://ftc-docs.firstinspires.org/en/latest/programming_resources/imu/imu.html?highlight=imu#physical-hub-mounting
public RevHubOrientationOnRobot.LogoFacingDirection logoFacingDirection = public RevHubOrientationOnRobot.LogoFacingDirection logoFacingDirection =
RevHubOrientationOnRobot.LogoFacingDirection.DOWN; RevHubOrientationOnRobot.LogoFacingDirection.UP;
public RevHubOrientationOnRobot.UsbFacingDirection usbFacingDirection = public RevHubOrientationOnRobot.UsbFacingDirection usbFacingDirection =
RevHubOrientationOnRobot.UsbFacingDirection.LEFT; RevHubOrientationOnRobot.UsbFacingDirection.FORWARD;
// drive model parameters // drive model parameters
//public double inPerTick = 37619.0/112; public double inPerTick = 1;
public double inPerTick = 18760.5/56; public double lateralInPerTick = inPerTick;
public double lateralInPerTick = 293.2046574609792; public double trackWidthTicks = 0;
public double trackWidthTicks = 3968.437903995162;
// feedforward parameters (in tick units) // feedforward parameters (in tick units)
public double kS = 0.7748584778215575; public double kS = 0;
public double kV = 0.0005849868585467051; public double kV = 0;
public double kA = 0; public double kA = 0;
// path profile parameters (in inches) // path profile parameters (in inches)
@ -139,6 +138,8 @@ public final class MecanumDrive {
imu = lazyImu.get(); imu = lazyImu.get();
// TODO: reverse encoders if needed
// leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
} }
@Override @Override
@ -228,11 +229,6 @@ public final class MecanumDrive {
// TODO: reverse motor directions if needed // TODO: reverse motor directions if needed
// leftFront.setDirection(DcMotorSimple.Direction.REVERSE); // leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
rightFront.setDirection(DcMotorSimple.Direction.FORWARD);
rightBack.setDirection(DcMotorSimple.Direction.FORWARD);
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
leftBack.setDirection(DcMotorSimple.Direction.REVERSE);
// TODO: make sure your config has an IMU with this name (can be BNO or BHI) // TODO: make sure your config has an IMU with this name (can be BNO or BHI)
// see https://ftc-docs.firstinspires.org/en/latest/hardware_and_software_configuration/configuring/index.html // see https://ftc-docs.firstinspires.org/en/latest/hardware_and_software_configuration/configuring/index.html
@ -241,7 +237,7 @@ public final class MecanumDrive {
voltageSensor = hardwareMap.voltageSensor.iterator().next(); voltageSensor = hardwareMap.voltageSensor.iterator().next();
localizer = new ThreeDeadWheelLocalizer(hardwareMap, PARAMS.inPerTick); localizer = new DriveLocalizer();
FlightRecorder.write("MECANUM_PARAMS", PARAMS); FlightRecorder.write("MECANUM_PARAMS", PARAMS);
} }