attempted fix for swerve jitter
This commit is contained in:
parent
16909c356f
commit
15a6253e85
@ -226,9 +226,9 @@ public class RobotContainer {
|
||||
|
||||
drivetrain.setDefaultCommand(
|
||||
drivetrain.teleopCommand(
|
||||
() -> { return driver.getLeftY() /* * (invertXYDrive ? -1 : 1)*/; },
|
||||
() -> { return driver.getLeftX() /* * (invertXYDrive ? -1 : 1)*/; },
|
||||
() -> { return -driver.getRightX(); },
|
||||
() -> { return driver.getLeftY() * (invertXYDrive ? -1 : 1); },
|
||||
() -> { return driver.getLeftX() * (invertXYDrive ? -1 : 1); },
|
||||
() -> { return -driver.getRightX() * (invertXYDrive ? -1 : 1); },
|
||||
OIConstants.kTeleopDriveDeadband
|
||||
)
|
||||
);
|
||||
@ -409,7 +409,7 @@ public class RobotContainer {
|
||||
|
||||
//operator.a().whileTrue(shooter.angleSpeedsSetpoints(ShooterConstants.kShooterAmpAngle, 0, 0));
|
||||
|
||||
operator.y().whileTrue(Commands.parallel(climber.setSpeedWithSupplier(operator::getRightTriggerAxis), shooter.climbState()));
|
||||
operator.y().whileTrue(Commands.parallel(climber.setSpeedWithSupplier(operator::getRightTriggerAxis), shooter.climbState(), intake.climbingStateCommand()));
|
||||
|
||||
driver.a().whileTrue(indexer.shootNote(() -> 1.0));
|
||||
|
||||
|
@ -8,8 +8,8 @@ import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.math.util.Units;
|
||||
|
||||
public final class AutoConstants {
|
||||
public static final double kMaxSpeedMetersPerSecond = 3.895; // max capable = 4.6
|
||||
public static final double kMaxAccelerationMetersPerSecondSquared = 3; // max capable = 7.4
|
||||
public static final double kMaxSpeedMetersPerSecond = 4; // max capable = 4.6
|
||||
public static final double kMaxAccelerationMetersPerSecondSquared = 4; // max capable = 7.4
|
||||
public static final double kMaxAngularSpeedRadiansPerSecond = Math.PI;
|
||||
public static final double kMaxAngularSpeedRadiansPerSecondSquared = Math.PI;
|
||||
|
||||
|
@ -6,6 +6,7 @@ import edu.wpi.first.math.kinematics.SwerveModuleState;
|
||||
|
||||
import com.revrobotics.CANSparkMax;
|
||||
import com.revrobotics.CANSparkLowLevel.MotorType;
|
||||
import com.revrobotics.CANSparkLowLevel.PeriodicFrame;
|
||||
import com.revrobotics.SparkAbsoluteEncoder.Type;
|
||||
import com.revrobotics.SparkPIDController;
|
||||
import com.revrobotics.AbsoluteEncoder;
|
||||
@ -36,6 +37,9 @@ public class MAXSwerveModule {
|
||||
m_drivingSparkMax = new CANSparkMax(drivingCANId, MotorType.kBrushless);
|
||||
m_turningSparkMax = new CANSparkMax(turningCANId, MotorType.kBrushless);
|
||||
|
||||
m_turningSparkMax.setPeriodicFramePeriod(PeriodicFrame.kStatus5, 20);
|
||||
m_turningSparkMax.setPeriodicFramePeriod(PeriodicFrame.kStatus6, 20);
|
||||
|
||||
// Factory reset, so we get the SPARKS MAX to a known state before configuring
|
||||
// them. This is useful in case a SPARK MAX is swapped out.
|
||||
m_drivingSparkMax.restoreFactoryDefaults();
|
||||
|
Loading…
Reference in New Issue
Block a user