-
Notifications
You must be signed in to change notification settings - Fork 122
Added YAML Config file for robot IP addresses #3474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
itsarune
left a comment
There was a problem hiding this 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!
There was a problem hiding this comment.
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:
Software/src/software/thunderscope/BUILD
Lines 179 to 185 in bd3317f
| 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, |
There was a problem hiding this comment.
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
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
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue