4 from std_srvs.srv
import Empty
7 if __name__ ==
'__main__':
8 rospy.init_node(
'sample_empty_service_caller')
9 rospy.wait_for_service(
'~service')
10 r = rospy.Rate(rospy.get_param(
'~rate', 1.0))
11 while not rospy.is_shutdown():
13 srv_caller = rospy.ServiceProxy(
'~service', Empty)
15 except rospy.ServiceException
as e:
16 rospy.logwarn(
'Service call failed:\n{}'.format(e))
20 except rospy.ROSTimeMovedBackwardsException: