changing motor configuration is easier and readme updates
This commit is contained in:
@ -24,9 +24,8 @@ that applies to you and follow the directions there.
|
|||||||
|
|
||||||
# Drive Encoders
|
# Drive Encoders
|
||||||
* First, you'll need all of your drive motors to have encoders attached.
|
* First, you'll need all of your drive motors to have encoders attached.
|
||||||
* Then, go to `DriveEncoderLocalizer.java`. Go to where it tells you to replace the current statements with your encoder ports in the constructor.
|
* Then, go to `DriveEncoderLocalizer.java`. The motor names are already set, so you don't have to do
|
||||||
Replace the `deviceName` parameter with the name of the port that the encoder for each motor is connected
|
anything to change the encoder names there.
|
||||||
to. The names of the variables is where on the robot the corresponding motor should be.
|
|
||||||
* Then, reverse the direction of any encoders so that all encoders tick up when the robot is moving forward.
|
* Then, reverse the direction of any encoders so that all encoders tick up when the robot is moving forward.
|
||||||
* Now, you'll have to tune the multipliers. These convert your measurements from encoder ticks into
|
* Now, you'll have to tune the multipliers. These convert your measurements from encoder ticks into
|
||||||
inches or radians, essentially scaling your localizer so that your numbers are accurate to the real
|
inches or radians, essentially scaling your localizer so that your numbers are accurate to the real
|
||||||
|
@ -23,6 +23,6 @@ implementation 'com.acmerobotics.dashboard:dashboard:0.4.5'
|
|||||||
4. Find the `build.gradle` file under the `teamcode` folder.
|
4. Find the `build.gradle` file under the `teamcode` folder.
|
||||||
5. In this gradle file, add the following dependency:
|
5. In this gradle file, add the following dependency:
|
||||||
```
|
```
|
||||||
implementation 'com.fasterxml/jackson.core:jacson-databind:2.12.7'
|
implementation 'com.fasterxml/jackson.core:jackson-databind:2.12.7'
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.21'
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.21'
|
||||||
```
|
```
|
@ -15,8 +15,8 @@ measurements will be in centimeters.
|
|||||||
|
|
||||||
## Tuning
|
## Tuning
|
||||||
* To start with, we need the mass of the robot in kg. This is used for the centripetal force correction,
|
* To start with, we need the mass of the robot in kg. This is used for the centripetal force correction,
|
||||||
and the mass should be put on line `80` in the `FollowerConstants` class under the
|
and the mass, with the variable name `mass`, should be put on line `86` in the `FollowerConstants`
|
||||||
`tuning` package.
|
class under the `tuning` package.
|
||||||
|
|
||||||
* Next, we need to find the preferred mecanum drive vectors. The rollers on mecanum wheels point at a
|
* Next, we need to find the preferred mecanum drive vectors. The rollers on mecanum wheels point at a
|
||||||
45 degree angle from the forward direction, but the actual direction the force is output is actually
|
45 degree angle from the forward direction, but the actual direction the force is output is actually
|
||||||
@ -26,9 +26,9 @@ measurements will be in centimeters.
|
|||||||
Dashboard under the dropdown for each respective class, but higher distances work better. After the
|
Dashboard under the dropdown for each respective class, but higher distances work better. After the
|
||||||
distance has finished running, the end velocity will be output to telemetry. The robot may continue
|
distance has finished running, the end velocity will be output to telemetry. The robot may continue
|
||||||
to drift a little bit after the robot has finished running the distance, so make sure you have
|
to drift a little bit after the robot has finished running the distance, so make sure you have
|
||||||
plenty of room. Once you're done, put the velocity for the `Forward Velocity Tuner` on line `27` in
|
plenty of room. Once you're done, put the velocity for the `Forward Velocity Tuner` on line `33` in
|
||||||
the `FollowerConstants` class, and the velocity for the `Strafe Velocity Tuner` on line `28` in the
|
the `FollowerConstants` class, and the velocity for the `Strafe Velocity Tuner` on line `34` in the
|
||||||
`FollowerConstants` class.
|
`FollowerConstants` class. The variable names should be `xMovement` and `yMovement`, respectively.
|
||||||
|
|
||||||
* The last set of automatic tuners you'll need to run are the zero power acceleration tuners. These
|
* The last set of automatic tuners you'll need to run are the zero power acceleration tuners. These
|
||||||
find the rate at which your robot decelerates when power is cut from the drivetrain. This is used to
|
find the rate at which your robot decelerates when power is cut from the drivetrain. This is used to
|
||||||
@ -41,9 +41,10 @@ measurements will be in centimeters.
|
|||||||
which point it will display the deceleration in telemetry. This robot will need to drift to a stop
|
which point it will display the deceleration in telemetry. This robot will need to drift to a stop
|
||||||
to properly work, and the higher the velocity the greater the drift distance, so make sure you have
|
to properly work, and the higher the velocity the greater the drift distance, so make sure you have
|
||||||
enough room. Once you're done, put the zero power acceleration for the
|
enough room. Once you're done, put the zero power acceleration for the
|
||||||
`Forward Zero Power Acceleration Tuner` on line `88` in the `FollowerConstants` class and the zero
|
`Forward Zero Power Acceleration Tuner` on line `94` in the `FollowerConstants` class and the zero
|
||||||
power acceleration for the `Lateral Zero Power Acceleration Tuner` on line `92` in the
|
power acceleration for the `Lateral Zero Power Acceleration Tuner` on line `98` in the
|
||||||
`FollowerConstants` class.
|
`FollowerConstants` class. The variable names should be `forwardZeroPowerAcceleration` and
|
||||||
|
`lateralZeroPowerAcceleration`, respectively.
|
||||||
|
|
||||||
* After this, we will want to tune the translational PID. Go to FTC Dashboard and disable all but
|
* After this, we will want to tune the translational PID. Go to FTC Dashboard and disable all but
|
||||||
the `useTranslational` checkboxes under the `Follower` tab. Then, run `StraightBackAndForth`. Make
|
the `useTranslational` checkboxes under the `Follower` tab. Then, run `StraightBackAndForth`. Make
|
||||||
@ -69,8 +70,8 @@ measurements will be in centimeters.
|
|||||||
`zeroPowerAccelerationMultiplier`. This determines how fast your robot will decelerate as a factor
|
`zeroPowerAccelerationMultiplier`. This determines how fast your robot will decelerate as a factor
|
||||||
of how fast your robot will coast to a stop. Honestly, this is up to you. I personally used 4, but
|
of how fast your robot will coast to a stop. Honestly, this is up to you. I personally used 4, but
|
||||||
what works best for you is most important. Higher numbers will cause a faster brake, but increase
|
what works best for you is most important. Higher numbers will cause a faster brake, but increase
|
||||||
oscillations at the end. Lower numbers will do the opposite. This can be found on line `101` in
|
oscillations at the end. Lower numbers will do the opposite. This can be found on line `107` in
|
||||||
`FollowerConstants`. The drive PID is much, much more sensitive than the others. For reference,
|
`FollowerConstants`, named `zeroPowerAccelerationMultiplier`. The drive PID is much, much more sensitive than the others. For reference,
|
||||||
my P values were in the hundredths and thousandths place values, and my D values were in the hundred
|
my P values were in the hundredths and thousandths place values, and my D values were in the hundred
|
||||||
thousandths and millionths place values. To tune this, enable `useDrive`, `useHeading`, and
|
thousandths and millionths place values. To tune this, enable `useDrive`, `useHeading`, and
|
||||||
`useTranslational` in the `Follower` dropdown in FTC Dashboard. Next, run `StraightBackAndForth`
|
`useTranslational` in the `Follower` dropdown in FTC Dashboard. Next, run `StraightBackAndForth`
|
||||||
@ -95,7 +96,7 @@ measurements will be in centimeters.
|
|||||||
* Finally, we will want to tune the centripetal force correction. This is a pretty simple tune. Open
|
* Finally, we will want to tune the centripetal force correction. This is a pretty simple tune. Open
|
||||||
up FTC Dashboard and enable everything under the `Follower` tab. Then, run `CurvedBackAndForth`
|
up FTC Dashboard and enable everything under the `Follower` tab. Then, run `CurvedBackAndForth`
|
||||||
and turn off its timer. If you notice the robot is correcting towards the inside of the curve
|
and turn off its timer. If you notice the robot is correcting towards the inside of the curve
|
||||||
as/after running a path, then increase `centripetalScaling`, which can be found on line `83` of
|
as/after running a path, then increase `centripetalScaling`, which can be found on line `89` of
|
||||||
`FollowerConstants`. If the robot is correcting towards the outside of the curve, then decrease
|
`FollowerConstants`. If the robot is correcting towards the outside of the curve, then decrease
|
||||||
`centripetalScaling`.
|
`centripetalScaling`.
|
||||||
|
|
||||||
@ -108,8 +109,9 @@ measurements will be in centimeters.
|
|||||||
## Note About the PIDs
|
## Note About the PIDs
|
||||||
In versions of Pedro Pathing before early August 2024, there were 2 PIDs used in the translational,
|
In versions of Pedro Pathing before early August 2024, there were 2 PIDs used in the translational,
|
||||||
heading, and drive control. However, now there is only one main PID. The old system can still be used.
|
heading, and drive control. However, now there is only one main PID. The old system can still be used.
|
||||||
Scroll down to the bottom of `FollowerConstants` and set all the booleans from lines `151` to `153`
|
Scroll down to the bottom of `FollowerConstants` and set all the booleans from lines `157` to `159`
|
||||||
to true. This will enable the two PID system that Pedro Pathing originally used. From there, scroll
|
to true. They should be named `useSecondaryTranslationalPID`, `useSecondaryHeadingPID`, and `useSecondaryDrivePID`.
|
||||||
|
This will enable the two PID system that Pedro Pathing originally used. From there, scroll
|
||||||
down and all the values pertaining to the secondary PIDs will be there. The two PID system works with
|
down and all the values pertaining to the secondary PIDs will be there. The two PID system works with
|
||||||
a PID that handles larger errors (the main PID) and a second PID to handle smaller errors (the
|
a PID that handles larger errors (the main PID) and a second PID to handle smaller errors (the
|
||||||
secondary PID). The main PID should be tuned to move the error within the secondary PID's range
|
secondary PID). The main PID should be tuned to move the error within the secondary PID's range
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.examples;
|
package org.firstinspires.ftc.teamcode.pedroPathing.examples;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
|
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
|
||||||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
|
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
|
||||||
import com.qualcomm.robotcore.hardware.DcMotor;
|
import com.qualcomm.robotcore.hardware.DcMotor;
|
||||||
@ -32,10 +37,10 @@ public class TeleOpEnhancements extends OpMode {
|
|||||||
public void init() {
|
public void init() {
|
||||||
follower = new Follower(hardwareMap);
|
follower = new Follower(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
|
leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
|
||||||
leftRear.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
|
leftRear.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
|
||||||
|
@ -5,6 +5,10 @@ import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstan
|
|||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.headingPIDFSwitch;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.headingPIDFSwitch;
|
||||||
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.headingPIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.headingPIDFFeedForward;
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.translationalPIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.translationalPIDFFeedForward;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.lateralZeroPowerAcceleration;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.lateralZeroPowerAcceleration;
|
||||||
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryDrivePIDFFeedForward;
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.secondaryDrivePIDFFeedForward;
|
||||||
@ -158,10 +162,10 @@ public class Follower {
|
|||||||
driveVectorScaler = new DriveVectorScaler(FollowerConstants.frontLeftVector);
|
driveVectorScaler = new DriveVectorScaler(FollowerConstants.frontLeftVector);
|
||||||
poseUpdater = new PoseUpdater(hardwareMap);
|
poseUpdater = new PoseUpdater(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
||||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||||
@ -20,7 +25,7 @@ import org.firstinspires.ftc.teamcode.pedroPathing.util.NanoTimer;
|
|||||||
* @version 1.0, 4/2/2024
|
* @version 1.0, 4/2/2024
|
||||||
*/
|
*/
|
||||||
@Config
|
@Config
|
||||||
public class DriveEncoderLocalizer extends Localizer { // todo: make drive encoders work
|
public class DriveEncoderLocalizer extends Localizer {
|
||||||
private HardwareMap hardwareMap;
|
private HardwareMap hardwareMap;
|
||||||
private Pose startPose;
|
private Pose startPose;
|
||||||
private Pose displacementPose;
|
private Pose displacementPose;
|
||||||
@ -59,11 +64,10 @@ public class DriveEncoderLocalizer extends Localizer { // todo: make drive encod
|
|||||||
public DriveEncoderLocalizer(HardwareMap map, Pose setStartPose) {
|
public DriveEncoderLocalizer(HardwareMap map, Pose setStartPose) {
|
||||||
hardwareMap = map;
|
hardwareMap = map;
|
||||||
|
|
||||||
// TODO: replace these with your encoder ports
|
leftFront = new Encoder(hardwareMap.get(DcMotorEx.class, leftFrontMotorName));
|
||||||
leftFront = new Encoder(hardwareMap.get(DcMotorEx.class, "leftFront"));
|
leftRear = new Encoder(hardwareMap.get(DcMotorEx.class, leftRearMotorName));
|
||||||
rightFront = new Encoder(hardwareMap.get(DcMotorEx.class, "rightFront"));
|
rightRear = new Encoder(hardwareMap.get(DcMotorEx.class, rightRearMotorName));
|
||||||
leftRear = new Encoder(hardwareMap.get(DcMotorEx.class, "leftRear"));
|
rightFront = new Encoder(hardwareMap.get(DcMotorEx.class, rightFrontMotorName));
|
||||||
rightRear = new Encoder(hardwareMap.get(DcMotorEx.class, "rightRear"));
|
|
||||||
|
|
||||||
// TODO: reverse any encoders necessary
|
// TODO: reverse any encoders necessary
|
||||||
leftFront.setDirection(Encoder.REVERSE);
|
leftFront.setDirection(Encoder.REVERSE);
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.localization.tuning;
|
package org.firstinspires.ftc.teamcode.pedroPathing.localization.tuning;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@ -48,10 +53,10 @@ public class LocalizationTest extends OpMode {
|
|||||||
|
|
||||||
dashboardPoseTracker = new DashboardPoseTracker(poseUpdater);
|
dashboardPoseTracker = new DashboardPoseTracker(poseUpdater);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
leftRear.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftRear.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
@ -22,6 +22,12 @@ import org.firstinspires.ftc.teamcode.pedroPathing.util.KalmanFilterParameters;
|
|||||||
@Config
|
@Config
|
||||||
public class FollowerConstants {
|
public class FollowerConstants {
|
||||||
|
|
||||||
|
// This section is for configuring your motors
|
||||||
|
public static String leftFrontMotorName = "leftFront";
|
||||||
|
public static String leftRearMotorName = "leftRear";
|
||||||
|
public static String rightFrontMotorName = "rightFront";
|
||||||
|
public static String rightRearMotorName = "rightRear";
|
||||||
|
|
||||||
// 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)
|
||||||
private static double xMovement = 81.34056;
|
private static double xMovement = 81.34056;
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@ -62,10 +67,10 @@ public class ForwardVelocityTuner extends OpMode {
|
|||||||
public void init() {
|
public void init() {
|
||||||
poseUpdater = new PoseUpdater(hardwareMap);
|
poseUpdater = new PoseUpdater(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@ -65,10 +70,10 @@ public class ForwardZeroPowerAccelerationTuner extends OpMode {
|
|||||||
public void init() {
|
public void init() {
|
||||||
poseUpdater = new PoseUpdater(hardwareMap);
|
poseUpdater = new PoseUpdater(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@ -65,10 +70,10 @@ public class LateralZeroPowerAccelerationTuner extends OpMode {
|
|||||||
public void init() {
|
public void init() {
|
||||||
poseUpdater = new PoseUpdater(hardwareMap);
|
poseUpdater = new PoseUpdater(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
package org.firstinspires.ftc.teamcode.pedroPathing.tuning;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
|
||||||
|
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.rightRearMotorName;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.FtcDashboard;
|
import com.acmerobotics.dashboard.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
|
||||||
@ -62,10 +67,10 @@ public class StrafeVelocityTuner extends OpMode {
|
|||||||
public void init() {
|
public void init() {
|
||||||
poseUpdater = new PoseUpdater(hardwareMap);
|
poseUpdater = new PoseUpdater(hardwareMap);
|
||||||
|
|
||||||
leftFront = hardwareMap.get(DcMotorEx.class, "leftFront");
|
leftFront = hardwareMap.get(DcMotorEx.class, leftFrontMotorName);
|
||||||
leftRear = hardwareMap.get(DcMotorEx.class, "leftRear");
|
leftRear = hardwareMap.get(DcMotorEx.class, leftRearMotorName);
|
||||||
rightRear = hardwareMap.get(DcMotorEx.class, "rightRear");
|
rightRear = hardwareMap.get(DcMotorEx.class, rightRearMotorName);
|
||||||
rightFront = hardwareMap.get(DcMotorEx.class, "rightFront");
|
rightFront = hardwareMap.get(DcMotorEx.class, rightFrontMotorName);
|
||||||
|
|
||||||
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
// TODO: Make sure that this is the direction your motors need to be reversed in.
|
||||||
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||||
|
Reference in New Issue
Block a user