How to get the URI of a ROS node in Python?
I'm trying to find machines that publish a certain type of message. Therefore I'm inspecting the list of rosnodes rosnode.rosnode_listnodes()
and would like to get the IP address of the corresponding machines running a specific node.
There is a method rosnode.lookup_uri(...)
, but I have no idea how to use it. I also looked into the rospy
, rosgraph
, names
and network
modules - so far without success. Among other information,rosnode.rosnode_info(node_name)
prints the URI. But it might be a rather expensive method and, unfortunately, it returns None
.