11 roslib.load_manifest(
'kobuki_qtestsuite')
14 from python_qt_binding.QtCore
import Signal,Slot
16 from python_qt_binding.QtGui
import QDockWidget
18 from python_qt_binding.QtWidgets
import QDockWidget
22 import detail.common_rc
23 from detail.configuration_dock_ui
import Ui_configuration_dock_widget
28 super(ConfigurationDockWidget, self).
__init__(parent)
30 self.
_ui = Ui_configuration_dock_widget()
35 self._ui.setupUi(self)
36 _, _, topic_types = rospy.get_master().getTopicTypes()
37 cmd_vel_topics = [ topic[0]
for topic
in topic_types
if topic[1] ==
'geometry_msgs/Twist' ]
38 self._ui.cmd_vel_topic_combo_box.setItems.emit(sorted(cmd_vel_topics))
40 odom_topics = [ topic[0]
for topic
in topic_types
if topic[1] ==
'nav_msgs/Odometry' ]
41 self._ui.odom_topic_combo_box.setItems.emit(sorted(odom_topics))
43 core_sensor_topics = [ topic[0]
for topic
in topic_types
if topic[1] ==
'kobuki_msgs/SensorState' ]
44 self._ui.core_topic_combo_box.setItems.emit(sorted(core_sensor_topics))
47 return str(self._ui.cmd_vel_topic_combo_box.currentText())
50 return str(self._ui.odom_topic_combo_box.currentText())
53 return str(self._ui.core_sensor_topic_combo_box.currentText())
56 return str(self._ui.core_sensor_topic_combo_box.currentText() +
'/' + battery)