Add translation method for MecannumDrive

This commit is contained in:
Scott Barnes 2023-10-28 13:13:55 -05:00
parent 06182dc1e9
commit 3a062d75aa
1 changed files with 6 additions and 0 deletions

View File

@ -308,4 +308,10 @@ public class MecanumDrive extends com.acmerobotics.roadrunner.drive.MecanumDrive
public static TrajectoryAccelerationConstraint getAccelerationConstraint(double maxAccel) {
return new ProfileAccelerationConstraint(maxAccel);
}
public void setInput(double x, double y, double z) {
Pose2d vel = new Pose2d(x, y, z);
setDrivePower(vel);
update();
}
}