Created
October 4, 2016 16:56
-
-
Save raulperula/5f592fb289b56691b92e903763f5f949 to your computer and use it in GitHub Desktop.
Script to show current services running in ROS. Similar to get_published_topics() implemented function in rospy.
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
import rosgraph.masterapi | |
m = rosgraph.masterapi.Master('/my_node') | |
services = m.getSystemState()[2] | |
service_names = [x[0] for x in services] | |
print (service_names) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment