forked from JayK445/advantage-kit-migrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify PoseObservation logging, error logging struct
- Loading branch information
Showing
3 changed files
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
package frc.robot.subsystems.vision; | ||
|
||
import edu.wpi.first.math.geometry.Pose3d; | ||
import java.util.LinkedList; | ||
import java.util.List; | ||
import org.littletonrobotics.junction.AutoLog; | ||
|
||
public interface VisionIO { | ||
@AutoLog | ||
class VisionIOInputs { | ||
public class VisionIOInputs { | ||
public boolean connected = false; | ||
public List<PoseObservation> observations = new LinkedList<PoseObservation>(); | ||
public PoseObservation[] observations = new PoseObservation[0]; | ||
} | ||
|
||
default void updateInputs(VisionIOInputs inputs) {} | ||
|
||
// from EstimatedRobotPose | ||
public record PoseObservation( | ||
public static record PoseObservation( | ||
double timestamp, | ||
Pose3d estimatedPose, | ||
double ambiguity, | ||
int tagCount, | ||
double averageDistance, | ||
int[] tagIDs) {} | ||
double averageDistance) {} | ||
|
||
default void updateInputs(VisionIOInputs inputs) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters