BroncBotz3481 / YAGSL-Example

Yet Another General Swerve Library Example Project
Apache License 2.0
58 stars 143 forks source link

Add Standard Deviations for YAGSL SwerveDrive Pose Estimator #222

Closed maxikyuu closed 2 months ago

maxikyuu commented 2 months ago

image Implemented the method from PhotonVision's code example that returns the stdDevs for a given camera, to be used with the SwerveDrivePoseEstimator instead of only filtering the poses. This function changes the standard deviations based on the distance and number of tags seen. (e.g. trust the pose values more if the robot sees multiple tags, don't trust the pose values if the robot is far away and only sees 1 tag). However, I had to change some other methods to integrate this. Let me know if I broke anything!

maxikyuu commented 2 months ago

Just made it so the single and multi-tag standard deviations are different for each camera and integrated the requested changes by nstrike!

maxikyuu commented 2 months ago

Deleted vision constants from Constants.java for clarity. I forgot to delete in the previous commit oops