-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy + Paste of drive code from last year and implemented all the necessary Libraries.
- Loading branch information
1 parent
7495afe
commit 229dc3d
Showing
36 changed files
with
3,090 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/drive/BaseBotMecanumDrive.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.firstinspires.ftc.teamcode.drive; | ||
|
||
import com.acmerobotics.roadrunner.control.PIDCoefficients; | ||
import com.acmerobotics.roadrunner.geometry.Pose2d; | ||
import com.acmerobotics.roadrunner.trajectory.Trajectory; | ||
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder; | ||
import com.qualcomm.robotcore.hardware.DcMotor; | ||
|
||
public abstract class BaseBotMecanumDrive extends com.acmerobotics.roadrunner.drive.MecanumDrive { | ||
public BaseBotMecanumDrive(double kV, double kA, double kStatic, double trackWidth, double wheelBase, double lateralMultiplier) { | ||
super(kV, kA, kStatic, trackWidth, wheelBase, lateralMultiplier); | ||
} | ||
|
||
public abstract TrajectoryBuilder trajectoryBuilder(Pose2d startPose); | ||
|
||
public abstract TrajectoryBuilder trajectoryBuilder(Pose2d startPose, boolean reversed); | ||
|
||
public abstract TrajectoryBuilder trajectoryBuilder(Pose2d startPose, double startHeading); | ||
|
||
public abstract void turnAsync(double angle); | ||
|
||
public abstract void turn(double angle); | ||
|
||
public abstract void followTrajectory(Trajectory trajectory); | ||
|
||
public abstract void update(); | ||
|
||
public abstract boolean isBusy(); | ||
|
||
public abstract void setMode(DcMotor.RunMode runMode); | ||
|
||
public abstract void setPIDCoefficients(DcMotor.RunMode runMode, PIDCoefficients coefficients); | ||
|
||
public abstract void setWeightedDrivePower(Pose2d drivePower); | ||
} |
Oops, something went wrong.