001/************************* PROJECT RON *************************/ 002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved. */ 003/* Use of this source code is governed by an MIT-style license */ 004/* that can be found in the repository LICENSE file. */ 005/***************************************************************/ 006package com.stuypulse.robot.constants; 007 008import static edu.wpi.first.units.Units.Amps; 009 010import com.pathplanner.lib.config.PIDConstants; 011 012import dev.doglog.DogLog; 013import edu.wpi.first.networktables.DoubleSubscriber; 014import edu.wpi.first.units.measure.Current; 015 016public class Gains { 017 018 public interface Shooter { 019 020 DoubleSubscriber kP = DogLog.tunable("Shooter/kP", 13.0); 021 022 DoubleSubscriber kI = DogLog.tunable("Shooter/kI", 0.0); 023 024 DoubleSubscriber kD = DogLog.tunable("Shooter/kD", 0.0); 025 026 DoubleSubscriber kS = DogLog.tunable("Shooter/kS", 2.5); 027 028 DoubleSubscriber kV = DogLog.tunable("Shooter/kV", 0.05); 029 030 DoubleSubscriber kA = DogLog.tunable("Shooter/kA", 0.0); 031 } 032 033 public interface Intake { 034 035 // pivot gains 036 double kP = 300;//300 037 038 double kI = 0; 039 040 double kD = 75; 041 042 Current kS = Amps.of(0); 043 044 Current kV = Amps.of(0); 045 046 Current kA = Amps.of(0); 047 048 Current kG = Amps.of(-12); 049 050 public interface Digestion { 051 052 double kP = 325; 053 054 double kI = 0; 055 056 // TODO: tune 057 double kD = 75; 058 } 059 } 060 061 public interface Swerve { 062 063 public interface Drive { 064 065 double kS = 0.0; 066 067 double kV = 0.124; 068 069 double kA = 0.0; 070 071 double kP = 0.1; 072 073 double kI = 0.0; 074 075 double kD = 0.0; 076 } 077 078 public interface Turn { 079 080 double kS = 0.1; 081 082 double kV = 2.66; 083 084 double kA = 0.0; 085 086 double kP = 100.0; 087 088 double kI = 0.0; 089 090 double kD = 0.5; 091 } 092 093 public interface Alignment { 094 double akP = 8.8624; 095 096 double akI = 0.0; 097 098 double akD = 0.0; 099 100 PIDConstants XY = new PIDConstants(10, 0.0, 0.0); 101 102 PIDConstants THETA = new PIDConstants(10, 0.0, 0.0); 103 } 104 } 105}