RoboJackets / robocup-software

Georgia Tech RoboJackets Software for the RoboCup Small Size League
Apache License 2.0
183 stars 187 forks source link

Accept referee commands from all physical interfaces #2221

Closed sid-parikh closed 7 months ago

sid-parikh commented 8 months ago

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

  1. Run ssl-game-controller
  2. Run ER-Force simulator-cli
  3. 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)

Steps to Test

Networked external ref

  1. 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.
  2. Run ER-Force simulator-cli
  3. 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

Review Checklist

sid-parikh commented 8 months ago

Just like Kevin said, this somehow broke everything on the field computer. Needs some further testing.