double v1 = (radius * Math.cos(ang) + turnCon) * getMultiplier(); | |
double v2 = (radius * Math.sin(ang) - turnCon) * getMultiplier(); | |
double v3 = (radius * Math.sin(ang) + turnCon) * getMultiplier(); | |
double v4 = (radius * Math.cos(ang) - turnCon) * getMultiplier(); | |
robot.motorLeftFront.setPower(v1); | |
robot.motorRightFront.setPower(v2); | |
robot.motorLeftRear.setPower(v3); | |
robot.motorRightRear.setPower(v4); | |
if (addTelemetry && telemetry != null) { | |
telemetry.addLine(Util.createLevel((float) v1)); | |
telemetry.addLine(Util.createLevel((float) v2)); | |
telemetry.addLine(Util.createLevel((float) v3)); | |
telemetry.addLine(Util.createLevel((float) v4)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
https://github.com/TWHS-Pastabots/ultimate-goal/blob/042c75a01a5d204ab0e4aeaa5b2a2f588f45fa93/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/DriveTrain.java#L254-L269