-
Notifications
You must be signed in to change notification settings - Fork 13
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
team_communication: automatically detect target ip address #589
base: main
Are you sure you want to change the base?
Conversation
self.logger.warn("Could not detect broadcast address, falling back to configured address") | ||
self.target_ip = None | ||
if self.target_ip is None: | ||
self.target_ip: IPv4Address = IPv4Address(node.get_parameter("target_ip").value) | ||
|
||
if self.target_ip.is_loopback: |
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.
Since you removed local_target_ports
this whole block should also be removed
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: |
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.
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 |
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.
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
What's the state with this PR? @timonegk |
It is still relevant but the reviews must be addressed and it has to be tested |
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