Compare commits
3 Commits
d41f368fe8
...
4dc7b493fa
Author | SHA1 | Date | |
---|---|---|---|
4dc7b493fa | |||
a149909e82 | |||
dbe9c76ee6 |
@ -8,6 +8,14 @@ public class PedrosConstants {
|
|||||||
public static final String FRONT_RIGHT_MOTOR = "Drive front rt";
|
public static final String FRONT_RIGHT_MOTOR = "Drive front rt";
|
||||||
public static final String BACK_RIGHT_MOTOR = "Drive back rt";
|
public static final String BACK_RIGHT_MOTOR = "Drive back rt";
|
||||||
|
|
||||||
|
// Robot IMU configuration
|
||||||
|
public static final String IMU = "imu";
|
||||||
|
|
||||||
|
// Robot Encoders
|
||||||
|
public static final String LEFT_ENCODER = "encoder left";
|
||||||
|
public static final String RIGHT_ENCODER = "encoder right";
|
||||||
|
public static final String BACK_ENCODER = "encoder back";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Pedro's parameters
|
Pedro's parameters
|
||||||
*/
|
*/
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
## Pedro Pathing
|
## Pedro Pathing
|
||||||
|
|
||||||
- `https://pedro-path-generator.vercel.app/`
|
- Pedro Path Generator: `https://pedro-path-generator.vercel.app/`
|
||||||
|
- Pedro Path Overview: `https://www.youtube.com/watch?v=HI7eyLLpCgM`
|
||||||
|
- Pedro Tuning Overview: `https://www.youtube.com/watch?v=3EXX5_KwfVM`
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedrosConstants.*;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
||||||
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
||||||
@ -88,7 +90,7 @@ public class ThreeWheelIMULocalizer extends Localizer {
|
|||||||
*/
|
*/
|
||||||
public ThreeWheelIMULocalizer(HardwareMap map, Pose setStartPose) {
|
public ThreeWheelIMULocalizer(HardwareMap map, Pose setStartPose) {
|
||||||
hardwareMap = map;
|
hardwareMap = map;
|
||||||
imu = hardwareMap.get(IMU.class, "imu");
|
imu = hardwareMap.get(IMU.class, IMU);
|
||||||
|
|
||||||
// TODO: replace this with your IMU's orientation
|
// TODO: replace this with your IMU's orientation
|
||||||
imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.LEFT, RevHubOrientationOnRobot.UsbFacingDirection.UP)));
|
imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.LEFT, RevHubOrientationOnRobot.UsbFacingDirection.UP)));
|
||||||
@ -98,11 +100,10 @@ public class ThreeWheelIMULocalizer extends Localizer {
|
|||||||
rightEncoderPose = new Pose(-3, -5.7, 0);
|
rightEncoderPose = new Pose(-3, -5.7, 0);
|
||||||
strafeEncoderPose = new Pose(6.9, 1, Math.toRadians(90));
|
strafeEncoderPose = new Pose(6.9, 1, Math.toRadians(90));
|
||||||
|
|
||||||
|
|
||||||
// TODO: replace these with your encoder ports
|
// TODO: replace these with your encoder ports
|
||||||
leftEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "lb"));
|
leftEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, LEFT_ENCODER));
|
||||||
rightEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "lf"));
|
rightEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, RIGHT_ENCODER));
|
||||||
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "rf"));
|
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, BACK_ENCODER));
|
||||||
|
|
||||||
// TODO: reverse any encoders necessary
|
// TODO: reverse any encoders necessary
|
||||||
leftEncoder.setDirection(Encoder.REVERSE);
|
leftEncoder.setDirection(Encoder.REVERSE);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedrosConstants.*;
|
||||||
|
|
||||||
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;
|
||||||
@ -85,9 +87,9 @@ public class ThreeWheelLocalizer extends Localizer {
|
|||||||
hardwareMap = map;
|
hardwareMap = map;
|
||||||
|
|
||||||
// TODO: replace these with your encoder ports
|
// TODO: replace these with your encoder ports
|
||||||
leftEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "leftRear"));
|
leftEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, LEFT_ENCODER));
|
||||||
rightEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "rightFront"));
|
rightEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, RIGHT_ENCODER));
|
||||||
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "strafeEncoder"));
|
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, BACK_ENCODER));
|
||||||
|
|
||||||
// TODO: reverse any encoders necessary
|
// TODO: reverse any encoders necessary
|
||||||
leftEncoder.setDirection(Encoder.REVERSE);
|
leftEncoder.setDirection(Encoder.REVERSE);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
|
||||||
|
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedrosConstants.BACK_ENCODER;
|
||||||
|
import static org.firstinspires.ftc.teamcode.PedrosConstants.LEFT_ENCODER;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
|
||||||
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
||||||
@ -91,8 +94,8 @@ public class TwoWheelLocalizer extends Localizer { // todo: make two wheel odo w
|
|||||||
imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.UP, RevHubOrientationOnRobot.UsbFacingDirection.LEFT)));
|
imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.UP, RevHubOrientationOnRobot.UsbFacingDirection.LEFT)));
|
||||||
|
|
||||||
// TODO: replace these with your encoder ports
|
// TODO: replace these with your encoder ports
|
||||||
forwardEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "leftRear"));
|
forwardEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, LEFT_ENCODER));
|
||||||
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, "strafeEncoder"));
|
strafeEncoder = new Encoder(hardwareMap.get(DcMotorEx.class, BACK_ENCODER));
|
||||||
|
|
||||||
// TODO: reverse any encoders necessary
|
// TODO: reverse any encoders necessary
|
||||||
forwardEncoder.setDirection(Encoder.REVERSE);
|
forwardEncoder.setDirection(Encoder.REVERSE);
|
||||||
|
Reference in New Issue
Block a user