Class SampleMecanumDrive
java.lang.Object
com.acmerobotics.roadrunner.drive.Drive
com.acmerobotics.roadrunner.drive.MecanumDrive
org.firstinspires.ftc.teamcode.subsystems.roadrunner.drive.SampleMecanumDrive
public class SampleMecanumDrive
extends com.acmerobotics.roadrunner.drive.MecanumDrive
-
Nested Class Summary
Nested classes/interfaces inherited from class com.acmerobotics.roadrunner.drive.MecanumDrive
com.acmerobotics.roadrunner.drive.MecanumDrive.MecanumLocalizer
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.acmerobotics.roadrunner.control.PIDCoefficients
static double
static double
static com.acmerobotics.roadrunner.control.PIDCoefficients
static double
static double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
followTrajectory
(com.acmerobotics.roadrunner.trajectory.Trajectory trajectory) void
followTrajectoryAsync
(com.acmerobotics.roadrunner.trajectory.Trajectory trajectory) void
followTrajectorySequence
(TrajectorySequence trajectorySequence) void
followTrajectorySequenceAsync
(TrajectorySequence trajectorySequence) static com.acmerobotics.roadrunner.trajectory.constraints.TrajectoryAccelerationConstraint
getAccelerationConstraint
(double maxAccel) com.acmerobotics.roadrunner.geometry.Pose2d
double
static com.acmerobotics.roadrunner.trajectory.constraints.TrajectoryVelocityConstraint
getVelocityConstraint
(double maxVel, double maxAngularVel, double trackWidth) boolean
isBusy()
void
setMode
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) void
setMotorPowers
(double v, double v1, double v2, double v3) void
setPIDFCoefficients
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDFCoefficients coefficients) void
setWeightedDrivePower
(com.acmerobotics.roadrunner.geometry.Pose2d drivePower) void
setZeroPowerBehavior
(com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior zeroPowerBehavior) com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder
trajectoryBuilder
(com.acmerobotics.roadrunner.geometry.Pose2d startPose) com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder
trajectoryBuilder
(com.acmerobotics.roadrunner.geometry.Pose2d startPose, boolean reversed) com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder
trajectoryBuilder
(com.acmerobotics.roadrunner.geometry.Pose2d startPose, double startHeading) trajectorySequenceBuilder
(com.acmerobotics.roadrunner.geometry.Pose2d startPose) void
turn
(double angle) void
turnAsync
(double angle) void
update()
void
Methods inherited from class com.acmerobotics.roadrunner.drive.MecanumDrive
getLocalizer, setDrivePower, setDriveSignal, setLocalizer
Methods inherited from class com.acmerobotics.roadrunner.drive.Drive
getExternalHeading, getPoseEstimate, getPoseVelocity, setExternalHeading, setPoseEstimate, updatePoseEstimate
-
Field Details
-
TRANSLATIONAL_PID
public static com.acmerobotics.roadrunner.control.PIDCoefficients TRANSLATIONAL_PID -
HEADING_PID
public static com.acmerobotics.roadrunner.control.PIDCoefficients HEADING_PID -
LATERAL_MULTIPLIER
public static double LATERAL_MULTIPLIER -
VX_WEIGHT
public static double VX_WEIGHT -
VY_WEIGHT
public static double VY_WEIGHT -
OMEGA_WEIGHT
public static double OMEGA_WEIGHT
-
-
Constructor Details
-
SampleMecanumDrive
public SampleMecanumDrive(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
-
-
Method Details
-
getVelocityConstraint
public static com.acmerobotics.roadrunner.trajectory.constraints.TrajectoryVelocityConstraint getVelocityConstraint(double maxVel, double maxAngularVel, double trackWidth) -
getAccelerationConstraint
public static com.acmerobotics.roadrunner.trajectory.constraints.TrajectoryAccelerationConstraint getAccelerationConstraint(double maxAccel) -
trajectoryBuilder
public com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder trajectoryBuilder(com.acmerobotics.roadrunner.geometry.Pose2d startPose) -
trajectoryBuilder
public com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder trajectoryBuilder(com.acmerobotics.roadrunner.geometry.Pose2d startPose, boolean reversed) -
trajectoryBuilder
public com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder trajectoryBuilder(com.acmerobotics.roadrunner.geometry.Pose2d startPose, double startHeading) -
trajectorySequenceBuilder
public TrajectorySequenceBuilder trajectorySequenceBuilder(com.acmerobotics.roadrunner.geometry.Pose2d startPose) -
turnAsync
public void turnAsync(double angle) -
turn
public void turn(double angle) -
followTrajectoryAsync
public void followTrajectoryAsync(com.acmerobotics.roadrunner.trajectory.Trajectory trajectory) -
followTrajectory
public void followTrajectory(com.acmerobotics.roadrunner.trajectory.Trajectory trajectory) -
followTrajectorySequenceAsync
-
followTrajectorySequence
-
getLastError
public com.acmerobotics.roadrunner.geometry.Pose2d getLastError() -
update
public void update() -
waitForIdle
public void waitForIdle() -
isBusy
public boolean isBusy() -
setMode
public void setMode(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) -
setZeroPowerBehavior
public void setZeroPowerBehavior(com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior zeroPowerBehavior) -
setPIDFCoefficients
public void setPIDFCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDFCoefficients coefficients) -
setWeightedDrivePower
public void setWeightedDrivePower(com.acmerobotics.roadrunner.geometry.Pose2d drivePower) -
getWheelPositions
- Specified by:
getWheelPositions
in classcom.acmerobotics.roadrunner.drive.MecanumDrive
-
getWheelVelocities
- Overrides:
getWheelVelocities
in classcom.acmerobotics.roadrunner.drive.MecanumDrive
-
setMotorPowers
public void setMotorPowers(double v, double v1, double v2, double v3) - Specified by:
setMotorPowers
in classcom.acmerobotics.roadrunner.drive.MecanumDrive
-
getRawExternalHeading
public double getRawExternalHeading()- Specified by:
getRawExternalHeading
in classcom.acmerobotics.roadrunner.drive.Drive
-
getExternalHeadingVelocity
- Overrides:
getExternalHeadingVelocity
in classcom.acmerobotics.roadrunner.drive.Drive
-