@@ -22,23 +22,21 @@ public class Vision extends SubsystemBase {
22
22
23
23
public static final class VisionConfig {
24
24
/* Limelight Configuration */
25
- public static final String LEFT_LL = "limelight-left " ;
25
+ public static final String FRONT_LL = "limelight-front " ;
26
26
public static final LimelightConfig LEFT_Config =
27
- new LimelightConfig (LEFT_LL )
28
- .withTranslation (0 , 0 , 0.5 )
29
- .withRotation (0 , Math .toRadians (- 15 ), 0 );
27
+ new LimelightConfig (FRONT_LL )
28
+ .withTranslation (0.215 , 0 , 0.188 )
29
+ .withRotation (0 , Math .toRadians (28 ), 0 );
30
30
31
- public static final String RIGHT_LL = "limelight-right " ;
31
+ public static final String BACK_LL = "limelight-back " ;
32
32
public static final LimelightConfig Right_Config =
33
- new LimelightConfig (RIGHT_LL )
34
- .withTranslation (0 , 0.5 , 0.5 )
35
- .withRotation (0 , Math .toRadians (15 ), 0 );
36
-
37
- // TODO: Limelight config needs to be updated to actual position on robot
33
+ new LimelightConfig (BACK_LL )
34
+ .withTranslation (-0.215 , 0.0 , 0.188 )
35
+ .withRotation (0 , Math .toRadians (28 ), Math .toRadians (180 ));
38
36
39
37
/* Pipeline configs */
40
- public static final int leftTagPipeline = 0 ;
41
- public static final int rightTagPipeline = 1 ;
38
+ public static final int frontTagPipeline = 0 ;
39
+ public static final int backTagPipeline = 0 ;
42
40
43
41
/* Pose Estimation Constants */
44
42
@@ -59,19 +57,19 @@ public static final class VisionConfig {
59
57
}
60
58
61
59
/** Limelights */
62
- public final Limelight leftLL =
60
+ public final Limelight frontLL =
63
61
new Limelight (
64
- VisionConfig .LEFT_LL , VisionConfig .leftTagPipeline , VisionConfig .LEFT_Config );
62
+ VisionConfig .FRONT_LL , VisionConfig .frontTagPipeline , VisionConfig .LEFT_Config );
65
63
66
- public final LimelightLogger leftLLogger = new LimelightLogger ("left" , leftLL );
64
+ public final LimelightLogger leftLLogger = new LimelightLogger ("left" , frontLL );
67
65
68
- public final Limelight rightLL =
66
+ public final Limelight backLL =
69
67
new Limelight (
70
- VisionConfig .RIGHT_LL ,
71
- VisionConfig .rightTagPipeline ,
68
+ VisionConfig .BACK_LL ,
69
+ VisionConfig .backTagPipeline ,
72
70
VisionConfig .Right_Config );
73
71
74
- public final Limelight [] allLimelights = {leftLL , rightLL };
72
+ public final Limelight [] allLimelights = {frontLL , backLL };
75
73
76
74
private final DecimalFormat df = new DecimalFormat ();
77
75
@@ -108,7 +106,7 @@ public void resetPoseToVision() {
108
106
}
109
107
110
108
public Limelight getBestLimelight () {
111
- Limelight bestLimelight = leftLL ;
109
+ Limelight bestLimelight = frontLL ;
112
110
double bestScore = 0 ;
113
111
for (Limelight limelight : allLimelights ) {
114
112
double score = 0 ;
@@ -239,10 +237,10 @@ public Command blinkLimelights() {
239
237
public Command solidLimelight () {
240
238
return startEnd (
241
239
() -> {
242
- leftLL .setLEDMode (true );
240
+ frontLL .setLEDMode (true );
243
241
},
244
242
() -> {
245
- leftLL .setLEDMode (false );
243
+ frontLL .setLEDMode (false );
246
244
})
247
245
.withName ("Vision.solidLimelight" );
248
246
}
0 commit comments