diff --git a/safety_master_plugin/scripts/qt_master_wrapper.py b/safety_master_plugin/scripts/qt_master_wrapper.py index c029d43..c69bf07 100644 --- a/safety_master_plugin/scripts/qt_master_wrapper.py +++ b/safety_master_plugin/scripts/qt_master_wrapper.py @@ -33,9 +33,11 @@ class QtWrapper: # self.disable_sliders_tracking() - self.distance_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Distance.png') - self.angular_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Angular.png') - self.linear_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Linear.png') + ui_directory_path = '{0}/ui'.format(rospkg.RosPack().get_path('safety_master_plugin')) + + self.distance_pixmap = QPixmap('{0}/Distance.png'.format(ui_directory_path)) + self.angular_pixmap = QPixmap('{0}/Angular.png'.format(ui_directory_path)) + self.linear_pixmap = QPixmap('{0}/Linear.png'.format(ui_directory_path)) self.widget.distanceImage.setPixmap(self.distance_pixmap) self.widget.angularImage.setPixmap(self.angular_pixmap) self.widget.linearImage.setPixmap(self.linear_pixmap) diff --git a/safety_user_plugin/scripts/qt_wrapper.py b/safety_user_plugin/scripts/qt_wrapper.py index a83cee2..d69ddf6 100644 --- a/safety_user_plugin/scripts/qt_wrapper.py +++ b/safety_user_plugin/scripts/qt_wrapper.py @@ -22,15 +22,18 @@ class QtWrapper: self.clear_robot_info() - self.distance_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Distance.png') - self.angular_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Angular.png') - self.linear_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Linear.png') + ui_directory_path = '{0}/ui'.format(rospkg.RosPack().get_path('safety_user_plugin')) + + self.distance_pixmap = QPixmap('{0}/Distance.png'.format(ui_directory_path)) + self.angular_pixmap = QPixmap('{0}/Angular.png'.format(ui_directory_path)) + self.linear_pixmap = QPixmap('{0}/Linear.png'.format(ui_directory_path)) + self.widget.distanceImage.setPixmap(self.distance_pixmap.scaled(66,46)) self.widget.angularImage.setPixmap(self.angular_pixmap) self.widget.linearImage.setPixmap(self.linear_pixmap.scaled(20,48)) - self.ok_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Ok.jpg') - self.cancel_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Cancel.jpg') + self.ok_pixmap = QPixmap('{0}/Ok.jpg'.format(ui_directory_path)) + self.cancel_pixmap = QPixmap('{0}/Cancel.jpg'.format(ui_directory_path)) def disconnect_signals(self): self.widget.clutchButton.clicked.disconnect()