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  self._name = rospy.get_name()
20 
21  def _empty_cb(self, req):
22  rospy.loginfo('{} | Empty service called'.format(self._name))
23  return EmptyResponse()
24 
25 
26 if __name__ == '__main__':
27  rospy.init_node('sample_service_radio_buttons')
29  rospy.spin()


jsk_rqt_plugins
Author(s):
autogenerated on Thu Jun 1 2023 02:45:54