Updated Follower to use PedroConstants
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.follower;
|
package org.firstinspires.ftc.teamcode.pedroPathing.follower;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedroConstants.BACK_LEFT_MOTOR_DIRECTION;
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedroConstants.BACK_RIGHT_MOTOR_DIRECTION;
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedroConstants.FRONT_LEFT_MOTOR_DIRECTION;
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedroConstants.FRONT_RIGHT_MOTOR_DIRECTION;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFFeedForward;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFSwitch;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFSwitch;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.forwardZeroPowerAcceleration;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.forwardZeroPowerAcceleration;
|
||||||
@ -10,10 +14,6 @@ import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstan
|
|||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorName;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorName;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightFrontMotorName;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightFrontMotorName;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightRearMotorName;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightRearMotorName;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorDirection;
|
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorDirection;
|
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightFrontMotorDirection;
|
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.rightRearMotorDirection;
|
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryDrivePIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryDrivePIDFFeedForward;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryHeadingPIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryHeadingPIDFFeedForward;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryTranslationalPIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryTranslationalPIDFFeedForward;
|
||||||
@ -159,10 +159,10 @@ public class Follower {
|
|||||||
* @param hardwareMap HardwareMap required
|
* @param hardwareMap HardwareMap required
|
||||||
* @param localizer the localizer you wish to use
|
* @param localizer the localizer you wish to use
|
||||||
*/
|
*/
|
||||||
public Follower(HardwareMap hardwareMap, Localizer localizer) {
|
// public Follower(HardwareMap hardwareMap, Localizer localizer) {
|
||||||
this.hardwareMap = hardwareMap;
|
// this.hardwareMap = hardwareMap;
|
||||||
initialize(localizer);
|
// initialize(localizer);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This initializes the follower.
|
* This initializes the follower.
|
||||||
|
@ -3,6 +3,7 @@ package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
|||||||
import static org.firstinspires.ftc.teamcode.PedroConstants.*;
|
import static org.firstinspires.ftc.teamcode.PedroConstants.*;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
|
import com.qualcomm.robotcore.hardware.DcMotorSimple;
|
||||||
|
|
||||||
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomFilteredPIDFCoefficients;
|
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomFilteredPIDFCoefficients;
|
||||||
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomPIDFCoefficients;
|
import org.firstinspires.ftc.teamcode.pedroPathing.util.CustomPIDFCoefficients;
|
||||||
@ -30,10 +31,10 @@ public class FollowerConstants {
|
|||||||
public static String rightFrontMotorName = FRONT_RIGHT_MOTOR;
|
public static String rightFrontMotorName = FRONT_RIGHT_MOTOR;
|
||||||
public static String rightRearMotorName = BACK_RIGHT_MOTOR;
|
public static String rightRearMotorName = BACK_RIGHT_MOTOR;
|
||||||
|
|
||||||
public static DcMotorSimple.Direction leftFrontMotorDirection = LEFT_FRONT_MOTOR_DIRECTION;
|
public static DcMotorSimple.Direction leftFrontMotorDirection = FRONT_RIGHT_MOTOR_DIRECTION;
|
||||||
public static DcMotorSimple.Direction rightFrontMotorDirection = FRONT_RIGHT_MOTOR_DIRECTION;
|
public static DcMotorSimple.Direction rightFrontMotorDirection = FRONT_RIGHT_MOTOR_DIRECTION;
|
||||||
public static DcMotorSimple.Direction leftRearMotorDirection = REAR_LEFT_MOTOR_DIRECTION;
|
public static DcMotorSimple.Direction leftRearMotorDirection = BACK_LEFT_MOTOR_DIRECTION;
|
||||||
public static DcMotorSimple.Direction rightRearMotorDirection = REAR_RIGHT_MOTOR_DIRECTION;
|
public static DcMotorSimple.Direction rightRearMotorDirection = BACK_RIGHT_MOTOR_DIRECTION;
|
||||||
|
|
||||||
// This section is for setting the actual drive vector for the front left wheel, if the robot
|
// This section is for setting the actual drive vector for the front left wheel, if the robot
|
||||||
// is facing a heading of 0 radians with the wheel centered at (0,0)
|
// is facing a heading of 0 radians with the wheel centered at (0,0)
|
||||||
|
Reference in New Issue
Block a user