sample_service_radio_buttons.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 
5 from std_srvs.srv import Empty
6 from std_srvs.srv import EmptyResponse
7 
8 
10  def __init__(self):
11  self.services = [
12  rospy.Service('dummy/buttonA', Empty, self._empty_cb),
13  rospy.Service('dummy/buttonB', Empty, self._empty_cb),
14  rospy.Service('dummy/buttonC', Empty, self._empty_cb),
15  rospy.Service('dummy/buttonD', Empty, self._empty_cb),
16  rospy.Service('dummy/buttonE', Empty, self._empty_cb),
17  rospy.Service('dummy/buttonF', Empty, self._empty_cb),
18  ]
19 
20  def _empty_cb(self, req):
21  rospy.loginfo('Empty service called')
22  return EmptyResponse()
23 
24 
25 if __name__ == '__main__':
26  rospy.init_node('sample_service_radio_buttons')
28  rospy.spin()


jsk_rqt_plugins
Author(s):
autogenerated on Sat Mar 20 2021 03:03:13