From 417ed113f5955715c7f63c9f627f219fd483439e Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Tue, 7 Jun 2022 13:15:47 +0900 Subject: [PATCH] [jsk_tools] add get_ros_client_hostnames_func --- jsk_tools/env-hooks/99.jsk_tools.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jsk_tools/env-hooks/99.jsk_tools.sh b/jsk_tools/env-hooks/99.jsk_tools.sh index c07ec0fb4..f8152e1dc 100644 --- a/jsk_tools/env-hooks/99.jsk_tools.sh +++ b/jsk_tools/env-hooks/99.jsk_tools.sh @@ -189,3 +189,7 @@ restart_travis() { rosbag_record_interactive() { rosbag record $(zenity --list --column topics $(rostopic list) --multiple --separator=' ') } + +get_ros_client_hostnames() { + rosnode list | xargs -P10 -I% bash -c "rosnode info % | grep \"contacting node\" | sed -e \"s/.*http:\/\///\" | sed -e \"s/:[0-9]*\/.*//\"" | sort -u +}