12 return True if master alive and return False if 15 global previous_run_id
18 master_host = urlparse.urlsplit(rospy.core.rosgraph.get_master_uri()).hostname
19 response = os.system(
"ping -W 10 -c 1 " + master_host +
" > /dev/null")
21 print "master machine looks down" 23 assert 1 == rospy.get_master().getSystemState()[0]
24 run_id = rospy.get_param(
"/run_id")
26 if not previous_run_id:
27 previous_run_id = run_id
28 if run_id != previous_run_id:
29 print "run_id is not same" 30 previous_run_id = run_id