From 067b13c86222cd5c54341f8fbed6b49f7229d498 Mon Sep 17 00:00:00 2001 From: Olek Bojda Date: Thu, 27 Sep 2018 11:42:55 +0200 Subject: [PATCH] Added restrictions images. Also small fix in Restrictions __init__() --- .../scripts/master_restrictions.py | 17 ++- .../scripts/qt_master_wrapper.py | 18 +-- safety_master_plugin/ui/Angular.png | Bin 0 -> 910 bytes safety_master_plugin/ui/Distance.png | Bin 0 -> 1643 bytes safety_master_plugin/ui/Linear.png | Bin 0 -> 488 bytes safety_user_plugin/scripts/qt_wrapper.py | 9 +- safety_user_plugin/ui/Angular.png | Bin 0 -> 910 bytes safety_user_plugin/ui/Distance.png | Bin 0 -> 1643 bytes safety_user_plugin/ui/Linear.png | Bin 0 -> 488 bytes safety_user_plugin/ui/user_view.ui | 130 ++++++++---------- 10 files changed, 83 insertions(+), 91 deletions(-) create mode 100644 safety_master_plugin/ui/Angular.png create mode 100644 safety_master_plugin/ui/Distance.png create mode 100644 safety_master_plugin/ui/Linear.png create mode 100644 safety_user_plugin/ui/Angular.png create mode 100644 safety_user_plugin/ui/Distance.png create mode 100644 safety_user_plugin/ui/Linear.png 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 0000000000000000000000000000000000000000..6b85fc6c93e30909f86240873ae9f9b0415bc0c7 GIT binary patch literal 910 zcmV;919AL`P)y&l-crulu$EHVfSZHQ;WYlJ{WOkXch33f&;pQi9>{SCUce&q z5dI}z#Ku9ja?XQ+;UWAuBv3bh2eX4{rhY?N57{nkEkY-8Aov2Nu^Ka2hx>77o$2!1 zXL8PO_Zi6E8N;5|<$b}h0-uGC{=wa&fGTwEtNU*2?8mBpVB13D zB|JK6sG#*&t88MH{a1tj;RyCo2t3y$RIR_RUMt%STU#lmgw4*` z9t~U0`BRdx9|K51$%eAl^s@Yyc$BW1h^s7*Rgsy7z#J3{PF ztZ54DtswkC5xYX?ZEWY+*qEWN!@ogzONdQjZ;`F}roeUu;k`xdjSySHgB|fPLS3Wt z@ON8XpHz=C@e;D^;xkULok93OT{nl13#j*~-cZI4hO1RK__p|6xE;R~P>1xmjg1Q| zUM{{-JqyGoV+pTdMXx^kK0}?4rIfBzovkkI(PR;i<5SggF{e86w0}R(IUgEFw&E&Z z`l&jDi}07*qoM6N<$f}2dSN&o-= literal 0 HcmV?d00001 diff --git a/safety_master_plugin/ui/Distance.png b/safety_master_plugin/ui/Distance.png new file mode 100644 index 0000000000000000000000000000000000000000..c7c7a087efe6918f9c1290faf6307de990b7cdcc GIT binary patch literal 1643 zcmV-x29)`UP)2{teDSxPWDnir{G5mpwL`c;1l!kc3Jde*1%Hx%M{@CaAo!;L2?$Gz-*&RT2lv+~`2_TFo)E!&JVNSX>flRiFcdupXNh5mJE_~3scQZzTB6G`g;TLIgo z*HYUrH=^(Uh9uc`T|`J43rtS0gNY<4XL1fOWLJ#nJA6>i) zbOYU;ot+m|>ueQxCF>WMUu`2vvw-V?DYlnG1tKJkk#r;QBCt=9`VAlf_65cOcUO4- zoxs@E*47)Vb+`)b4~zwVskVWnlYr}hLu|jD$;*Bkk`4gw0mkRVe*q5xH`!iRWM9dL zo)E&X)jC`aLI^7Wk|e2WGbHI0;2L1E?asWeBoUG(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pGcn@Oz@zZpKtY5P6 z5JXDCV&d73<8Alk^?eR?+n)fFfOg_xkPPF9Bjig-cS+i_QeT4!Nu!9z8Jd8$ViEvq z31l`VW}LsFH=rqZ4W*##S>Q2ZeYLqqUG|Js z&BNLDO52NV??p_m+(SG*FjUb6oYWTyu$Jd69m{1M0FovU&ooT}8hW5)E%Bx8il_J* pwhTI+Klq5aWgT`HvNQca<3IVN!W@qnz@z{G002ovPDHLkV1iZ`^*8_k literal 0 HcmV?d00001 diff --git a/safety_master_plugin/ui/Linear.png b/safety_master_plugin/ui/Linear.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b6a3fb7873427e230d52e036150e36ab3808a2 GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}w!3HD+w?ydzDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?sh%#5 zAs(G?uh@FXI7+ZRI4=BT4bO~Y3tD4?ZX8!q*cLYF(kZ9aG7=mwo93q8VhLio6uE4& zgH$d{@X`$i0tekDDK)t{iO6uLKivJa?wb6Dn~kkAzyJPrbMD=}lY=h3KEQAtlPTPPsI*OL^&* zR({1S(eSF4>9KWfvF{D8%RgYq&ItS2{Fd|CyoX8mR_xkq7yUo{%zKue#cbIdVCaL~ aLGM$mHlOc!7iI>G6$VdNKbLh*2~7ZYJy&l-crulu$EHVfSZHQ;WYlJ{WOkXch33f&;pQi9>{SCUce&q z5dI}z#Ku9ja?XQ+;UWAuBv3bh2eX4{rhY?N57{nkEkY-8Aov2Nu^Ka2hx>77o$2!1 zXL8PO_Zi6E8N;5|<$b}h0-uGC{=wa&fGTwEtNU*2?8mBpVB13D zB|JK6sG#*&t88MH{a1tj;RyCo2t3y$RIR_RUMt%STU#lmgw4*` z9t~U0`BRdx9|K51$%eAl^s@Yyc$BW1h^s7*Rgsy7z#J3{PF ztZ54DtswkC5xYX?ZEWY+*qEWN!@ogzONdQjZ;`F}roeUu;k`xdjSySHgB|fPLS3Wt z@ON8XpHz=C@e;D^;xkULok93OT{nl13#j*~-cZI4hO1RK__p|6xE;R~P>1xmjg1Q| zUM{{-JqyGoV+pTdMXx^kK0}?4rIfBzovkkI(PR;i<5SggF{e86w0}R(IUgEFw&E&Z z`l&jDi}07*qoM6N<$f}2dSN&o-= literal 0 HcmV?d00001 diff --git a/safety_user_plugin/ui/Distance.png b/safety_user_plugin/ui/Distance.png new file mode 100644 index 0000000000000000000000000000000000000000..c7c7a087efe6918f9c1290faf6307de990b7cdcc GIT binary patch literal 1643 zcmV-x29)`UP)2{teDSxPWDnir{G5mpwL`c;1l!kc3Jde*1%Hx%M{@CaAo!;L2?$Gz-*&RT2lv+~`2_TFo)E!&JVNSX>flRiFcdupXNh5mJE_~3scQZzTB6G`g;TLIgo z*HYUrH=^(Uh9uc`T|`J43rtS0gNY<4XL1fOWLJ#nJA6>i) zbOYU;ot+m|>ueQxCF>WMUu`2vvw-V?DYlnG1tKJkk#r;QBCt=9`VAlf_65cOcUO4- zoxs@E*47)Vb+`)b4~zwVskVWnlYr}hLu|jD$;*Bkk`4gw0mkRVe*q5xH`!iRWM9dL zo)E&X)jC`aLI^7Wk|e2WGbHI0;2L1E?asWeBoUG(15W`hIq{>wxwe0($LUgNZ*On2 zeJC&oxB}P<_z<`ugz$2bB>Mtq0XqY)1DDiGrliw=D}jS;zhA6h$l9syPWF9EZFhwFKdq%(*_A5@A2C?Z1A_Qb8} zx~b?ZV0YV()Z;*v7y~>ULO3jh(B9P4G!57gc&xd(dG8Ry>=44a#P51ak|g75?0+0^ zIdGuu56T&>B0|z=UwDb3f17EKPsM*Vy+~ zL=ryg%P2o0P6swm@BaX%*?zCam)3({LI|Jbo=yA{-YT-|f>pcNTF_zp<8n$#1xSgI z)C63T)6cj4T8%HP7v*OBMuo-QB0EgRtBa=51!{!Xn z+ivLYFNdZiNk->`t`Nd}O2h~ugl$X6-emO%Hy?CW+|~j}ItI9fNWyB9aRJym_gr>% zZ2-=u|AMZul?){v2iy!yEhYith!_YW_NI4Y{;g4+wzRZN>FMbil|HU0XP4$376OOb zey5z>3&f?$#0?bnT*R<8>*wrx`)R~Q%rRuXEC;>@cId0kK#hpO#CE`L#nEOl3P5Y_ zxxXgL!9+)2BuF|$Qd0r=Bq!gxT!UeZvU?&)=Mg8+)@I-XV24z<4KeOtTU;#Zg!I1C z_Us}D77)Yj49jg_SY&fOuuBD-TY!l<(d)M7RO6te3xL_c0k(f^CMH5Mtg(KNL`b?A zIFm@ix0(D5dS}=NN8qZlq)0ah=ma*&%L~L$Bg1}@^69w|1xc3yrxNoM-{o}$paaN+ zn-cR9BMy@05z~DK+Wx*+U$Ff*uplS9R8m7qfkOq7E(c~1bCxCZu33iaHXvhZJaBS< zJ2!xs08A&6@MAfn0)Xvq;M$ygfuxbLf^0-g;dhl%N-9X&DW9{v708y74S*$*HtA<4 z2Lc_oe=4O&^OcK$t5y+V`%hxpDvRQ_1fG_(UVnSq&sbSXn38ZWuo*C8wYr958SmI! z<6VJeY0+oIAWc@^N35S5WxIQgN|){Dh!yWFi#!2XD(SK;^*x-Cl5jsUnKRw?Ur?qR zZhJ9sBE6;lQNY!}tCD66*X1?!`vGDl@0fJ!0Q7Mz!1ja0py!pGcn@Oz@zZpKtY5P6 z5JXDCV&d73<8Alk^?eR?+n)fFfOg_xkPPF9Bjig-cS+i_QeT4!Nu!9z8Jd8$ViEvq z31l`VW}LsFH=rqZ4W*##S>Q2ZeYLqqUG|Js z&BNLDO52NV??p_m+(SG*FjUb6oYWTyu$Jd69m{1M0FovU&ooT}8hW5)E%Bx8il_J* pwhTI+Klq5aWgT`HvNQca<3IVN!W@qnz@z{G002ovPDHLkV1iZ`^*8_k literal 0 HcmV?d00001 diff --git a/safety_user_plugin/ui/Linear.png b/safety_user_plugin/ui/Linear.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b6a3fb7873427e230d52e036150e36ab3808a2 GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}w!3HD+w?ydzDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?sh%#5 zAs(G?uh@FXI7+ZRI4=BT4bO~Y3tD4?ZX8!q*cLYF(kZ9aG7=mwo93q8VhLio6uE4& zgH$d{@X`$i0tekDDK)t{iO6uLKivJa?wb6Dn~kkAzyJPrbMD=}lY=h3KEQAtlPTPPsI*OL^&* zR({1S(eSF4>9KWfvF{D8%RgYq&ItS2{Fd|CyoX8mR_xkq7yUo{%zKue#cbIdVCaL~ aLGM$mHlOc!7iI>G6$VdNKbLh*2~7ZYJ - - + + + 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 + + + +