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

@@ -119,7 +119,6 @@ public class SimVisionSystem {
dbgField
.getObject("Target " + Integer.toString(target.targetID))
.setPose(target.targetPose.toPose2d());
;
}
/**
@@ -139,6 +138,15 @@ public class SimVisionSystem {
}
}
/**
* 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
*/
public void clearVisionTargets() {
tgtList.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.