team_communication: automatically detect target ip address#589
Draft
team_communication: automatically detect target ip address#589
Conversation
texhnolyze
requested changes
Jul 20, 2024
| if self.target_ip is None: | ||
| self.target_ip: IPv4Address = IPv4Address(node.get_parameter("target_ip").value) | ||
|
|
||
| if self.target_ip.is_loopback: |
Contributor
There was a problem hiding this comment.
Since you removed local_target_ports this whole block should also be removed
jaagut
requested changes
Jul 26, 2024
| except (ImportError, ValueError, KeyError, AddressValueError): | ||
| self.logger.warn("Could not detect broadcast address, falling back to configured address") | ||
| self.target_ip = None | ||
| if self.target_ip is None: |
Member
There was a problem hiding this comment.
self.target_ip may not exist at this point
| # Automatically detect UDP broadcast address | ||
| detect_target_ip: true | ||
| wifi_interface: "wlp3s0" | ||
| # Fallback, only used if detect_target_ip is false. This should be the highest IP in the subnet e.g. 172.20.255.255 |
Member
There was a problem hiding this comment.
only used if detect_target_ip is false this is false or irritating.
Its used:
- if detect_target_ip is false
- if detect_target_ip is true, but auto-detection failed
Member
|
What's the state with this PR? @timonegk |
Collaborator
Author
|
It is still relevant but the reviews must be addressed and it has to be tested |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automatically detect the target address for team communication from the wifi interface using
netifaces.In case of any problem, the default address configured is used.
Related issues
Closes #578.
Checklist
colcon build