Add method to clear sim targets (#733)

Closes #731
This commit is contained in:
Nick Hadley
2023-01-11 12:33:19 -05:00
committed by GitHub
parent 5c66785095
commit 39f6ab8805
2 changed files with 17 additions and 1 deletions

View File

@@ -108,6 +108,14 @@ class SimVisionSystem {
->SetPose(target.targetPose.ToPose2d());
}
/**
* Clears all sim vision targets.
* This is useful for switching alliances and needing to repopulate the sim
* targets. NOTE: Old targets will still show on the Field2d unless
* overwritten by new targets with the same ID
*/
void ClearVisionTargets() { targetList.clear(); }
/**
* Adjust the camera position relative to the robot. Use this if your camera
* is on a gimbal or turret or some other mobile platform.