Using Multiple Limelights with Swerve Drive Pose Estimator

Hello,

My team has set up one limelight and we periodically add the vision measurement to the swerve drive pose estimator. We are currently thinking of adding multiple limelights and so do we need to average the vision data and then add them into the pose estimator or do we simply add another “addVisionMeasurement” for each data that is returned from limelight (in other words does the SwerveDrivePoseEstimator class handle this behind the scenes)?

Thank you

Just get which limelight has the bigger tag reading (meaning it’s likely more accurate) and add that limelight’s pose data. And obviously if one doesn’t have data then use the other.

Wouldn’t it be better to average the pose data from all the limelights when all of them see a tag?

Already answered in multiple threads. Add both poses to the estimator. Nothing stopping you from calling addVisionMeasurement multiple times in one robot loop.