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 QWidget
00016
00017
00018 from geometry_msgs.msg import Twist
00019 from nav_msgs.msg import Odometry
00020
00021
00022 import detail.common_rc
00023 from detail.testsuite_ui import Ui_testsuite_widget
00024
00025 class TestSuiteWidget(QWidget):
00026
00027 def __init__(self, parent=None):
00028 super(TestSuiteWidget, self).__init__(parent)
00029 self._ui = Ui_testsuite_widget()
00030 self._tabs = []
00031
00032 def setupUi(self):
00033 self._ui.setupUi(self)
00034 self._tabs = [self._ui.battery_profile_frame,
00035 self._ui.gyro_drift_frame,
00036 self._ui.payload_frame,
00037 self._ui.cliff_sensor_frame,
00038 self._ui.life_frame,
00039 self._ui.wandering_frame
00040 ]
00041 self._current_tab = self._tabs[self._ui.testsuite_tab_widget.currentIndex()]
00042 self._ui.configuration_dock.setupUi()
00043 self._ui.battery_profile_frame.setupUi()
00044 self._ui.gyro_drift_frame.setupUi()
00045 self._ui.payload_frame.setupUi()
00046 self._ui.cliff_sensor_frame.setupUi()
00047 self._ui.life_frame.setupUi()
00048 self._ui.wandering_frame.setupUi()
00049
00050
00051
00052 def shutdown(self):
00053 self._ui.battery_profile_frame.shutdown()
00054 self._ui.gyro_drift_frame.shutdown()
00055 self._ui.wandering_frame.shutdown()
00056 self._ui.payload_frame.shutdown()
00057 self._ui.cliff_sensor_frame.shutdown()
00058 self._ui.life_frame.shutdown()
00059
00060
00061
00062
00063 @Slot(str)
00064 def on_cmd_vel_topic_combo_box_currentIndexChanged(self, topic_name):
00065
00066
00067 self.cmd_vel_publisher = rospy.Publisher(str(self.cmd_vel_topic_combo_box.currentText()), Twist)
00068
00069 @Slot(str)
00070 def on_odom_topic_combo_box_currentIndexChanged(self, topic_name):
00071
00072 pass
00073
00074 @Slot(int)
00075 def on_testsuite_tab_widget_currentChanged(self, index):
00076 self._current_tab.hibernate()
00077 self._current_tab = self._tabs[self._ui.testsuite_tab_widget.currentIndex()]
00078 self._current_tab.restore()
00079