Skip to content

Instantly share code, notes, and snippets.

@raulperula
Created October 4, 2016 16:56
Show Gist options
  • Save raulperula/5f592fb289b56691b92e903763f5f949 to your computer and use it in GitHub Desktop.
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.
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