diff --git a/.idea/runConfigurations/AutoReferee.xml b/.idea/runConfigurations/AutoReferee.xml
index 381c9b35..160eacb0 100644
--- a/.idea/runConfigurations/AutoReferee.xml
+++ b/.idea/runConfigurations/AutoReferee.xml
@@ -4,12 +4,15 @@
-
+
diff --git a/build.gradle b/build.gradle
index 1a41edf8..9749822e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,6 +37,7 @@ dependencies {
implementation project(':moduli-record')
implementation project(':moduli-autoreferee')
+ runtimeOnly project(':moduli-autoreferee-ci')
runtimeOnly project(':moduli-wp')
runtimeOnly project(':moduli-referee')
diff --git a/config/moduli/moduli-ci.xml b/config/moduli/moduli-ci.xml
new file mode 100644
index 00000000..3d0331c3
--- /dev/null
+++ b/config/moduli/moduli-ci.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+ ROBOCUP
+ DIV_A
+
+
+
+
+ edu.tigers.autoreferee.ci.AutoRefereeCiCamModule
+
+
+ 10013
+
+
+
+
+
+ edu.tigers.sumatra.cam.ACam
+
+
+
+
+ edu.tigers.sumatra.vision.VisionFilterImpl
+
+ edu.tigers.sumatra.referee.AReferee
+ edu.tigers.sumatra.cam.ACam
+
+
+
+
+ edu.tigers.sumatra.wp.WorldInfoCollector
+
+ edu.tigers.sumatra.referee.AReferee
+ edu.tigers.sumatra.vision.AVisionFilter
+ edu.tigers.sumatra.persistence.RecordManager
+ edu.tigers.sumatra.cam.ACam
+
+
+
+
+ edu.tigers.sumatra.referee.Referee
+
+
+
+
+
+
+
+
+
+ 10007
+
+
+ edu.tigers.sumatra.wp.AWorldPredictor
+
+
+
+
+ edu.tigers.autoreferee.AutoRefRecordManager
+
+
+
diff --git a/modules/common/src/main/java/edu/tigers/sumatra/ball/BallState.java b/modules/common/src/main/java/edu/tigers/sumatra/ball/BallState.java
index df575c04..feb3f089 100644
--- a/modules/common/src/main/java/edu/tigers/sumatra/ball/BallState.java
+++ b/modules/common/src/main/java/edu/tigers/sumatra/ball/BallState.java
@@ -51,6 +51,7 @@ public class BallState implements IMirrorable
/**
* The spin of the ball in [rad/s], positive spin corresponds to positive linear velocity
*/
+ @NonNull
IVector2 spin;
diff --git a/modules/moduli-autoreferee-ci/build.gradle b/modules/moduli-autoreferee-ci/build.gradle
new file mode 100644
index 00000000..063cf7f2
--- /dev/null
+++ b/modules/moduli-autoreferee-ci/build.gradle
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2009 - 2021, DHBW Mannheim - TIGERs Mannheim
+ */
+
+plugins {
+ id 'sumatra.java'
+ id 'java-library'
+ id 'sumatra.protobuf'
+}
+
+dependencies {
+ implementation project(':common')
+ implementation project(':common-math')
+ implementation project(':sumatra-model')
+ implementation project(':moduli-wp')
+ implementation project(':moduli-vision')
+ implementation project(':moduli-geometry')
+ implementation project(':moduli-referee')
+ implementation project(':moduli-cam')
+
+ implementation 'com.github.TIGERs-Mannheim:moduli:4.1'
+
+ implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
+ implementation 'commons-configuration:commons-configuration:1.10'
+
+ implementation 'com.google.protobuf:protobuf-java:3.19.4'
+}
diff --git a/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiCamModule.java b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiCamModule.java
new file mode 100644
index 00000000..e334f992
--- /dev/null
+++ b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiCamModule.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2009 - 2022, DHBW Mannheim - TIGERs Mannheim
+ */
+
+package edu.tigers.autoreferee.ci;
+
+import edu.tigers.moduli.exceptions.StartModuleException;
+import edu.tigers.sumatra.cam.ACam;
+import edu.tigers.sumatra.cam.SSLVisionCamGeometryTranslator;
+import edu.tigers.sumatra.cam.data.CamGeometry;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry;
+import edu.tigers.sumatra.model.SumatraModel;
+import edu.tigers.sumatra.referee.AReferee;
+import edu.tigers.sumatra.referee.proto.SslGcRefereeMessage;
+import edu.tigers.sumatra.referee.source.DirectRefereeMsgForwarder;
+import edu.tigers.sumatra.referee.source.ERefereeMessageSource;
+import edu.tigers.sumatra.vision.AVisionFilter;
+import edu.tigers.sumatra.vision.data.FilteredVisionFrame;
+import edu.tigers.sumatra.wp.IWorldFrameObserver;
+import edu.tigers.sumatra.wp.TrackerPacketGenerator;
+import edu.tigers.sumatra.wp.WorldInfoCollector;
+import edu.tigers.sumatra.wp.data.WorldFrameWrapper;
+import edu.tigers.sumatra.wp.proto.SslVisionWrapperTracked;
+import edu.tigers.sumatra.wp.proto.SslVisionWrapperTracked.TrackerWrapperPacket;
+
+
+public class AutoRefereeCiCamModule extends ACam implements IWorldFrameObserver
+{
+ private final SSLVisionCamGeometryTranslator geometryTranslator = new SSLVisionCamGeometryTranslator();
+ private final TrackedFrameToFilteredVisionMapper trackedFrameToFilteredVisionMapper = new TrackedFrameToFilteredVisionMapper();
+ private final TrackerPacketGenerator trackerPacketGenerator = new TrackerPacketGenerator("TIGERs");
+ private final AutoRefereeCiServer autoRefereeCiServer = new AutoRefereeCiServer(
+ this::publishDetection,
+ this::publishGeometry,
+ this::publishReferee,
+ this::publishTrackedWrapperFrame
+ );
+
+ private DirectRefereeMsgForwarder refForwarder;
+
+
+ @Override
+ public void startModule() throws StartModuleException
+ {
+ super.startModule();
+ SumatraModel.getInstance().getModule(WorldInfoCollector.class).addObserver(this);
+ AReferee ref = SumatraModel.getInstance().getModule(AReferee.class);
+ refForwarder = (DirectRefereeMsgForwarder) ref.getSource(ERefereeMessageSource.INTERNAL_FORWARDER);
+ int port = getSubnodeConfiguration().getInt("port", 10013);
+ autoRefereeCiServer.setPort(port);
+ autoRefereeCiServer.start();
+ }
+
+
+ @Override
+ public void stopModule()
+ {
+ autoRefereeCiServer.stop();
+ super.stopModule();
+ }
+
+
+ @Override
+ public void onNewWorldFrame(final WorldFrameWrapper wfw)
+ {
+ SslVisionWrapperTracked.TrackerWrapperPacket packet = trackerPacketGenerator.generate(wfw.getSimpleWorldFrame());
+ autoRefereeCiServer.publish(packet);
+ }
+
+
+ private void publishReferee(SslGcRefereeMessage.Referee referee)
+ {
+ refForwarder.send(referee);
+ }
+
+
+ private void publishGeometry(SslVisionGeometry.SSL_GeometryData geometryData)
+ {
+ CamGeometry geometry = geometryTranslator.fromProtobuf(geometryData);
+ notifyNewCameraCalibration(geometry);
+ }
+
+
+ private void publishDetection(SslVisionDetection.SSL_DetectionFrame detectionFrame)
+ {
+ notifyNewCameraFrame(detectionFrame);
+ }
+
+
+ private void publishTrackedWrapperFrame(TrackerWrapperPacket wrapper)
+ {
+ FilteredVisionFrame filteredVisionFrame = trackedFrameToFilteredVisionMapper.map(wrapper.getTrackedFrame());
+ SumatraModel.getInstance().getModule(AVisionFilter.class).publishFilteredVisionFrame(filteredVisionFrame);
+ }
+}
diff --git a/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiServer.java b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiServer.java
new file mode 100644
index 00000000..a2b91a96
--- /dev/null
+++ b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/AutoRefereeCiServer.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2009 - 2022, DHBW Mannheim - TIGERs Mannheim
+ */
+
+package edu.tigers.autoreferee.ci;
+
+import edu.tigers.autoreferee.proto.SslAutorefCi.AutoRefCiInput;
+import edu.tigers.autoreferee.proto.SslAutorefCi.AutoRefCiOutput;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry;
+import edu.tigers.sumatra.referee.proto.SslGcRefereeMessage;
+import edu.tigers.sumatra.util.Safe;
+import edu.tigers.sumatra.wp.proto.SslVisionWrapperTracked;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+import lombok.extern.log4j.Log4j2;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.function.Consumer;
+
+
+@Log4j2
+@RequiredArgsConstructor
+public class AutoRefereeCiServer
+{
+ private final Consumer detectionFrameConsumer;
+ private final Consumer geometryDataConsumer;
+ private final Consumer refereeConsumer;
+ private final Consumer trackerWrapperPacketConsumer;
+
+ @Setter
+ private int port;
+ private Thread thread;
+ private boolean running;
+ private ServerSocket serverSocket;
+ private Socket currentSocket;
+
+
+ public void start()
+ {
+ if (running)
+ {
+ throw new IllegalStateException("Server is already running");
+ }
+ running = true;
+ try
+ {
+ serverSocket = new ServerSocket(port);
+ } catch (IOException e)
+ {
+ log.error("Could not listen on port " + port, e);
+ return;
+ }
+ thread = new Thread(() -> Safe.run(this::listen));
+ thread.setName("AutoRef CI Server");
+ thread.start();
+ }
+
+
+ public void stop()
+ {
+ if (!running)
+ {
+ throw new IllegalStateException("Server is already stopped");
+ }
+ running = false;
+ try
+ {
+ serverSocket.close();
+ } catch (IOException e)
+ {
+ log.warn("Failed to close server socket", e);
+ }
+
+ thread.interrupt();
+ thread = null;
+ serverSocket = null;
+ }
+
+
+ public void publish(SslVisionWrapperTracked.TrackerWrapperPacket trackerWrapperPacket)
+ {
+ Socket socket = currentSocket;
+ if (socket == null)
+ {
+ return;
+ }
+
+ AutoRefCiOutput autoRefCiOutput = AutoRefCiOutput.newBuilder()
+ .setTrackerWrapperPacket(trackerWrapperPacket)
+ .build();
+ try
+ {
+ autoRefCiOutput.writeDelimitedTo(socket.getOutputStream());
+ } catch (IOException e)
+ {
+ log.warn("Failed to publish tracker wrapper packet", e);
+ }
+ }
+
+
+ private void listen()
+ {
+ while (running)
+ {
+ try
+ {
+ currentSocket = accept();
+ while (running)
+ {
+ if (!consume(currentSocket))
+ {
+ break;
+ }
+ }
+ } catch (IOException e)
+ {
+ log.warn("Connection failed", e);
+ }
+ currentSocket = null;
+ }
+ }
+
+
+ private boolean consume(Socket socket) throws IOException
+ {
+ if (socket == null)
+ {
+ return false;
+ }
+ AutoRefCiInput autoRefCiInput = AutoRefCiInput.parseDelimitedFrom(socket.getInputStream());
+ if (autoRefCiInput == null)
+ {
+ return false;
+ }
+ if (autoRefCiInput.hasGeometry())
+ {
+ geometryDataConsumer.accept(autoRefCiInput.getGeometry());
+ }
+ autoRefCiInput.getDetectionList().forEach(detectionFrameConsumer);
+ if (autoRefCiInput.hasRefereeMessage())
+ {
+ refereeConsumer.accept(autoRefCiInput.getRefereeMessage());
+ }
+ if (autoRefCiInput.hasTrackerWrapperPacket())
+ {
+ trackerWrapperPacketConsumer.accept(autoRefCiInput.getTrackerWrapperPacket());
+ }
+ return true;
+ }
+
+
+ private Socket accept() throws IOException
+ {
+ Socket socket = serverSocket.accept();
+ socket.setTcpNoDelay(true);
+ return socket;
+ }
+}
diff --git a/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/TrackedFrameToFilteredVisionMapper.java b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/TrackedFrameToFilteredVisionMapper.java
new file mode 100644
index 00000000..646a5ce4
--- /dev/null
+++ b/modules/moduli-autoreferee-ci/src/main/java/edu/tigers/autoreferee/ci/TrackedFrameToFilteredVisionMapper.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2009 - 2022, DHBW Mannheim - TIGERs Mannheim
+ */
+
+package edu.tigers.autoreferee.ci;
+
+import edu.tigers.sumatra.ball.BallState;
+import edu.tigers.sumatra.drawable.ShapeMap;
+import edu.tigers.sumatra.geometry.Geometry;
+import edu.tigers.sumatra.ids.BotID;
+import edu.tigers.sumatra.ids.ETeamColor;
+import edu.tigers.sumatra.math.vector.IVector2;
+import edu.tigers.sumatra.math.vector.IVector3;
+import edu.tigers.sumatra.math.vector.Vector2;
+import edu.tigers.sumatra.math.vector.Vector3;
+import edu.tigers.sumatra.referee.proto.SslGcCommon;
+import edu.tigers.sumatra.referee.proto.SslGcGeometry;
+import edu.tigers.sumatra.vision.data.FilteredVisionBall;
+import edu.tigers.sumatra.vision.data.FilteredVisionBot;
+import edu.tigers.sumatra.vision.data.FilteredVisionFrame;
+import edu.tigers.sumatra.vision.data.FilteredVisionKick;
+import edu.tigers.sumatra.wp.proto.SslVisionDetectionTracked;
+
+import java.util.List;
+
+
+public class TrackedFrameToFilteredVisionMapper
+{
+ private long ballLastVisibleTimestamp;
+
+
+ public FilteredVisionFrame map(SslVisionDetectionTracked.TrackedFrame trackedFrame)
+ {
+ long timestamp = (long) (trackedFrame.getTimestamp() * 1e9);
+ return FilteredVisionFrame.builder()
+ .withId((long) trackedFrame.getFrameNumber())
+ .withTimestamp(timestamp)
+ .withBall(mapBalls(trackedFrame.getBallsList(), timestamp))
+ .withBots(mapRobots(trackedFrame.getRobotsList(), timestamp))
+ .withShapeMap(new ShapeMap())
+ .withKick(map(trackedFrame.getKickedBall()))
+ .build();
+ }
+
+
+ private FilteredVisionKick map(SslVisionDetectionTracked.KickedBall kickedBall)
+ {
+ long kickTimestamp = (long) (kickedBall.getStartTimestamp() * 1e9);
+ return FilteredVisionKick.builder()
+ .withKickTimestamp(kickTimestamp)
+ .withTrajectoryStartTime(kickTimestamp)
+ .withKickingBot(map(kickedBall.getRobotId()))
+ .withKickingBotPosition(map(kickedBall.getPos()))
+ .withKickingBotOrientation(map(kickedBall.getVel()).getXYVector().getAngle())
+ .withNumBallDetectionsSinceKick(100)
+ .withBallTrajectory(Geometry.getBallFactory().createTrajectoryFromState(BallState.builder()
+ .withPos(Vector3.from2d(map(kickedBall.getPos()), 0))
+ .withVel(map(kickedBall.getVel()))
+ .withAcc(Vector3.zero())
+ .withSpin(Vector2.zero())
+ .build()))
+ .build();
+ }
+
+
+ private List mapRobots(List robots, long timestamp)
+ {
+ return robots.stream().map(robot -> map(robot, timestamp)).toList();
+ }
+
+
+ private FilteredVisionBot map(SslVisionDetectionTracked.TrackedRobot robot, long timestamp)
+ {
+ return FilteredVisionBot.builder()
+ .withBotID(map(robot.getRobotId()))
+ .withTimestamp(timestamp)
+ .withPos(map(robot.getPos()))
+ .withVel(map(robot.getVel()))
+ .withOrientation((double) robot.getOrientation())
+ .withAngularVel((double) robot.getVelAngular())
+ .withQuality(robot.getVisibility())
+ .build();
+ }
+
+
+ private BotID map(SslGcCommon.RobotId robotId)
+ {
+ if (robotId == null)
+ {
+ return BotID.noBot();
+ }
+ return BotID.createBotId(
+ robotId.getId(),
+ switch (robotId.getTeam())
+ {
+ case BLUE -> ETeamColor.BLUE;
+ case YELLOW -> ETeamColor.YELLOW;
+ default -> ETeamColor.NEUTRAL;
+ }
+ );
+ }
+
+
+ private FilteredVisionBall mapBalls(List ballsList, long timestamp)
+ {
+ if (ballsList.isEmpty())
+ {
+ return FilteredVisionBall.builder()
+ .withTimestamp(timestamp)
+ .withLastVisibleTimestamp(ballLastVisibleTimestamp)
+ .withBallState(BallState.builder()
+ .withPos(Vector3.zero())
+ .withVel(Vector3.zero())
+ .withAcc(Vector3.zero())
+ .withSpin(Vector2.zero())
+ .build())
+ .build();
+ }
+ SslVisionDetectionTracked.TrackedBall ball = ballsList.get(0);
+ ballLastVisibleTimestamp = timestamp;
+ return FilteredVisionBall.builder()
+ .withTimestamp(timestamp)
+ .withLastVisibleTimestamp(ballLastVisibleTimestamp)
+ .withBallState(map(ball))
+ .build();
+ }
+
+
+ private BallState map(SslVisionDetectionTracked.TrackedBall ball)
+ {
+ return BallState.builder()
+ .withPos(map(ball.getPos()))
+ .withVel(map(ball.getVel()))
+ .withAcc(Vector3.zero())
+ .withSpin(Vector2.zero())
+ .build();
+ }
+
+
+ private IVector3 map(SslGcGeometry.Vector3 v)
+ {
+ if (v == null)
+ {
+ return Vector3.zero();
+ }
+ return Vector3.fromXYZ(v.getX(), v.getY(), v.getZ()).multiply(1000);
+ }
+
+
+ private IVector2 map(SslGcGeometry.Vector2 v)
+ {
+ if (v == null)
+ {
+ return Vector2.zero();
+ }
+ return Vector2.fromXY(v.getX(), v.getY()).multiply(1000);
+ }
+}
diff --git a/modules/moduli-autoreferee-ci/src/main/proto/ssl_autoref_ci.proto b/modules/moduli-autoreferee-ci/src/main/proto/ssl_autoref_ci.proto
new file mode 100644
index 00000000..219f0730
--- /dev/null
+++ b/modules/moduli-autoreferee-ci/src/main/proto/ssl_autoref_ci.proto
@@ -0,0 +1,29 @@
+syntax = "proto2";
+
+option java_package = "edu.tigers.autoreferee.proto";
+
+import "ssl_vision_wrapper_tracked.proto";
+import "ssl_vision_detection.proto";
+import "ssl_vision_geometry.proto";
+import "ssl_gc_referee_message.proto";
+
+// The AutoRefCiInput contains all packets/messages that would otherwise be received through multicast by the auto-referee
+// It may contain either a raw or a tracked SSL-vision packet. If both are given, the implementation may choose either one.
+message AutoRefCiInput {
+ // Latest referee message
+ optional Referee referee_message = 1;
+ // A tracked SSL-Vision packet to be processed without filtering
+ optional TrackerWrapperPacket tracker_wrapper_packet = 2;
+ // A list of unfiltered SSL-Vision packets (for multiple cameras) to be filtered and processed
+ repeated SSL_DetectionFrame detection = 3;
+ // Current geometry data, to be sent at least once at the beginning of the connection
+ optional SSL_GeometryData geometry = 4;
+}
+
+// The AutoRefCiOutput contains any new data created by the auto-referee for further processing
+message AutoRefCiOutput {
+ // A resulting tracked SSL-Vision packet for input into the ssl-game-controller.
+ // The auto-referee will either generate it from the unfiltered SSL-Vision packets
+ // or simply return the tracked packet from the input.
+ optional TrackerWrapperPacket tracker_wrapper_packet = 1;
+}
diff --git a/modules/moduli-autoreferee/src/main/proto/desired_event_description.proto b/modules/moduli-autoreferee/src/main/proto/desired_event_description.proto
index 0af25b66..d6e48714 100644
--- a/modules/moduli-autoreferee/src/main/proto/desired_event_description.proto
+++ b/modules/moduli-autoreferee/src/main/proto/desired_event_description.proto
@@ -9,7 +9,7 @@ message DesiredEvent {
// to be equal to the ones produced by the autoref to test.
// Since positions and similar scalar values will never exactly match,
// an error tolerance threshold of around 0.5 meters can be applied
- optional edu.tigers.sumatra.referee.proto.GameEvent expected_event = 1;
+ optional GameEvent expected_event = 1;
// this stop_after_event is set to true, additional events may occur after
// the desired event. If it is not set, or set to false, any additional event
// should cause the testcase to fail
diff --git a/modules/moduli-cam-logfile/src/main/java/edu/tigers/sumatra/cam/LogfileVisionCam.java b/modules/moduli-cam-logfile/src/main/java/edu/tigers/sumatra/cam/LogfileVisionCam.java
index 824c6afc..15252876 100644
--- a/modules/moduli-cam-logfile/src/main/java/edu/tigers/sumatra/cam/LogfileVisionCam.java
+++ b/modules/moduli-cam-logfile/src/main/java/edu/tigers/sumatra/cam/LogfileVisionCam.java
@@ -6,7 +6,7 @@
import com.github.g3force.configurable.ConfigRegistration;
import edu.tigers.moduli.exceptions.ModuleNotFoundException;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import edu.tigers.sumatra.gamelog.SSLGameLogReader;
import edu.tigers.sumatra.gamelog.SSLGameLogReader.SSLGameLogfileEntry;
import edu.tigers.sumatra.model.SumatraModel;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ACam.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ACam.java
index 197f38fa..be6c89c5 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ACam.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ACam.java
@@ -6,8 +6,8 @@
import edu.tigers.moduli.AModule;
import edu.tigers.sumatra.cam.data.CamDetectionFrame;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslDetection.SSL_DetectionFrame;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection.SSL_DetectionFrame;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/CamDetectionConverter.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/CamDetectionConverter.java
index 7bb02be9..aaff9f88 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/CamDetectionConverter.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/CamDetectionConverter.java
@@ -7,7 +7,7 @@
import edu.tigers.sumatra.cam.data.CamBall;
import edu.tigers.sumatra.cam.data.CamDetectionFrame;
import edu.tigers.sumatra.cam.data.CamRobot;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslDetection;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection;
import edu.tigers.sumatra.ids.BotID;
import edu.tigers.sumatra.ids.ETeamColor;
import edu.tigers.sumatra.math.vector.Vector2;
@@ -26,7 +26,7 @@ public class CamDetectionConverter
private static CamRobot convertRobot(
- final MessagesRobocupSslDetection.SSL_DetectionRobot bot,
+ final SslVisionDetection.SSL_DetectionRobot bot,
final ETeamColor color,
final long frameId,
final int camId,
@@ -49,7 +49,7 @@ private static CamRobot convertRobot(
* @param detectionFrame SSL vision frame from a single camera
* @return a cam detection frame based on the SSL vision frame
*/
- public CamDetectionFrame convertDetectionFrame(final MessagesRobocupSslDetection.SSL_DetectionFrame detectionFrame)
+ public CamDetectionFrame convertDetectionFrame(final SslVisionDetection.SSL_DetectionFrame detectionFrame)
{
long localCaptureNs = (long) (detectionFrame.getTCapture() * 1e9);
long localSentNs = (long) (detectionFrame.getTSent() * 1e9);
@@ -58,14 +58,14 @@ public CamDetectionFrame convertDetectionFrame(final MessagesRobocupSslDetection
final List blues = new ArrayList<>();
final List yellows = new ArrayList<>();
- for (final MessagesRobocupSslDetection.SSL_DetectionRobot bot : detectionFrame.getRobotsBlueList())
+ for (final SslVisionDetection.SSL_DetectionRobot bot : detectionFrame.getRobotsBlueList())
{
blues.add(convertRobot(bot, ETeamColor.BLUE, frameId, detectionFrame.getCameraId(),
localCaptureNs));
}
// --- process team Yellow ---
- for (final MessagesRobocupSslDetection.SSL_DetectionRobot bot : detectionFrame.getRobotsYellowList())
+ for (final SslVisionDetection.SSL_DetectionRobot bot : detectionFrame.getRobotsYellowList())
{
yellows.add(convertRobot(bot, ETeamColor.YELLOW, frameId,
detectionFrame.getCameraId(),
@@ -73,7 +73,7 @@ public CamDetectionFrame convertDetectionFrame(final MessagesRobocupSslDetection
}
// --- process ball ---
- for (final MessagesRobocupSslDetection.SSL_DetectionBall ball : detectionFrame.getBallsList())
+ for (final SslVisionDetection.SSL_DetectionBall ball : detectionFrame.getBallsList())
{
balls.add(convertBall(ball, localCaptureNs, detectionFrame.getCameraId(),
frameId));
@@ -87,7 +87,7 @@ public CamDetectionFrame convertDetectionFrame(final MessagesRobocupSslDetection
private static CamBall convertBall(
- final MessagesRobocupSslDetection.SSL_DetectionBall ball,
+ final SslVisionDetection.SSL_DetectionBall ball,
final long tCapture,
final int camId,
final long frameId)
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ICamFrameObserver.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ICamFrameObserver.java
index 42f722ba..98eff584 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ICamFrameObserver.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/ICamFrameObserver.java
@@ -5,7 +5,7 @@
import edu.tigers.sumatra.cam.data.CamDetectionFrame;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
/**
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCam.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCam.java
index 1b53031f..47ac93cf 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCam.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCam.java
@@ -9,7 +9,7 @@
import com.github.g3force.configurable.IConfigObserver;
import edu.tigers.moduli.exceptions.InitModuleException;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import edu.tigers.sumatra.network.IReceiverObserver;
import edu.tigers.sumatra.network.MulticastUDPReceiver;
import edu.tigers.sumatra.network.NetworkUtility;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCamGeometryTranslator.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCamGeometryTranslator.java
index c0d97edd..4781f241 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCamGeometryTranslator.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/SSLVisionCamGeometryTranslator.java
@@ -8,14 +8,14 @@
import edu.tigers.sumatra.cam.data.CamFieldLine;
import edu.tigers.sumatra.cam.data.CamFieldSize;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldCircularArc;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldLineSegment;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldShapeType;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryCameraCalibration;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryData;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryFieldSize;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.Vector2f;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldCircularArc;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldLineSegment;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldShapeType;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryCameraCalibration;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryData;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryFieldSize;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.Vector2f;
import edu.tigers.sumatra.math.circle.Arc;
import edu.tigers.sumatra.math.circle.IArc;
import edu.tigers.sumatra.math.line.ILine;
@@ -278,7 +278,7 @@ private double uniqueLengthFromSegments(List lines, Set arcs)
{
return arcs.stream()
- .filter(a -> a.getType() == MessagesRobocupSslGeometry.SSL_FieldShapeType.CenterCircle)
+ .filter(a -> a.getType() == SslVisionGeometry.SSL_FieldShapeType.CenterCircle)
.findFirst()
.map(camFieldArc -> camFieldArc.getArc().radius())
.orElse(DEFAULT_CENTER_CIRCLE_RADIUS);
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamCalibration.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamCalibration.java
index 36a2778f..81c97fe2 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamCalibration.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamCalibration.java
@@ -3,7 +3,7 @@
*/
package edu.tigers.sumatra.cam.data;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryCameraCalibration;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryCameraCalibration;
import edu.tigers.sumatra.export.IJsonString;
import edu.tigers.sumatra.math.SumatraMath;
import edu.tigers.sumatra.math.vector.IVector2;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldArc.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldArc.java
index d33da5e4..32984ceb 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldArc.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldArc.java
@@ -3,7 +3,7 @@
*/
package edu.tigers.sumatra.cam.data;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldShapeType;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldShapeType;
import edu.tigers.sumatra.math.circle.IArc;
import lombok.Value;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldLine.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldLine.java
index 3add697a..494b10de 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldLine.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamFieldLine.java
@@ -3,7 +3,7 @@
*/
package edu.tigers.sumatra.cam.data;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldShapeType;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldShapeType;
import edu.tigers.sumatra.math.line.ILine;
import lombok.Value;
diff --git a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamGeometry.java b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamGeometry.java
index a93f6caa..fd75dc49 100644
--- a/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamGeometry.java
+++ b/modules/moduli-cam/src/main/java/edu/tigers/sumatra/cam/data/CamGeometry.java
@@ -3,7 +3,7 @@
*/
package edu.tigers.sumatra.cam.data;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryModels;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryModels;
import lombok.Builder;
import lombok.Singular;
import lombok.Value;
diff --git a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_detection.proto b/modules/moduli-cam/src/main/proto/ssl_vision_detection.proto
similarity index 99%
rename from modules/moduli-cam/src/main/proto/messages_robocup_ssl_detection.proto
rename to modules/moduli-cam/src/main/proto/ssl_vision_detection.proto
index 07b4129d..ff6eeac4 100644
--- a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_detection.proto
+++ b/modules/moduli-cam/src/main/proto/ssl_vision_detection.proto
@@ -1,4 +1,5 @@
syntax = "proto2";
+
option java_package = "edu.tigers.sumatra.cam.proto";
message SSL_DetectionBall {
diff --git a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_geometry.proto b/modules/moduli-cam/src/main/proto/ssl_vision_geometry.proto
similarity index 99%
rename from modules/moduli-cam/src/main/proto/messages_robocup_ssl_geometry.proto
rename to modules/moduli-cam/src/main/proto/ssl_vision_geometry.proto
index 0f9613af..89eedcd3 100644
--- a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_geometry.proto
+++ b/modules/moduli-cam/src/main/proto/ssl_vision_geometry.proto
@@ -1,4 +1,5 @@
syntax = "proto2";
+
option java_package = "edu.tigers.sumatra.cam.proto";
// A 2D float vector.
@@ -133,4 +134,4 @@ enum SSL_FieldShapeType {
LeftFieldRightPenaltyStretch = 11;
RightFieldLeftPenaltyStretch = 12;
RightFieldRightPenaltyStretch = 13;
-}
\ No newline at end of file
+}
diff --git a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_wrapper.proto b/modules/moduli-cam/src/main/proto/ssl_vision_wrapper.proto
similarity index 67%
rename from modules/moduli-cam/src/main/proto/messages_robocup_ssl_wrapper.proto
rename to modules/moduli-cam/src/main/proto/ssl_vision_wrapper.proto
index 45e15e34..3f4495f8 100644
--- a/modules/moduli-cam/src/main/proto/messages_robocup_ssl_wrapper.proto
+++ b/modules/moduli-cam/src/main/proto/ssl_vision_wrapper.proto
@@ -1,8 +1,9 @@
syntax = "proto2";
+
option java_package = "edu.tigers.sumatra.cam.proto";
-import "messages_robocup_ssl_detection.proto";
-import "messages_robocup_ssl_geometry.proto";
+import "ssl_vision_detection.proto";
+import "ssl_vision_geometry.proto";
message SSL_WrapperPacket {
optional SSL_DetectionFrame detection = 1;
diff --git a/modules/moduli-geometry/src/main/java/edu/tigers/sumatra/geometry/Geometry.java b/modules/moduli-geometry/src/main/java/edu/tigers/sumatra/geometry/Geometry.java
index 7eb8e8ef..3380ecd7 100644
--- a/modules/moduli-geometry/src/main/java/edu/tigers/sumatra/geometry/Geometry.java
+++ b/modules/moduli-geometry/src/main/java/edu/tigers/sumatra/geometry/Geometry.java
@@ -11,7 +11,7 @@
import edu.tigers.sumatra.cam.SSLVisionCamGeometryTranslator;
import edu.tigers.sumatra.cam.data.CamFieldSize;
import edu.tigers.sumatra.cam.data.CamGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry;
import edu.tigers.sumatra.ids.ETeamColor;
import edu.tigers.sumatra.math.circle.Circle;
import edu.tigers.sumatra.math.circle.ICircle;
@@ -206,8 +206,8 @@ private static CamGeometry readGeometryFromFile(String id) throws IOException
{
Path path = CONFIG_PATH.resolve(id + ".txt");
byte[] bytes = Files.readAllBytes(path);
- MessagesRobocupSslGeometry.SSL_GeometryData data = TextFormat.parse(new String(bytes),
- MessagesRobocupSslGeometry.SSL_GeometryData.class);
+ SslVisionGeometry.SSL_GeometryData data = TextFormat.parse(new String(bytes),
+ SslVisionGeometry.SSL_GeometryData.class);
SSLVisionCamGeometryTranslator translator = new SSLVisionCamGeometryTranslator();
return translator.fromProtobuf(data);
}
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_api.proto b/modules/moduli-referee/src/main/proto/ssl_gc_api.proto
index d58e5cf0..59d98178 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_api.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_api.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/api";
import "ssl_gc_state.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_change.proto b/modules/moduli-referee/src/main/proto/ssl_gc_change.proto
index cfb98670..d3d28be6 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_change.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_change.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/statemachine";
import "ssl_gc_state.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_common.proto b/modules/moduli-referee/src/main/proto/ssl_gc_common.proto
index 08c696b0..d104b421 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_common.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_common.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
// Team is either blue or yellow
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_engine.proto b/modules/moduli-referee/src/main/proto/ssl_gc_engine.proto
index 55c2d164..54346589 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_engine.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_engine.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/engine";
import "ssl_gc_geometry.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_engine_config.proto b/modules/moduli-referee/src/main/proto/ssl_gc_engine_config.proto
index 4faa5e3d..c1486887 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_engine_config.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_engine_config.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/engine";
message Config {
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_game_event.proto b/modules/moduli-referee/src/main/proto/ssl_gc_game_event.proto
index 922f737a..c89d8c33 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_game_event.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_game_event.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
import "ssl_gc_common.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_geometry.proto b/modules/moduli-referee/src/main/proto/ssl_gc_geometry.proto
index 030a9e2b..c3dbf866 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_geometry.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_geometry.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/geom";
// A vector with two dimensions
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_rcon.proto b/modules/moduli-referee/src/main/proto/ssl_gc_rcon.proto
index 55bd9d89..745d40d8 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_rcon.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_rcon.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/rcon";
// a reply that is sent by the controller for each request from teams or autoRefs
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_autoref.proto b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_autoref.proto
index 9c38fcdf..b8245f31 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_autoref.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_autoref.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/rcon";
import "ssl_gc_game_event.proto";
@@ -30,4 +30,4 @@ message ControllerToAutoRef {
// a reply from the controller
ControllerReply controller_reply = 1;
}
-}
\ No newline at end of file
+}
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_remotecontrol.proto b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_remotecontrol.proto
index 7ac426ed..b46073ad 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_remotecontrol.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_remotecontrol.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/rcon";
import "ssl_gc_common.proto";
@@ -73,4 +73,4 @@ message ControllerToRemoteControl {
// true, if challenge flag pending
optional bool challenge_flag = 7;
-}
\ No newline at end of file
+}
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_team.proto b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_team.proto
index 61a138ab..95e0fd76 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_rcon_team.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_rcon_team.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/rcon";
import "ssl_gc_rcon.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_referee_message.proto b/modules/moduli-referee/src/main/proto/ssl_gc_referee_message.proto
index 8d51f061..04698673 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_referee_message.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_referee_message.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
import "ssl_gc_game_event.proto";
diff --git a/modules/moduli-referee/src/main/proto/ssl_gc_state.proto b/modules/moduli-referee/src/main/proto/ssl_gc_state.proto
index bf4a91a1..7ad56bda 100644
--- a/modules/moduli-referee/src/main/proto/ssl_gc_state.proto
+++ b/modules/moduli-referee/src/main/proto/ssl_gc_state.proto
@@ -1,6 +1,6 @@
syntax = "proto2";
-package edu.tigers.sumatra.referee.proto;
+option java_package = "edu.tigers.sumatra.referee.proto";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/state";
import "ssl_gc_common.proto";
@@ -114,4 +114,4 @@ message State {
optional Division division = 15;
optional bool auto_continue = 16;
optional Team first_kickoff_team = 17;
-}
\ No newline at end of file
+}
diff --git a/modules/moduli-vision/src/main/java/edu/tigers/sumatra/vision/AVisionFilter.java b/modules/moduli-vision/src/main/java/edu/tigers/sumatra/vision/AVisionFilter.java
index ec7554a4..d5e5dbc7 100644
--- a/modules/moduli-vision/src/main/java/edu/tigers/sumatra/vision/AVisionFilter.java
+++ b/modules/moduli-vision/src/main/java/edu/tigers/sumatra/vision/AVisionFilter.java
@@ -83,7 +83,7 @@ protected void stop()
*
* @param filteredVisionFrame the filtered and complete vision frame
*/
- protected final void publishFilteredVisionFrame(final FilteredVisionFrame filteredVisionFrame)
+ public final void publishFilteredVisionFrame(final FilteredVisionFrame filteredVisionFrame)
{
Safe.forEach(observers, o -> o.onNewFilteredVisionFrame(filteredVisionFrame));
}
diff --git a/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/exporter/SSLVisionSender.java b/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/exporter/SSLVisionSender.java
index e5ef0000..ad32378f 100644
--- a/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/exporter/SSLVisionSender.java
+++ b/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/exporter/SSLVisionSender.java
@@ -5,16 +5,16 @@
package edu.tigers.sumatra.wp.exporter;
import edu.tigers.moduli.AModule;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslDetection;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslDetection.SSL_DetectionBall;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslDetection.SSL_DetectionFrame;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldCircularArc;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_FieldLineSegment;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryData;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.SSL_GeometryFieldSize;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslGeometry.Vector2f;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection.SSL_DetectionBall;
+import edu.tigers.sumatra.cam.proto.SslVisionDetection.SSL_DetectionFrame;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldCircularArc;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_FieldLineSegment;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryData;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.SSL_GeometryFieldSize;
+import edu.tigers.sumatra.cam.proto.SslVisionGeometry.Vector2f;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import edu.tigers.sumatra.geometry.Geometry;
import edu.tigers.sumatra.ids.ETeamColor;
import edu.tigers.sumatra.math.AngleMath;
@@ -96,7 +96,7 @@ public void onNewWorldFrame(final WorldFrameWrapper wFrameWrapper)
for (ITrackedBot bot : wFrameWrapper.getSimpleWorldFrame().getBots().values())
{
- MessagesRobocupSslDetection.SSL_DetectionRobot.Builder sslBot = MessagesRobocupSslDetection.SSL_DetectionRobot
+ SslVisionDetection.SSL_DetectionRobot.Builder sslBot = SslVisionDetection.SSL_DetectionRobot
.newBuilder();
sslBot.setConfidence(1);
sslBot.setRobotId(bot.getBotId().getNumber());
@@ -197,13 +197,13 @@ private SSL_GeometryData.Builder createGeometryMessage()
geometry.setField(field);
- geometry.setModels(MessagesRobocupSslGeometry.SSL_GeometryModels.newBuilder()
- .setStraightTwoPhase(MessagesRobocupSslGeometry.SSL_BallModelStraightTwoPhase.newBuilder()
+ geometry.setModels(SslVisionGeometry.SSL_GeometryModels.newBuilder()
+ .setStraightTwoPhase(SslVisionGeometry.SSL_BallModelStraightTwoPhase.newBuilder()
.setAccSlide(Geometry.getBallParameters().getAccSlide())
.setAccRoll(Geometry.getBallParameters().getAccRoll())
.setKSwitch(Geometry.getBallParameters().getKSwitch())
.build())
- .setChipFixedLoss(MessagesRobocupSslGeometry.SSL_BallModelChipFixedLoss.newBuilder()
+ .setChipFixedLoss(SslVisionGeometry.SSL_BallModelChipFixedLoss.newBuilder()
.setDampingXyFirstHop(Geometry.getBallParameters().getChipDampingXYFirstHop())
.setDampingXyOtherHops(Geometry.getBallParameters().getChipDampingXYOtherHops())
.setDampingZ(Geometry.getBallParameters().getChipDampingZ())
diff --git a/modules/moduli-wp/src/main/proto/ssl_gc_ci.proto b/modules/moduli-wp/src/main/proto/ssl_gc_ci.proto
index 2c897a18..731a17ae 100644
--- a/modules/moduli-wp/src/main/proto/ssl_gc_ci.proto
+++ b/modules/moduli-wp/src/main/proto/ssl_gc_ci.proto
@@ -6,7 +6,7 @@ option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/ci"
import "ssl_vision_wrapper_tracked.proto";
import "ssl_gc_api.proto";
import "ssl_gc_referee_message.proto";
-import "messages_robocup_ssl_geometry.proto";
+import "ssl_vision_geometry.proto";
// The input format to the GC
message CiInput {
@@ -15,7 +15,7 @@ message CiInput {
// New tracker packet with ball and robot data
optional TrackerWrapperPacket tracker_packet = 2;
// (UI) API input
- repeated edu.tigers.sumatra.referee.proto.Input api_inputs = 3;
+ repeated Input api_inputs = 3;
// Update geometry
optional SSL_GeometryData geometry = 4;
}
@@ -23,5 +23,5 @@ message CiInput {
// The output format of the GC response
message CiOutput {
// Latest referee message
- optional edu.tigers.sumatra.referee.proto.Referee referee_msg = 1;
+ optional Referee referee_msg = 1;
}
diff --git a/modules/moduli-wp/src/main/proto/ssl_vision_detection_tracked.proto b/modules/moduli-wp/src/main/proto/ssl_vision_detection_tracked.proto
index d0742fd9..fc30af55 100644
--- a/modules/moduli-wp/src/main/proto/ssl_vision_detection_tracked.proto
+++ b/modules/moduli-wp/src/main/proto/ssl_vision_detection_tracked.proto
@@ -19,10 +19,10 @@ enum Capability {
// A single tracked ball
message TrackedBall {
// The position (x, y, height) [m] in the ssl-vision coordinate system
- required edu.tigers.sumatra.referee.proto.Vector3 pos = 1;
+ required Vector3 pos = 1;
// The velocity [m/s] in the ssl-vision coordinate system
- optional edu.tigers.sumatra.referee.proto.Vector3 vel = 2;
+ optional Vector3 vel = 2;
// The visibility of the ball
// A value between 0 (not visible) and 1 (visible)
@@ -33,32 +33,32 @@ message TrackedBall {
// A ball kicked by a robot, including predictions when the ball will come to a stop
message KickedBall {
// The initial position [m] from which the ball was kicked
- required edu.tigers.sumatra.referee.proto.Vector2 pos = 1;
+ required Vector2 pos = 1;
// The initial velocity [m/s] with which the ball was kicked
- required edu.tigers.sumatra.referee.proto.Vector3 vel = 2;
+ required Vector3 vel = 2;
// The unix timestamp [s] when the kick was performed
required double start_timestamp = 3;
// The predicted unix timestamp [s] when the ball comes to a stop
optional double stop_timestamp = 4;
// The predicted position [m] at which the ball will come to a stop
- optional edu.tigers.sumatra.referee.proto.Vector2 stop_pos = 5;
+ optional Vector2 stop_pos = 5;
// The robot that kicked the ball
- optional edu.tigers.sumatra.referee.proto.RobotId robot_id = 6;
+ optional RobotId robot_id = 6;
}
// A single tracked robot
message TrackedRobot {
- required edu.tigers.sumatra.referee.proto.RobotId robot_id = 1;
+ required RobotId robot_id = 1;
// The position [m] in the ssl-vision coordinate system
- required edu.tigers.sumatra.referee.proto.Vector2 pos = 2;
+ required Vector2 pos = 2;
// The orientation [rad] in the ssl-vision coordinate system
required float orientation = 3;
// The velocity [m/s] in the ssl-vision coordinate system
- optional edu.tigers.sumatra.referee.proto.Vector2 vel = 4;
+ optional Vector2 vel = 4;
// The angular velocity [rad/s] in the ssl-vision coordinate system
optional float vel_angular = 5;
diff --git a/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogReader.java b/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogReader.java
index 0b78be17..9b51176e 100644
--- a/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogReader.java
+++ b/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogReader.java
@@ -5,7 +5,7 @@
import com.google.common.primitives.Bytes;
import com.google.protobuf.AbstractMessage;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import edu.tigers.sumatra.gamelog.proto.LogLabelerData;
import edu.tigers.sumatra.referee.proto.SslGcRefereeMessage.Referee;
import org.apache.logging.log4j.LogManager;
diff --git a/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogRecorder.java b/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogRecorder.java
index d4987bd0..413abf75 100644
--- a/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogRecorder.java
+++ b/modules/sumatra-gamelog/src/main/java/edu/tigers/sumatra/gamelog/SSLGameLogRecorder.java
@@ -6,7 +6,7 @@
import edu.tigers.moduli.exceptions.ModuleNotFoundException;
import edu.tigers.sumatra.cam.ACam;
import edu.tigers.sumatra.cam.ICamFrameObserver;
-import edu.tigers.sumatra.cam.proto.MessagesRobocupSslWrapper.SSL_WrapperPacket;
+import edu.tigers.sumatra.cam.proto.SslVisionWrapper.SSL_WrapperPacket;
import edu.tigers.sumatra.model.SumatraModel;
import edu.tigers.sumatra.referee.AReferee;
import edu.tigers.sumatra.referee.IRefereeObserver;
diff --git a/modules/sumatra-gamelog/src/main/proto/log_labeler_data.proto b/modules/sumatra-gamelog/src/main/proto/log_labeler_data.proto
index 7f280e51..63a9b164 100644
--- a/modules/sumatra-gamelog/src/main/proto/log_labeler_data.proto
+++ b/modules/sumatra-gamelog/src/main/proto/log_labeler_data.proto
@@ -1,7 +1,8 @@
syntax = "proto3";
+
option java_package = "edu.tigers.sumatra.gamelog.proto";
-import "messages_robocup_ssl_wrapper.proto";
+import "ssl_vision_wrapper.proto";
import "ssl_gc_referee_message.proto";
message LabelerMetadata {
@@ -15,7 +16,7 @@ message LabelerFrame {
uint64 timestamp = 1;
oneof frame {
SSL_WrapperPacket vision_frame = 2;
- edu.tigers.sumatra.referee.proto.Referee referee_frame = 3;
+ Referee referee_frame = 3;
}
}
diff --git a/modules/sumatra-gamelog/src/main/proto/log_labels.proto b/modules/sumatra-gamelog/src/main/proto/log_labels.proto
index 61cdf9e7..9edfd59e 100644
--- a/modules/sumatra-gamelog/src/main/proto/log_labels.proto
+++ b/modules/sumatra-gamelog/src/main/proto/log_labels.proto
@@ -46,4 +46,4 @@ message Labels {
repeated BallPossessionLabel ball_possession_labels = 2;
repeated PassingLabel passing_labels = 3;
repeated GoalShotLabel goal_shot_labels = 4;
-}
\ No newline at end of file
+}
diff --git a/settings.gradle b/settings.gradle
index d728479b..ed7bdd5d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -11,6 +11,7 @@ include(':common-gui')
include(':common-gui-config')
include(':common-math')
include(':moduli-autoreferee')
+include(':moduli-autoreferee-ci')
include(':moduli-cam')
include(':moduli-cam-logfile')
include(':moduli-geometry')
@@ -33,6 +34,7 @@ project(':common-gui').projectDir = file('modules/common-gui')
project(':common-gui-config').projectDir = file('modules/common-gui-config')
project(':common-math').projectDir = file('modules/common-math')
project(':moduli-autoreferee').projectDir = file('modules/moduli-autoreferee')
+project(':moduli-autoreferee-ci').projectDir = file('modules/moduli-autoreferee-ci')
project(':moduli-cam').projectDir = file('modules/moduli-cam')
project(':moduli-cam-logfile').projectDir = file('modules/moduli-cam-logfile')
project(':moduli-geometry').projectDir = file('modules/moduli-geometry')
diff --git a/src/main/java/edu/tigers/autoref/AutoReferee.java b/src/main/java/edu/tigers/autoref/AutoReferee.java
index 13571721..a66696db 100644
--- a/src/main/java/edu/tigers/autoref/AutoReferee.java
+++ b/src/main/java/edu/tigers/autoref/AutoReferee.java
@@ -39,9 +39,9 @@ public static void main(final String[] args)
ifHasOption("h", () -> printHelp(options));
ifNotHasOption("hl", () -> SwingUtilities.invokeLater(AutoReferee::startUi));
-
+
start();
-
+
ifHasOption("a", AutoReferee::activateAutoRef);
}
@@ -83,6 +83,7 @@ private static Options createOptions()
options.addOption("hl", "headless", false, "run without a UI");
options.addOption("a", "active", false, "Start autoRef in active mode");
options.addOption("w", "window", true, "Set window size (example: 1920x1080)");
+ options.addOption("c", "ci", false, "Enable CI mode");
return options;
}
@@ -117,7 +118,8 @@ private static void activateAutoRef()
private static void start()
{
- SumatraModel.getInstance().setCurrentModuliConfig("moduli.xml");
+ String config = cmd.hasOption("c") ? "moduli-ci.xml" : "moduli.xml";
+ SumatraModel.getInstance().setCurrentModuliConfig(config);
try
{
SumatraModel.getInstance().loadModulesOfConfigSafe(SumatraModel.getInstance().getCurrentModuliConfig());