Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 import roslib
00011 roslib.load_manifest('kobuki_qtestsuite')
00012 import rospy
00013
00014 from python_qt_binding.QtCore import Signal,Slot
00015 from python_qt_binding.QtGui import QDockWidget
00016 from rqt_py_common.extended_combo_box import ExtendedComboBox
00017
00018
00019 import detail.common_rc
00020 from detail.configuration_dock_ui import Ui_configuration_dock_widget
00021
00022 class ConfigurationDockWidget(QDockWidget):
00023
00024 def __init__(self, parent=None):
00025 super(ConfigurationDockWidget, self).__init__(parent)
00026
00027 self._ui = Ui_configuration_dock_widget()
00028
00029
00030
00031 def setupUi(self):
00032 self._ui.setupUi(self)
00033 _, _, topic_types = rospy.get_master().getTopicTypes()
00034 cmd_vel_topics = [ topic[0] for topic in topic_types if topic[1] == 'geometry_msgs/Twist' ]
00035 self._ui.cmd_vel_topic_combo_box.setItems.emit(sorted(cmd_vel_topics))
00036
00037 odom_topics = [ topic[0] for topic in topic_types if topic[1] == 'nav_msgs/Odometry' ]
00038 self._ui.odom_topic_combo_box.setItems.emit(sorted(odom_topics))
00039
00040 core_sensor_topics = [ topic[0] for topic in topic_types if topic[1] == 'kobuki_msgs/SensorState' ]
00041 self._ui.core_topic_combo_box.setItems.emit(sorted(core_sensor_topics))
00042
00043 def cmd_vel_topic_name(self):
00044 return str(self._ui.cmd_vel_topic_combo_box.currentText())
00045
00046 def odom_topic_name(self):
00047 return str(self._ui.odom_topic_combo_box.currentText())
00048
00049 def core_sensors_topic_name(self):
00050 return str(self._ui.core_sensor_topic_combo_box.currentText())
00051
00052 def battery_topic_name(self):
00053 return str(self._ui.core_sensor_topic_combo_box.currentText() + '/' + battery)
00054
00055
00056
00057
00058 @Slot(str)
00059 def on_cmd_vel_topic_combo_box_currentIndexChanged(self, topic_name):
00060 pass
00061
00062
00063
00064
00065 @Slot(str)
00066 def on_odom_topic_combo_box_currentIndexChanged(self, topic_name):
00067
00068 pass
00069
00070 @Slot(str)
00071 def on_core_topic_combo_box_currentIndexChanged(self, topic_name):
00072 pass