11package raidzero .robot ;
22
33import com .ctre .phoenix6 .signals .GravityTypeValue ;
4+ import com .ctre .phoenix6 .signals .InvertedValue ;
5+ import com .ctre .phoenix6 .signals .MotorArrangementValue ;
46import edu .wpi .first .math .geometry .Pose2d ;
57import edu .wpi .first .math .geometry .Rotation2d ;
68import java .util .ArrayList ;
@@ -109,7 +111,7 @@ public static class Joint {
109111 public static class Winch {
110112 public static final int MOTOR_ID = 16 ;
111113
112- public static final double SPEED = 0.75 ;
114+ public static final double SPEED = 1.0 ;
113115 }
114116 }
115117
@@ -127,9 +129,9 @@ public static enum REEFS {
127129
128130 public static final List <Pose2d > LEFT_REEF_WAYPOINTS = new ArrayList <Pose2d >(
129131 List .of (
130- new Pose2d (3.70 , 3.16 , Rotation2d .fromDegrees (60 )), // 17 Left
132+ new Pose2d (3.735 , 3.14 , Rotation2d .fromDegrees (60 )), // 17 Left
131133 new Pose2d (3.30 , 4.15 , Rotation2d .fromDegrees (0 )), // 18 Left
132- new Pose2d (4.05 , 5.1 , Rotation2d .fromDegrees (300 )), // 19 Left
134+ new Pose2d (4.06 , 5.105 , Rotation2d .fromDegrees (300 )), // 19 Left
133135 new Pose2d (5.2619 , 4.99953 , Rotation2d .fromDegrees (240 )), // 20 Left
134136 new Pose2d (5.70 , 3.85 , Rotation2d .fromDegrees (180 )), // 21 Left
135137 new Pose2d (4.9113 , 2.93927 , Rotation2d .fromDegrees (120 )) // 22 Left
@@ -140,47 +142,59 @@ public static enum REEFS {
140142 List .of (
141143 new Pose2d (4.05 , 2.95 , Rotation2d .fromDegrees (60 )), // 17 Right
142144 new Pose2d (3.30 , 3.85 , Rotation2d .fromDegrees (0 )), // 18 Right
143- new Pose2d (3.70 , 4.89 , Rotation2d .fromDegrees (300 )), // 19 Right
144- new Pose2d (4.9419 , 5.16453 , Rotation2d .fromDegrees (240 )), // 20 Right
145+ new Pose2d (3.713 , 4.925 , Rotation2d .fromDegrees (300 )), // 19 Right
146+ new Pose2d (4.9489 , 5.16 , Rotation2d .fromDegrees (240 )), // 20 Right
145147 new Pose2d (5.70 , 4.20 , Rotation2d .fromDegrees (180 )), // 21 Right
146148 new Pose2d (5.2619 , 3.05047 , Rotation2d .fromDegrees (120 )) // 22 Right
147149 )
148150 );
151+
152+ public static final Pose2d BLUE_PROCESSOR = new Pose2d (5.987542 , 0.78 , Rotation2d .fromDegrees (90 ));
153+ public static final Pose2d RED_PROCESSOR = new Pose2d (17.55 - 5.987542 , 8.05 - 0.78 , Rotation2d .fromDegrees (180 ));
149154 }
150155
151156 public static class TelescopingArm {
152157 public static class Intake {
153158 public static final int MOTOR_ID = 12 ;
154- public static final int FOLLOW_ID = 13 ;
155159
156- public static final double INTAKE_SPEED = 0.25 ;
157- public static final double INTAKE_LOWER_SPEED = 0.04 ;
160+ public static final MotorArrangementValue MOTOR_ARRANGEMENT = MotorArrangementValue .Minion_JST ;
158161
159- public static final double SCOOCH_SPEED = 0.06 ;
162+ public static final InvertedValue INVERTED_VALUE = InvertedValue . CounterClockwise_Positive ;
160163
161- public static final double EXTAKE_SPEED = 0.1 ;
162- public static final double EXTAKE_TIMEOUT_S = 1.0 ;
164+ public static final int STATOR_CURRENT_LIMIT = 30 ;
165+ public static final int SUPPLY_CURRENT_LIMIT = 30 ;
166+ public static final double SUPPLY_CURRENT_LOWER_TIME = 0.0 ;
163167
164- public static final double LASERCAN_DISTANCE_THRESHOLD_MM = 50.0 ;
168+ public static final double TOP_LASER_THRESHOLD_MM = 50.0 ;
169+ public static final double BOTTOM_LASER_THRESHOLD_MM = 100.0 ;
165170
166- public static final int CURRENT_LIMIT = 25 ;
171+ public static final double INTAKE_SPEED = 0.85 ;
172+ public static final double LOWER_SPEED = 0.25 ;
173+ public static final double EJECT_SPEED = -0.80 ;
174+ public static final double REVERSE_SPEED = -0.2 ;
167175
168- public static final int BOTTOM_LASERCAN_ID = 0 ;
169- public static final int TOP_LASERCAN_ID = 1 ;
176+ public static final double STALL_CURRENT_THRESHOLD = 20.0 ;
177+ public static final double CURRENT_SPIKE_THRESHOLD = 10.0 ;
178+
179+ public static final double EXTAKE_SPEED = 1.0 ;
180+ public static final double EXTAKE_TIMEOUT_S = 1.0 ;
170181
171- public static final int SERVO_HUB_ID = 3 ;
182+ public static final double ALGAE_INTAKE_SPEED = 1.0 ;
183+ public static final double ALGAE_EJECT_SPEED = -1.0 ;
184+ public static final double HOLD_SPEED = 0.1 ;
185+
186+ public static final double KP = 1.0 ;
187+ public static final double KI = 0.0 ;
188+ public static final double KD = 0.0 ;
172189
173- public static final int SERVO_RETRACTED = 1950 ;
174- public static final int SERVO_EXTENDED = 1300 ;
175- public static final int SERVO_CENTER_WIDTH = 1625 ;
176190 }
177191
178192 public static class Joint {
179193 public static final int MOTOR_ID = 11 ;
180194 public static final int CANCODER_ID = 11 ;
181195
182196 public static final double CANCODER_GEAR_RATIO = 28.0 / 80.0 ;
183- public static final double CANCODER_OFFSET = -(0.352783 - (0.25 / CANCODER_GEAR_RATIO ));
197+ public static final double CANCODER_OFFSET = -(0.325684 - (0.25 / CANCODER_GEAR_RATIO ));
184198 public static final double CANCODER_DISCONTINUITY_POINT = 0.5 ;
185199
186200 public static final double CONVERSION_FACTOR = (120.0 / 12.0 ) * 20.0 ;
@@ -206,17 +220,21 @@ public static class Joint {
206220 }
207221
208222 public static class Positions {
209- public static double [] L4_SCORING_POS_M = { -0.24 , 2.65 };
210- public static double [] L4_SCORING_POS_M_BLUE = { -0.17 , 2.68 };
211- public static double [] L4_CHECK_POSITION = { -0.25 , 2.62 };
212- public static double [] L4_GRAND_SLAM = { -0.2 , 1.57 };
223+ public static final double [] L4_SCORING_POS_M = { -0.24 , 2.75 };
224+ public static final double [] L4_SCORING_POS_M_BLUE = { -0.17 , 2.68 };
225+ public static final double [] L4_CHECK_POSITION = { -0.25 , 2.62 };
226+ public static final double [] L4_GRAND_SLAM = { -0.2 , 1.57 };
227+
228+ public static final double [] L3_SCORING_POS_M = { -0.20 , 1.57 };
229+ public static final double [] L2_SCORING_POS_M = { -0.15 , 0.9 };
230+ public static final double [] L1_SCORING_POS_M = { 0.0 , 0.0 };
213231
214- public static double [] L3_SCORING_POS_M = { -0.20 , 1.57 };
215- public static double [] L2_SCORING_POS_M = { -0.2 , 0.9 };
216- public static double [] L1_SCORING_POS_M = { 0.0 , 0.0 };
232+ public static final double [] INTAKE_POS_M = { 0.5 , 0.835 };
233+ public static final double [] INTAKE_POS_M_BLUE = { 0.5 , 0.875 };
217234
218- public static double [] INTAKE_POS_M = { 0.5 , 0.8425 };
219- public static double [] INTAKE_POS_M_BLUE = { 0.5 , 0.8425 };
235+ public static final double [] L3_ALGAE_POS_M = { 0.75 , 1.3 };
236+ public static final double [] L2_ALGAE_POS_M = { 0.6 , 0.7 };
237+ public static final double [] BARGE_SCORE_POS_M = { 0 , 2.8 };
220238
221239 public static double [] HOME_POS_M = { 0.0 , 0.0 };
222240 }
@@ -253,7 +271,9 @@ public static class Telescope {
253271 }
254272 }
255273
256- public static final String CANIVORE_NAME = "CANdoAttitude" ;
274+ public static final String BASE_CANIVORE = "CANdoAttitude" ;
275+ public static final String KAYNE_BUS = "Kaynebus" ;
276+ public static final String RIO_BUS = "rio" ;
257277
258278 public static final double STICK_DEADBAND = 0.2 ;
259279}
0 commit comments