forked from TIGERs-Mannheim/AutoReferee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve "Sumatra simulation timing is wrong"
Closes #1584 See merge request main/Sumatra!1330 sumatra-commit: 66e44fa7f3f6431820821a6c88d03d8135c4c699
- Loading branch information
1 parent
d84420d
commit c320c25
Showing
8 changed files
with
96 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
/* | ||
* Copyright (c) 2009 - 2017, DHBW Mannheim - TIGERs Mannheim | ||
* Copyright (c) 2009 - 2021, DHBW Mannheim - TIGERs Mannheim | ||
*/ | ||
package edu.tigers.sumatra.vision; | ||
|
||
import java.awt.Color; | ||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Map.Entry; | ||
import java.util.Optional; | ||
import java.util.concurrent.CopyOnWriteArrayList; | ||
import java.util.stream.Collectors; | ||
|
||
import com.github.g3force.configurable.ConfigRegistration; | ||
import com.github.g3force.configurable.Configurable; | ||
|
||
import edu.tigers.sumatra.cam.data.CamCalibration; | ||
import edu.tigers.sumatra.cam.data.CamDetectionFrame; | ||
import edu.tigers.sumatra.cam.data.CamGeometry; | ||
|
@@ -30,22 +19,32 @@ | |
import edu.tigers.sumatra.math.vector.Vector2; | ||
import edu.tigers.sumatra.math.vector.Vector2f; | ||
|
||
import java.awt.Color; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Map.Entry; | ||
import java.util.Optional; | ||
import java.util.concurrent.ConcurrentSkipListMap; | ||
import java.util.concurrent.CopyOnWriteArrayList; | ||
import java.util.stream.Collectors; | ||
|
||
|
||
/** | ||
* The viewport architect inspects all camera geometries and aligns their viewports to a predefined overlap. | ||
* | ||
* | ||
* @author AndreR <[email protected]> | ||
*/ | ||
public class ViewportArchitect | ||
{ | ||
private Map<Integer, Viewport> viewports = new HashMap<>(); | ||
private Map<Integer, Viewport> viewports = new ConcurrentSkipListMap<>(); | ||
private final List<IViewportArchitect> observers = new CopyOnWriteArrayList<>(); | ||
private Viewport field; | ||
|
||
|
||
@Configurable(defValue = "400.0", comment = "Maximum camera overlap. [mm]") | ||
private static double maxViewportOverlap = 400.0; | ||
|
||
@Configurable(defValue = "DYNAMICALLY", comment = "Method to be used to construct viewports.") | ||
private static EViewportConstruction viewportConstruction = EViewportConstruction.DYNAMICALLY; | ||
|
||
|
Oops, something went wrong.