Commit 5157c543 authored by MarkG's avatar MarkG Committed by TIGERs GitLab
Browse files

Resolve "Fix AutoReferee build"

Closes #1704

See merge request main/Sumatra!1472

sumatra-commit: e96e8858bbcb4a5787a53f149cfa7b5c206d2bae
parent 75ea6428
Pipeline #17258 passed with stage
in 6 minutes and 1 second
......@@ -7,6 +7,7 @@
<globalConfiguration>
<environment>ROBOCUP</environment>
<geometry>DIV_A</geometry>
</globalConfiguration>
......
field: <
field_length: 12000
field_width: 9000
goal_width: 1800
goal_depth: 300
boundary_width: 300
penalty_area_depth: 1800
penalty_area_width: 3600
center_circle_radius: 500
line_thickness: 10
goal_center_to_penalty_mark: 8000
goal_height: 155
ball_radius: 21.5
max_robot_radius: 90
>
models: <
straight_two_phase: <
acc_slide: -3
acc_roll: -0.26
k_switch: 0.64
>
chip_fixed_loss: <
damping_xy_first_hop: 0.75
damping_xy_other_hops: 0.95
damping_z: 0.5
>
>
\ No newline at end of file
......@@ -8,7 +8,6 @@
<globalConfiguration>
<environment>ROBOCUP</environment>
<simulation>true</simulation>
<geometry>DIV_A</geometry>
</globalConfiguration>
<module id="edu.tigers.sumatra.cam.ACam">
......
......@@ -244,8 +244,12 @@ public class SSLVisionCamGeometryTranslator
private double uniqueLengthFromSegments(List<CamFieldLine> lines, Set<SSL_FieldShapeType> penaltyStretchTypes)
{
var penaltyStretchTypeNames = penaltyStretchTypes.stream()
.map(SSL_FieldShapeType::name)
.collect(Collectors.toUnmodifiableSet());
List<CamFieldLine> penaltyStretches = lines.stream()
.filter(l -> penaltyStretchTypes.contains(l.getType()))
.filter(l -> penaltyStretchTypes.contains(l.getType()) || penaltyStretchTypeNames.contains(l.getName()))
.collect(Collectors.toUnmodifiableList());
if (penaltyStretches.size() != penaltyStretchTypes.size())
......
......@@ -101,7 +101,8 @@ public class SSLGameLogReader
}
switch (getLogFileTypeFromHeader(fileStream))
LogFileType logFileTypeFromHeader = getLogFileTypeFromHeader(fileStream);
switch (logFileTypeFromHeader)
{
case LOG_FILE:
readLogFile(fileStream);
......@@ -111,7 +112,7 @@ public class SSLGameLogReader
break;
default:
case UNKNOWN:
throw new IOException("Logfile Type Unknown");
throw new IOException("Unhandled log file type: " + logFileTypeFromHeader);
}
fileStream.close();
......@@ -136,6 +137,7 @@ public class SSLGameLogReader
if (!"SSL_".equals(startHeader))
{
log.warn("Unknown header: {}", startHeader);
return LogFileType.UNKNOWN;
}
......@@ -159,7 +161,7 @@ public class SSLGameLogReader
versionNumber = fileStream.readInt();
log.info("Logfile header: " + headerString + ", Version: " + versionNumber);
log.info("Logfile header: {}, Version: {}", headerString, versionNumber);
return optionalLogFileType.orElse(LogFileType.UNKNOWN);
}
......@@ -318,6 +320,7 @@ public class SSLGameLogReader
return versionNumber;
}
/**
* Get notified when a file is loaded.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment