|
19 | 19 | import java.util.function.Supplier; |
20 | 20 | import org.littletonrobotics.junction.Logger; |
21 | 21 |
|
22 | | -/** Implements a Camera behavior for the This is up to date for Limelight OS 2026.0 (Feb 17, 2026) */ |
| 22 | +/** |
| 23 | + * Implements a Camera behavior for the This is up to date for Limelight OS 2026.0 (Feb 17, 2026) |
| 24 | + */ |
23 | 25 | public class LimelightCamera extends AbstractChaosCamera { |
24 | 26 | /** Limelight versions can help the implementation navigate features and calibration */ |
25 | 27 | public enum LimelightVersion { |
@@ -351,19 +353,19 @@ public VisionData processMeasuredData(int idx) { |
351 | 353 | m_poseDataMT2.deviations[0]); |
352 | 354 |
|
353 | 355 | if (m_poseData.averageTagDistance[idx] < m_megatag2Threshold) { |
354 | | - return new VisionData( |
355 | | - m_poseData.pose[idx], |
356 | | - m_poseData.timestamps[idx], |
357 | | - new double[] {m_poseData.deviations[idx], m_poseData.deviations[idx], 1}, |
358 | | - conf, |
359 | | - m_name); |
360 | | - } else { |
361 | 356 | return new VisionData( |
362 | 357 | m_poseDataMT2.pose[idx], |
363 | 358 | m_poseDataMT2.timestamps[idx], |
364 | 359 | new double[] {m_poseDataMT2.deviations[idx], m_poseDataMT2.deviations[idx], 1}, |
365 | 360 | conf2, |
366 | 361 | m_name); |
| 362 | + } else { |
| 363 | + return new VisionData( |
| 364 | + m_poseData.pose[idx], |
| 365 | + m_poseData.timestamps[idx], |
| 366 | + new double[] {m_poseData.deviations[idx], m_poseData.deviations[idx], 1}, |
| 367 | + conf, |
| 368 | + m_name); |
367 | 369 | } |
368 | 370 | } |
369 | 371 |
|
@@ -434,8 +436,11 @@ protected void LoadNTQueueToVisionData() { |
434 | 436 | m_poseData.timestamps[idx] = timestampSeconds; |
435 | 437 | } // End MT1 |
436 | 438 | if (mt1_poses.length > 0) { |
437 | | - Logger.recordOutput(m_name+"/Mt1TagDistance", mt1_poses[mt1_poses.length-1].getDoubleArray()[idxTagDistance]); |
438 | | - Logger.recordOutput(m_name+"/Mt1TagCount", mt1_poses[mt1_poses.length-1].getDoubleArray()[idxTagCount]); |
| 439 | + Logger.recordOutput( |
| 440 | + m_name + "/Mt1TagDistance", |
| 441 | + mt1_poses[mt1_poses.length - 1].getDoubleArray()[idxTagDistance]); |
| 442 | + Logger.recordOutput( |
| 443 | + m_name + "/Mt1TagCount", mt1_poses[mt1_poses.length - 1].getDoubleArray()[idxTagCount]); |
439 | 444 | } |
440 | 445 |
|
441 | 446 | // Parse MegaTag2 Info |
@@ -488,10 +493,12 @@ protected void LoadNTQueueToVisionData() { |
488 | 493 | m_poseDataMT2.timestamps[idx] = timestampSeconds; |
489 | 494 | } // End MT2 |
490 | 495 | if (mt2_poses.length > 0) { |
491 | | - Logger.recordOutput(m_name+"/Mt2avgTagDistance", mt2_poses[mt2_poses.length-1].getDoubleArray()[idxTagDistance]); |
492 | | - Logger.recordOutput(m_name+"/Mt2TagCount", mt2_poses[mt2_poses.length-1].getDoubleArray()[idxTagCount]); |
| 496 | + Logger.recordOutput( |
| 497 | + m_name + "/Mt2avgTagDistance", |
| 498 | + mt2_poses[mt2_poses.length - 1].getDoubleArray()[idxTagDistance]); |
| 499 | + Logger.recordOutput( |
| 500 | + m_name + "/Mt2TagCount", mt2_poses[mt2_poses.length - 1].getDoubleArray()[idxTagCount]); |
493 | 501 | } |
494 | | - |
495 | 502 | } |
496 | 503 |
|
497 | 504 | public static CameraSpecs LL3GSpecs() { |
|
0 commit comments