Skip to content

Commit

Permalink
Added old Drive Code
Browse files Browse the repository at this point in the history
Copy + Paste of drive code from last year and implemented all the necessary Libraries.
  • Loading branch information
wolfowlshield committed Oct 2, 2021
1 parent 7495afe commit 229dc3d
Show file tree
Hide file tree
Showing 36 changed files with 3,090 additions and 49 deletions.
10 changes: 10 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions TeamCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ apply from: '../build.dependencies.gradle'
dependencies {
implementation project(':FtcRobotController')
annotationProcessor files('lib/OpModeAnnotationProcessor.jar')

implementation 'org.apache.commons:commons-math3:3.6.1'

implementation 'com.acmerobotics.roadrunner:core:0.5.2'
implementation 'com.acmerobotics.dashboard:dashboard:0.3.10'
}
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);
}
Loading

0 comments on commit 229dc3d

Please sign in to comment.