Add 2024 test mode pictures (#1136)
@@ -144,6 +144,24 @@ public class TestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public enum WPI2024Images {
|
||||
kBackAmpZone_117in,
|
||||
kSpeakerCenter_143in;
|
||||
|
||||
public static double FOV = 68.5;
|
||||
|
||||
public final Path path;
|
||||
|
||||
Path getPath() {
|
||||
var filename = this.toString().substring(1);
|
||||
return Path.of("2024", filename + ".jpg");
|
||||
}
|
||||
|
||||
WPI2024Images() {
|
||||
this.path = getPath();
|
||||
}
|
||||
}
|
||||
|
||||
public enum WPI2023Apriltags {
|
||||
k162_36_Angle,
|
||||
k162_36_Straight,
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.photonvision.common.util.numbers.IntegerCouple;
|
||||
import org.photonvision.mrcal.MrCalJNILoader;
|
||||
import org.photonvision.raspi.LibCameraJNILoader;
|
||||
import org.photonvision.server.Server;
|
||||
import org.photonvision.vision.apriltag.AprilTagFamily;
|
||||
import org.photonvision.vision.camera.FileVisionSource;
|
||||
import org.photonvision.vision.opencv.CVMat;
|
||||
import org.photonvision.vision.opencv.ContourGroupingMode;
|
||||
@@ -261,6 +262,34 @@ public class Main {
|
||||
camConf2023.pipelineSettings = psList2023;
|
||||
}
|
||||
|
||||
CameraConfiguration camConf2024 =
|
||||
ConfigManager.getInstance().getConfig().getCameraConfigurations().get("WPI2024");
|
||||
if (camConf2024 == null || true) {
|
||||
camConf2024 =
|
||||
new CameraConfiguration(
|
||||
"WPI2024",
|
||||
TestUtils.getResourcesFolderPath(true)
|
||||
.resolve("testimages")
|
||||
.resolve(TestUtils.WPI2024Images.kSpeakerCenter_143in.path)
|
||||
.toString());
|
||||
|
||||
camConf2024.FOV = TestUtils.WPI2024Images.FOV;
|
||||
// same camera as 2023
|
||||
camConf2024.calibrations.add(TestUtils.get2023LifeCamCoeffs(true));
|
||||
|
||||
var pipeline2024 = new AprilTagPipelineSettings();
|
||||
var path_split = Path.of(camConf2024.path).getFileName().toString();
|
||||
pipeline2024.pipelineNickname = path_split.replace(".jpg", "");
|
||||
pipeline2024.targetModel = TargetModel.kAprilTag6p5in_36h11;
|
||||
pipeline2024.tagFamily = AprilTagFamily.kTag36h11;
|
||||
pipeline2024.inputShouldShow = true;
|
||||
pipeline2024.solvePNPEnabled = true;
|
||||
|
||||
var psList2024 = new ArrayList<CVPipelineSettings>();
|
||||
psList2024.add(pipeline2024);
|
||||
camConf2024.pipelineSettings = psList2024;
|
||||
}
|
||||
|
||||
// Colored shape testing
|
||||
var camConfShape =
|
||||
ConfigManager.getInstance().getConfig().getCameraConfigurations().get("Shape");
|
||||
@@ -290,12 +319,14 @@ public class Main {
|
||||
var fvs2020 = new FileVisionSource(camConf2020);
|
||||
var fvs2022 = new FileVisionSource(camConf2022);
|
||||
var fvs2023 = new FileVisionSource(camConf2023);
|
||||
var fvs2024 = new FileVisionSource(camConf2024);
|
||||
|
||||
collectedSources.add(fvs2023);
|
||||
collectedSources.add(fvs2022);
|
||||
collectedSources.add(fvsShape);
|
||||
collectedSources.add(fvs2020);
|
||||
collectedSources.add(fvs2019);
|
||||
collectedSources.add(fvs2024);
|
||||
// collectedSources.add(fvs2023);
|
||||
// collectedSources.add(fvs2022);
|
||||
// collectedSources.add(fvsShape);
|
||||
// collectedSources.add(fvs2020);
|
||||
// collectedSources.add(fvs2019);
|
||||
|
||||
ConfigManager.getInstance().unloadCameraConfigs();
|
||||
VisionModuleManager.getInstance().addSources(collectedSources).forEach(VisionModule::start);
|
||||
|
||||
BIN
test-resources/testimages/2024/Amp_42in.jpg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
test-resources/testimages/2024/Amp_85in.jpg
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
test-resources/testimages/2024/BackAmpZone_117in.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
test-resources/testimages/2024/GeneralField1.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
test-resources/testimages/2024/GeneralField2.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
test-resources/testimages/2024/GeneralField3.jpg
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
test-resources/testimages/2024/GeneralField4.jpg
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
test-resources/testimages/2024/GeneralField5.jpg
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
test-resources/testimages/2024/Loading_83in.jpg
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
test-resources/testimages/2024/Podium_103in.jpg
Normal file
|
After Width: | Height: | Size: 143 KiB |
13
test-resources/testimages/2024/README.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
This folder contains images of the AprilTags on the 2024 playing field. All measurements included
|
||||
are approximate and are intended to give a rough idea of views from various distances from field
|
||||
elements. All images were taken with a Microsoft Lifecam at 1280x720 resolution.
|
||||
Camera height: ~29.75 in
|
||||
Camera ~20 degrees pitch above horizontal
|
||||
The folder includes 2 types of images:
|
||||
1. "General Field" images which provide a
|
||||
general idea of the view from various spots on the field with a camera at this
|
||||
height and angle.
|
||||
2. Specific field element images which include a measurement away from a specific field element.
|
||||
The Amp, Loading, and Stage photos are measured to the face of the respective elements,
|
||||
approximately perpendicular from the face. The remaining photos are all measured to the center of
|
||||
the subwoofer face, perpendicular or diagonal as necessary.
|
||||
BIN
test-resources/testimages/2024/SpeakerCenter_143in.jpg
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
test-resources/testimages/2024/SpeakerCenter_19in.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
test-resources/testimages/2024/SpeakerCenter_63in.jpg
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
test-resources/testimages/2024/StageLeft_51in.jpg
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
test-resources/testimages/2024/StageRight_51in.jpg
Normal file
|
After Width: | Height: | Size: 194 KiB |