mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
[WIP] Simulation Overhaul (#742)
### What does this do? - Deprecates previous sim classes - Has a `CameraProperties` class for describing a camera's basic/calibration info, and performance values for simulation. Calibration values can be loaded from the `config.json` in the settings exported by photonvision. - `OpenCVHelp` provides convenience functions for using opencv methods with wpilib/photonvision classes, mainly to project 3d points to a camera's 2d image and perform solvePnP with the above camera calibration info. - `TargetModel`s describe the 3d shape of a target, both for projecting into the camera's 2d image and use in solvePnP. - `PhotonCameraSim` uses camera properties to simulate how 3d targets would appear in its view, and has simulated noise, latency, and FPS. For apriltags, the best/alternate camera-to-target transform is also estimated with solvePnP. - `VideoSimUtil` has helper functions for drawing apriltags to a simulated raw and processed MJPEG stream for each camera using the projected tag corners. - `VisionSystemSim` stores `VisionTargetSim`s and `PhotonCameraSim`s, and is periodically updated with the robot's simulated pose. When updating, camera sims are automatically processed and published with their visible targets from their respective poses with proper latency. ### What's still not working? - Mac Arm builds are broken - More examples - Update website/docs
This commit is contained in:
@@ -118,14 +118,14 @@ public class PhotonTrackedTarget {
|
||||
* Return a list of the n corners in image space (origin top left, x right, y down), in no
|
||||
* particular order, detected for this target.
|
||||
*
|
||||
* <p>For fiducials, the order is known and is always counter-clock wise around the tag, like so
|
||||
* <p>For fiducials, the order is known and is always counter-clock wise around the tag, like so:
|
||||
*
|
||||
* <p>spotless:off
|
||||
* -> +X 3 ----- 2
|
||||
* <pre>
|
||||
* ⟶ +X 3 ----- 2
|
||||
* | | |
|
||||
* V | |
|
||||
* +Y 0 ----- 1
|
||||
* spotless:on
|
||||
* </pre>
|
||||
*/
|
||||
public List<TargetCorner> getDetectedCorners() {
|
||||
return detectedCorners;
|
||||
|
||||
Reference in New Issue
Block a user