Previously, an IP address for the external referee was specified. This would regularly be localhost when running ssl-game-controller on the same machine (i.e. for testing in sim), but at competitions this IP address would vary often.
This forced us to first manually identify the physical IP address of the game controller, modify the constant, and then recompile.
However, by default, boost/setsockopt allows us to listen on any/all physical interfaces (when binding to a multicast address). So, by simply removing this specification, we should be able to receive referee commands on any setup without any manual configuraiton.
Relevant paragraphs from the setsockopt docs: 1 and 2
Expected result: soccer responds to referee commands (note that behavior is irrelevant; ensure that commands are visible in the left panel of the UI)
Steps to Test
Networked external ref
Run ssl-game-controller on some other machine on the same network as your own
Note: it is possible at comp that this machine is connected directly to yours via a link-layer switch and there may be no router assigning IP addresses.
Run ER-Force simulator-cli
Run make run-sim-ex
Expected result: soccer responds to referee commands (note that behavior is irrelevant; ensure that commands are visible in the left panel of the UI)
Key Files to Review
network.hpp
external_referee.cpp
Review Checklist
[x] Docstrings: All methods and classes should have the file appropriate docstrings which follow the guidelines in the "Contributing" page of our docs.
[x] Remove extra print statements: Any print statements used for debugging should be removed
[x] Tag reviewers: Tag some people for review and ping them on Slack
Description
Previously, an IP address for the external referee was specified. This would regularly be localhost when running ssl-game-controller on the same machine (i.e. for testing in sim), but at competitions this IP address would vary often.
This forced us to first manually identify the physical IP address of the game controller, modify the constant, and then recompile.
However, by default, boost/setsockopt allows us to listen on any/all physical interfaces (when binding to a multicast address). So, by simply removing this specification, we should be able to receive referee commands on any setup without any manual configuraiton.
Relevant paragraphs from the setsockopt docs: 1 and 2
Associated / Resolved Issue
Resolves ClickUp card
Steps to Test
Localhost external ref
simulator-cli
make run-sim-ex
Expected result: soccer responds to referee commands (note that behavior is irrelevant; ensure that commands are visible in the left panel of the UI)
Steps to Test
Networked external ref
simulator-cli
make run-sim-ex
Expected result: soccer responds to referee commands (note that behavior is irrelevant; ensure that commands are visible in the left panel of the UI)
Key Files to Review
network.hpp
external_referee.cpp
Review Checklist