Search in sources :

Example 1 with SlewRateLimiter

use of edu.wpi.first.math.filter.SlewRateLimiter in project Dreadbots2022 by Dreadbot.

the class DriveCommand method setupFilters.

private void setupFilters() {
    this.slewRateLimiter = new SlewRateLimiter(3);
    var forwardBuilder = new SensitivityController.Builder(-40.0, -40.0);
    this.forwardSensitivityFilter = forwardBuilder.build();
    var lateralBuilder = new SensitivityController.Builder(-40.0, -40.0).minimumValues(0.1d, 0.1d).maximumValues(0.5d, 0.5d);
    this.lateralSensitivityFilter = lateralBuilder.build();
    var rotationalBuilder = new SensitivityController.Builder(-40.0, -40.0);
    rotationalBuilder.maximumValues(0.3d, 0.3d);
    this.rotationalSensitivityFilter = rotationalBuilder.build();
    SmartDashboard.putData("forwardSensFilter", forwardSensitivityFilter);
    SmartDashboard.putData("lateralSensFilter", lateralSensitivityFilter);
    SmartDashboard.putData("rotateSensFilter", rotationalSensitivityFilter);
}
Also used : SlewRateLimiter(edu.wpi.first.math.filter.SlewRateLimiter)

Aggregations

SlewRateLimiter (edu.wpi.first.math.filter.SlewRateLimiter)1