Skip to content

Commit

Permalink
Pipe feedforward into drive view factory
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrott committed Oct 10, 2023
1 parent 1b1197d commit 57db0dc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.reflection.ReflectionConfig;
import com.acmerobotics.roadrunner.MotorFeedforward;
import com.acmerobotics.roadrunner.Pose2d;
import com.acmerobotics.roadrunner.ftc.AngularRampLogger;
import com.acmerobotics.roadrunner.ftc.DriveType;
Expand Down Expand Up @@ -96,7 +97,9 @@ public static void register(OpModeManager manager) {
perpEncs,
md.imu,
md.voltageSensor,
md.feedforward
new MotorFeedforward(MecanumDrive.PARAMS.kS,
MecanumDrive.PARAMS.kV / MecanumDrive.PARAMS.inPerTick,
MecanumDrive.PARAMS.kA / MecanumDrive.PARAMS.inPerTick)
);
};
} else if (DRIVE_CLASS.equals(TankDrive.class)) {
Expand Down Expand Up @@ -137,7 +140,9 @@ public static void register(OpModeManager manager) {
perpEncs,
td.imu,
td.voltageSensor,
td.feedforward
new MotorFeedforward(TankDrive.PARAMS.kS,
TankDrive.PARAMS.kV / TankDrive.PARAMS.inPerTick,
TankDrive.PARAMS.kA / TankDrive.PARAMS.inPerTick)
);
};
} else {
Expand Down

0 comments on commit 57db0dc

Please sign in to comment.