-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
The following enhancement can be added to ros2 doctor hello command.
- include localhost connectivity check for the topic and multicast. currently it excludes the localhost (same hostname) connectivity check intentionally, but i do not find any reason to exclude this localhost connection check.
- UDP multicast group/port should be configurable via command line argument. Usually in practical environment, users would have specified multicast group and port number to be configured for their requirements, having those optional argument available,
ros2 doctor hellocan help the multicast connectivity check without code change. - we could add service and action connectivity check aligned with topics.
Motivation
motivation are described above.
Design / Implementation Considerations
- localhost inclusion: we can simply remove the following if statement to include the same hostname information in the summary table.
diff --git a/ros2doctor/ros2doctor/verb/hello.py b/ros2doctor/ros2doctor/verb/hello.py
index 04fd666..cf5d483 100644
--- a/ros2doctor/ros2doctor/verb/hello.py
+++ b/ros2doctor/ros2doctor/verb/hello.py
@@ -160,8 +160,7 @@ class HelloSubscriber:
def _callback(self, msg):
msg_data = msg.data.split()
pub_hostname = msg_data[-1]
- if pub_hostname != socket.gethostname():
- self._summary_table.increment_sub(pub_hostname)
+ self._summary_table.increment_sub(pub_hostname)
class HelloMulticastUDPSender:
@@ -225,8 +224,7 @@ class HelloMulticastUDPReceiver:
data, _ = self._socket.recvfrom(4096)
data = data.decode('utf-8')
sender_hostname = data.split()[-1]
- if sender_hostname != socket.gethostname():
- self._summary_table.increment_receive(sender_hostname)
+ self._summary_table.increment_receive(sender_hostname)
except socket.timeout:
pass
- Adding service and action check: we need to check if there is service server and action server is online in the ROS 2 network 1st. and if there isn't, we can start the service and action server on that host, otherwise skip creating servers because they will conflict. it would be probably nice to run the
MultiThreadedExecutor, so that it can process the requests concurrently.
Additional Information
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request