def restore(self): ''' Restore the frame after a hibernate. ''' self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Error") self._plot_layout.addWidget(self._plot_widget) self._plot_widget.switch_data_plot_widget(DataPlot(self._plot_widget)) self._plot_widget.data_plot.dynamic_range = True self._plot_widget_live = PlotWidget() self._plot_widget_live.setWindowTitle("Live Graphs") self._plot_widget_live.switch_data_plot_widget(DataPlot(self._plot_widget_live)) self._plot_layout.addWidget(self._plot_widget_live)
def setupUi(self): self._ui.setupUi(self) self._plot_layout = QVBoxLayout(self._ui.scan_angle_group_box) self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Error") self._plot_layout.addWidget(self._plot_widget) self._plot_widget.switch_data_plot_widget(FullSizeDataPlot(self._plot_widget)) self._plot_widget.data_plot.dynamic_range = True self._plot_widget_live = PlotWidget() self._plot_widget_live.setWindowTitle("Live Graphs") self._plot_widget_live.switch_data_plot_widget(MatDataPlot(self._plot_widget_live)) self._plot_layout.addWidget(self._plot_widget_live) self._ui.start_button.setEnabled(True) self._ui.stop_button.setEnabled(False)
def __init__(self, parent=None): super(PlotConfiguration, self).__init__(parent) self._rospack = rospkg.RosPack() plot_configuration_file = os.path.join( self._rospack.get_path('sleo_testsuite'), 'resource/ui', 'plot_configuration.ui') # loadUi(plot_configuration_file, self) loadUi(plot_configuration_file, self, {'DataPlot': DataPlot}) self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Plot Profile") self._plot_widget.topic_edit.setText( "/sleo_velocity_controller/cmd_vel") self.horizontalLayout_4.addWidget(self._plot_widget) self._plot_widget.switch_data_plot_widget(self._widget_data_plot) self._old_cmd_topic = self._cmd_topic_comboBox.currentText() self._old_odom_topic = self._odom_topic_comboBox.currentText() # Get current topic list and fileter contains topics we will use self._topics_and_types = rospy.get_published_topics() for topic, type in self._topics_and_types: #print 'topic: '+ topic + ' type: ' + type + '\n' if type == 'geometry_msgs/Twist': self._cmd_topic_comboBox.addItem(topic) if type == 'nav_msgs/Odometry': self._odom_topic_comboBox.addItem(topic)
def setupUi(self): self._ui.setupUi(self) self._plot_layout = QVBoxLayout(self._ui.battery_profile_group_box) self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Battery Profile") self._plot_widget.topic_edit.setText(self._battery_topic_name) self._plot_layout.addWidget(self._plot_widget) self._plot_widget.switch_data_plot_widget( FullSizeDataPlot(self._plot_widget)) self._ui.start_button.setEnabled(True) self._ui.stop_button.setEnabled(False)
def restore(self): ''' Restore the frame after a hibernate. ''' self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Battery Profile") self._plot_widget.topic_edit.setText(self._battery_topic_name) self._plot_layout.addWidget(self._plot_widget) self._data_plot = DataPlot(self._plot_widget) self._data_plot.set_autoscale(y=False) self._data_plot.set_ylim([0, 180]) self._plot_widget.switch_data_plot_widget(self._data_plot)
def setupUi(self, cmd_vel_topic_name): self._ui.setupUi(self) self._cmd_vel_topic_name = cmd_vel_topic_name self._plot_layout = QVBoxLayout(self._ui.battery_profile_group_box) self._plot_widget = PlotWidget() self._plot_widget.setWindowTitle("Battery Profile") self._plot_widget.topic_edit.setText(self._battery_topic_name) self._plot_layout.addWidget(self._plot_widget) self._data_plot = DataPlot(self._plot_widget) self._data_plot.set_autoscale(y=False) self._data_plot.set_ylim([0, 180]) self._plot_widget.switch_data_plot_widget(self._data_plot) self._ui.start_button.setEnabled(True) self._ui.stop_button.setEnabled(False)