Added restrictions images. Also small fix in Restrictions __init__()
This commit is contained in:
parent
62e7d10641
commit
067b13c862
@ -2,11 +2,10 @@
|
||||
|
||||
class Restrictions:
|
||||
|
||||
def __init__(self,distance,linear_velocity,angular_velocity):
|
||||
def __init__(self,distance,angular_velocity,linear_velocity):
|
||||
self.distance = distance
|
||||
self.linear_velocity = linear_velocity
|
||||
self.angular_velocity = angular_velocity
|
||||
|
||||
self.linear_velocity = linear_velocity
|
||||
|
||||
def update_restrictions(self,restrictions_msg):
|
||||
self.distance = restrictions_msg.distance.data
|
||||
|
@ -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
|
||||
|
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.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')
|
||||
|
||||
|
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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="4,0,0">
|
||||
<property name="verticalSpacing">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="distanceRestrictionLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -205,42 +208,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<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">
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="angularRestrictionLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -256,51 +224,75 @@
|
||||
</property>
|
||||
</widget>
|
||||
</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">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center"><span style=" font-weight:600;">Ograniczenia</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGraphicsView" name="angularGrpahics">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="distanceImage">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGraphicsView" name="linearGraphics">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="angularImage">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user