mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 08:48:05 -06:00
Rotate and Autos
This commit is contained in:
@@ -289,7 +289,8 @@ public class SwerveDrive extends SubsystemBase implements Queryable {
|
||||
Translation2d fieldPosLead = robotSpeed.times(SwerveDriveConstants.AIM_LEAD_TIME.get()).plus(fieldPos);
|
||||
|
||||
// Calculate the angle between the current position and the lead position
|
||||
Rotation2d ang = getPose2d().getTranslation().minus(fieldPosLead).getAngle();
|
||||
Rotation2d ang = fieldPosLead.minus(getPose2d().getTranslation()).getAngle();
|
||||
|
||||
|
||||
driveFieldAngle(leftStick, ang);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public final class SwerveDriveConstants {
|
||||
|
||||
|
||||
// TODO: Replace this with a static constant
|
||||
public static final ConfigurableDouble AIM_kP = new ConfigurableDouble("Aim kP", 2.5);
|
||||
public static final ConfigurableDouble AIM_kP = new ConfigurableDouble("Aim kP", 15);
|
||||
public static final ConfigurableDouble AIM_kI = new ConfigurableDouble("Aim kI", 0);
|
||||
public static final ConfigurableDouble AIM_kD = new ConfigurableDouble("Aim kD", 0.1);
|
||||
// public static final Gains AIM_GAINS = new Gains(2.5, 0, 0.1);
|
||||
|
||||
Reference in New Issue
Block a user