Skip to content

Conversation

@AmyKawa
Copy link
Contributor

@AmyKawa AmyKawa commented Jul 5, 2025

Description

When using a VM, robots can now communicate to each other by reading a yml file containing robot ids and ips. File is configured manually for each use case and is fully commented out by default,

Testing Done

None yet - due to the inability to run thunderscope on my laptop, I asked leaders if I could make the PR first.

Resolved Issues

Resolves #3463

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some feedback for you!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel currently doesn't copy robot_ip_config.yml to the build output folder, so when we run thunderscope we get

 with open("robot_ip_config.yml", "r") as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'robot_ip_config.yml'

We can tell Bazel about robot_ip_config.yml by adding it as a data dependency to the wifi_communication_manager python library target:

py_library(
name = "wifi_communication_manager",
srcs = ["wifi_communication_manager.py"],
deps = [
requirement("colorama"),
],
)

Then Bazel will know that wifi_communication_manager needs robot_ip_config.yml at runtime and will make sure to copy this data resource to the output folder.

Alternatively, you could add an optional command line argument to thunderscope_main that accepts a path to a YAML file with the robot IP addresses.

should_setup_full_system: bool = False,
interface: str | None = None,
referee_port: int = SSL_REFEREE_PORT,
config_file: pathlib.Path | None = None,
Copy link
Contributor

@itsarune itsarune Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing param docs for config_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a YAML config for robot IP addresses

3 participants