diff --git a/safety_master_plugin/scripts/master_restrictions.py b/safety_master_plugin/scripts/master_restrictions.py index 5df47c8..0715601 100644 --- a/safety_master_plugin/scripts/master_restrictions.py +++ b/safety_master_plugin/scripts/master_restrictions.py @@ -2,13 +2,12 @@ class Restrictions: - def __init__(self,distance,linear_velocity,angular_velocity): - self.distance = distance - self.linear_velocity = linear_velocity - self.angular_velocity = angular_velocity + def __init__(self,distance,angular_velocity,linear_velocity): + self.distance = distance + self.angular_velocity = angular_velocity + self.linear_velocity = linear_velocity - - def update_restrictions(self,restrictions_msg): - self.distance = restrictions_msg.distance.data - self.linear_velocity = restrictions_msg.linear_velocity.data - self.angular_velocity = restrictions_msg.angular_velocity.data \ No newline at end of file + def update_restrictions(self,restrictions_msg): + self.distance = restrictions_msg.distance.data + self.linear_velocity = restrictions_msg.linear_velocity.data + self.angular_velocity = restrictions_msg.angular_velocity.data \ No newline at end of file diff --git a/safety_master_plugin/scripts/qt_master_wrapper.py b/safety_master_plugin/scripts/qt_master_wrapper.py index 1330f1d..c1da1b2 100644 --- a/safety_master_plugin/scripts/qt_master_wrapper.py +++ b/safety_master_plugin/scripts/qt_master_wrapper.py @@ -33,8 +33,12 @@ class QtWrapper: # self.disable_sliders_tracking() - # 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.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') + self.widget.distanceImage.setPixmap(self.distance_pixmap) + self.widget.angularImage.setPixmap(self.angular_pixmap) + self.widget.linearImage.setPixmap(self.linear_pixmap) def set_sliders_to_initial_values(self): self.widget.distanceSlider.setMaximum(200) @@ -164,16 +168,6 @@ class QtWrapper: item.setTextAlignment(Qt.AlignCenter) item.setEditable(0) self.stdItemModel.setItem(row_number,i,item) - # new_robot_info2=QStandardItem('PIONIER'+str(robot_id)) - # new_robot_info3=QStandardItem('PIONIER'+str(robot_id)) - # new_robot_info4=QStandardItem('PIONIER'+str(robot_id)) - # new_robot_info5=QStandardItem('PIONIER'+str(robot_id)) - # new_robot_info6=QStandardItem('PIONIER'+str(robot_id)) - - # items_list = [new_robot_info,new_robot_info2,new_robot_info3,new_robot_info4,new_robot_info5,new_robot_info6] - - # self.stdItemModel.insertRow(self.stdItemModel.rowCount(),items_list) - # raise NotImplementedError def master_stopped(self): self.master_stop_state = SS.STOPPED diff --git a/safety_master_plugin/ui/Angular.png b/safety_master_plugin/ui/Angular.png new file mode 100644 index 0000000..6b85fc6 Binary files /dev/null and b/safety_master_plugin/ui/Angular.png differ diff --git a/safety_master_plugin/ui/Distance.png b/safety_master_plugin/ui/Distance.png new file mode 100644 index 0000000..c7c7a08 Binary files /dev/null and b/safety_master_plugin/ui/Distance.png differ diff --git a/safety_master_plugin/ui/Linear.png b/safety_master_plugin/ui/Linear.png new file mode 100644 index 0000000..e2b6a3f Binary files /dev/null and b/safety_master_plugin/ui/Linear.png differ diff --git a/safety_user_plugin/scripts/qt_wrapper.py b/safety_user_plugin/scripts/qt_wrapper.py index 9969353..f9d5267 100644 --- a/safety_user_plugin/scripts/qt_wrapper.py +++ b/safety_user_plugin/scripts/qt_wrapper.py @@ -21,7 +21,14 @@ class QtWrapper: self.displayed_robots_id_list = [] self.clear_robot_info() - # self.ok_pixmap = QPixmap('../ui/Ok.jpg') + + 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') + 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') diff --git a/safety_user_plugin/ui/Angular.png b/safety_user_plugin/ui/Angular.png new file mode 100644 index 0000000..6b85fc6 Binary files /dev/null and b/safety_user_plugin/ui/Angular.png differ diff --git a/safety_user_plugin/ui/Distance.png b/safety_user_plugin/ui/Distance.png new file mode 100644 index 0000000..c7c7a08 Binary files /dev/null and b/safety_user_plugin/ui/Distance.png differ diff --git a/safety_user_plugin/ui/Linear.png b/safety_user_plugin/ui/Linear.png new file mode 100644 index 0000000..e2b6a3f Binary files /dev/null and b/safety_user_plugin/ui/Linear.png differ diff --git a/safety_user_plugin/ui/user_view.ui b/safety_user_plugin/ui/user_view.ui index a95711a..4b62413 100644 --- a/safety_user_plugin/ui/user_view.ui +++ b/safety_user_plugin/ui/user_view.ui @@ -188,8 +188,11 @@ - - + + + 15 + + @@ -205,42 +208,7 @@ - - - - - 0 - 0 - - - - - 50 - 50 - - - - - - - - - - - - 100 - 0 - - - - <html><head/><body><p align="center">-</p></body></html> - - - Qt::AlignCenter - - - - + @@ -256,51 +224,75 @@ - + + + + + 100 + 0 + + + + <html><head/><body><p align="center">-</p></body></html> + + + Qt::AlignCenter + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Ograniczenia</span></p></body></html> - - - - - 0 - 0 - + + + + TextLabel - - - 50 - 50 - - - - + + Qt::AlignCenter - - - - - 0 - 0 - + + + + TextLabel - - - 50 - 50 - - - - + + Qt::AlignCenter + + + + TextLabel + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 50 + 20 + + + +