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()
sample_service_radio_buttons.SampleServiceRadioButtons._empty_cb
def _empty_cb(self, req)
Definition: sample_service_radio_buttons.py:21
sample_service_radio_buttons.SampleServiceRadioButtons.services
services
Definition: sample_service_radio_buttons.py:11
sample_service_radio_buttons.SampleServiceRadioButtons
Definition: sample_service_radio_buttons.py:9
sample_service_radio_buttons.SampleServiceRadioButtons.__init__
def __init__(self)
Definition: sample_service_radio_buttons.py:10
sample_service_radio_buttons.SampleServiceRadioButtons._name
_name
Definition: sample_service_radio_buttons.py:19


jsk_rqt_plugins
Author(s):
autogenerated on Mon Apr 7 2025 02:49:46