]> git.taranathan.com Git - FRC2026.git/commitdiff
mostly old clutter
authoriefomit <timofei.stem@gmail.com>
Thu, 23 Apr 2026 05:13:51 +0000 (22:13 -0700)
committeriefomit <timofei.stem@gmail.com>
Thu, 23 Apr 2026 05:13:51 +0000 (22:13 -0700)
a bit unrelated to autos, but unused.

src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/commands/gpm/PowerControl.java
src/main/java/frc/robot/util/Vision/Vision.java

index 9187099ea04c5894a23016b3e0b2504558e1c3d2..429c8b51ea88ad8c2d5f57fe28e220dd3f19c22c 100644 (file)
@@ -67,9 +67,6 @@ public class RobotContainer {
   private Intake intake = null;
   private LED led = null;
 
-  // this is inside addAuto()
-  // private Command auto = new DoNothing();
-
   // Controllers are defined here
   private BaseDriverConfig driver = null;
   private Operator operator = null;
index 8e9338421e00a7ebf4a6e2ac500515cb87e0f94a..a0fc40f61d0aa2774d361e1afc74c3161ed442d3 100644 (file)
@@ -9,8 +9,8 @@ public class PowerControl extends Command {
     // my beautiful power control subsystems
     private EMABreaker breaker;
     private Battery battery;
+    // TODO: add subsystems back when implementing logic:
     // the real subsystems
-    // TODO: implement current limit logic for these subsystems
     // private Drivetrain drivetrain;
     // private Shooter shooter;
     // private Turret turret;
@@ -32,7 +32,6 @@ public class PowerControl extends Command {
     public PowerControl(
         EMABreaker breaker, // pc
         Battery battery // pc
-        // TODO: add subsystems back when implementing logic:
         // Drivetrain drivetrain, // main draw
         // Shooter shooter, // aiming (vital)
         // Turret turret, // aiming
@@ -42,7 +41,6 @@ public class PowerControl extends Command {
     ) {
         this.breaker = breaker;
         this.battery = battery;
-        // TODO: add these back when implementing logic:
         // this.drivetrain = drivetrain;
         // this.shooter = shooter;
         // this.turret = turret;
index d17bdd21c27b4bcfe73a3e7cf90d5309fdf139bf..e1c0c2cbd59e344d79eb8e6b74ff5ea33e1c46b3 100644 (file)
@@ -549,79 +549,7 @@ public class Vision {
       inputs.connected = camera.isConnected();
       inputs.results = camera.getAllUnreadResults();
 
-      Logger.processInputs("Vision/"+camera.getName(), inputs);
-
-      // Mechanical Advantage's vision logging
-      // // Read new camera observations
-      // Set<Short> tagIds = new HashSet<>();
-      // List<PoseObservation> poseObservations = new LinkedList<>();
-      // for (var result : camera.getAllUnreadResults()) {
-      //   // Update latest target observation
-      //   if (result.hasTargets()) {
-      //     inputs.latestTargetObservation =
-      //         new TargetObservation(
-      //             Rotation2d.fromDegrees(result.getBestTarget().getYaw()),
-      //             Rotation2d.fromDegrees(result.getBestTarget().getPitch()));
-      //   } else {
-      //     inputs.latestTargetObservation = new TargetObservation(new Rotation2d(), new Rotation2d());
-      //   }
-      // }
-      //   // Add pose observation
-      //   if (result.multitagResult.isPresent()) { // Multitag result
-      //     var multitagResult = result.multitagResult.get();
-
-      //     // Calculate robot pose
-      //     Transform3d fieldToCamera = multitagResult.estimatedPose.best;
-      //     Transform3d fieldToRobot = fieldToCamera.plus(VisionConstants.APRIL_TAG_CAMERAS.get(0).getSecond().inverse());
-      //     Pose3d robotPose = new Pose3d(fieldToRobot.getTranslation(), fieldToRobot.getRotation());
-
-      //     // Calculate average tag distance
-      //     double totalTagDistance = 0.0;
-      //     for (var target : result.targets) {
-      //       totalTagDistance += target.bestCameraToTarget.getTranslation().getNorm();
-      //     }
-
-      //     // Add tag IDs
-      //     tagIds.addAll(multitagResult.fiducialIDsUsed);
-
-      //     // Add observation
-      //     poseObservations.add(
-      //         new PoseObservation(
-      //             result.getTimestampSeconds(), // Timestamp
-      //             robotPose, // 3D pose estimate
-      //             multitagResult.estimatedPose.ambiguity, // Ambiguity
-      //             multitagResult.fiducialIDsUsed.size(), // Tag count
-      //             totalTagDistance / result.targets.size(), // Average tag distance
-      //             PoseObservationType.PHOTONVISION)); // Observation type
-
-      //   } else if (!result.targets.isEmpty()) { // Single tag result
-      //     var target = result.targets.get(0);
-
-      //     // Calculate robot pose
-      //     var tagPose = aprilTagLayout.getTagPose(target.fiducialId);
-      //     if (tagPose.isPresent()) {
-      //       Transform3d fieldToTarget =
-      //           new Transform3d(tagPose.get().getTranslation(), tagPose.get().getRotation());
-      //       Transform3d cameraToTarget = target.bestCameraToTarget;
-      //       Transform3d fieldToCamera = fieldToTarget.plus(cameraToTarget.inverse());
-      //       Transform3d fieldToRobot = fieldToCamera.plus(robotToCamera.inverse());
-      //       Pose3d robotPose = new Pose3d(fieldToRobot.getTranslation(), fieldToRobot.getRotation());
-
-      //       // Add tag ID
-      //       tagIds.add((short) target.fiducialId);
-
-      //       // Add observation
-      //       poseObservations.add(
-      //           new PoseObservation(
-      //               result.getTimestampSeconds(), // Timestamp
-      //               robotPose, // 3D pose estimate
-      //               target.poseAmbiguity, // Ambiguity
-      //               1, // Tag count
-      //               cameraToTarget.getTranslation().getNorm(), // Average tag distance
-      //               PoseObservationType.PHOTONVISION)); // Observation type
-      //     }
-      //   }
-      // }
+       Logger.processInputs("Vision/"+camera.getName(), inputs);
     }
     
     /**