Added restrictions images. Also small fix in Restrictions __init__()
This commit is contained in:
parent
62e7d10641
commit
067b13c862
@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
class Restrictions:
|
class Restrictions:
|
||||||
|
|
||||||
def __init__(self,distance,linear_velocity,angular_velocity):
|
def __init__(self,distance,angular_velocity,linear_velocity):
|
||||||
self.distance = distance
|
self.distance = distance
|
||||||
self.linear_velocity = linear_velocity
|
self.angular_velocity = angular_velocity
|
||||||
self.angular_velocity = angular_velocity
|
self.linear_velocity = linear_velocity
|
||||||
|
|
||||||
|
def update_restrictions(self,restrictions_msg):
|
||||||
def update_restrictions(self,restrictions_msg):
|
self.distance = restrictions_msg.distance.data
|
||||||
self.distance = restrictions_msg.distance.data
|
self.linear_velocity = restrictions_msg.linear_velocity.data
|
||||||
self.linear_velocity = restrictions_msg.linear_velocity.data
|
self.angular_velocity = restrictions_msg.angular_velocity.data
|
||||||
self.angular_velocity = restrictions_msg.angular_velocity.data
|
|
@ -33,8 +33,12 @@ class QtWrapper:
|
|||||||
|
|
||||||
# self.disable_sliders_tracking()
|
# self.disable_sliders_tracking()
|
||||||
|
|
||||||
# self.ok_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Ok.jpg')
|
self.distance_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_master_plugin/ui/Distance.png')
|
||||||
# self.cancel_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Cancel.jpg')
|
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):
|
def set_sliders_to_initial_values(self):
|
||||||
self.widget.distanceSlider.setMaximum(200)
|
self.widget.distanceSlider.setMaximum(200)
|
||||||
@ -164,16 +168,6 @@ class QtWrapper:
|
|||||||
item.setTextAlignment(Qt.AlignCenter)
|
item.setTextAlignment(Qt.AlignCenter)
|
||||||
item.setEditable(0)
|
item.setEditable(0)
|
||||||
self.stdItemModel.setItem(row_number,i,item)
|
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):
|
def master_stopped(self):
|
||||||
self.master_stop_state = SS.STOPPED
|
self.master_stop_state = SS.STOPPED
|
||||||
|
BIN
safety_master_plugin/ui/Angular.png
Normal file
BIN
safety_master_plugin/ui/Angular.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 910 B |
BIN
safety_master_plugin/ui/Distance.png
Normal file
BIN
safety_master_plugin/ui/Distance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
safety_master_plugin/ui/Linear.png
Normal file
BIN
safety_master_plugin/ui/Linear.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 488 B |
@ -21,7 +21,14 @@ class QtWrapper:
|
|||||||
self.displayed_robots_id_list = []
|
self.displayed_robots_id_list = []
|
||||||
|
|
||||||
self.clear_robot_info()
|
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.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.cancel_pixmap = QPixmap('/home/olek/safetysystemL1.5/src/SafetySystem/safety_user_plugin/ui/Cancel.jpg')
|
||||||
|
|
||||||
|
BIN
safety_user_plugin/ui/Angular.png
Normal file
BIN
safety_user_plugin/ui/Angular.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 910 B |
BIN
safety_user_plugin/ui/Distance.png
Normal file
BIN
safety_user_plugin/ui/Distance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
safety_user_plugin/ui/Linear.png
Normal file
BIN
safety_user_plugin/ui/Linear.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 488 B |
@ -188,8 +188,11 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout" columnstretch="4,0,0">
|
||||||
<item row="1" column="1">
|
<property name="verticalSpacing">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="distanceRestrictionLabel">
|
<widget class="QLabel" name="distanceRestrictionLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -205,42 +208,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="2">
|
||||||
<widget class="QGraphicsView" name="distanceGraphics">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="linearRestrictionLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p align="center">-</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="angularRestrictionLabel">
|
<widget class="QLabel" name="angularRestrictionLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -256,51 +224,75 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="3" column="2">
|
||||||
|
<widget class="QLabel" name="linearRestrictionLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p align="center">-</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p align="center"><span style=" font-weight:600;">Ograniczenia</span></p></body></html></string>
|
<string><html><head/><body><p align="center"><span style=" font-weight:600;">Ograniczenia</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="1" column="1">
|
||||||
<widget class="QGraphicsView" name="angularGrpahics">
|
<widget class="QLabel" name="distanceImage">
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>TextLabel</string>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="alignment">
|
||||||
<size>
|
<set>Qt::AlignCenter</set>
|
||||||
<width>50</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="1">
|
||||||
<widget class="QGraphicsView" name="linearGraphics">
|
<widget class="QLabel" name="angularImage">
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>TextLabel</string>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="alignment">
|
||||||
<size>
|
<set>Qt::AlignCenter</set>
|
||||||
<width>50</width>
|
|
||||||
<height>50</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="linearImage">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user