From 363fd2ddc090cd7d620400a5efc1ccdb4a896295 Mon Sep 17 00:00:00 2001 From: swittl <simon.wittl@th-deg.de> Date: Fri, 21 Jun 2024 09:26:20 +0200 Subject: [PATCH] projection fix --- .vscode/c_cpp_properties.json | 17 ++++++ .vscode/settings.json | 16 ++++++ .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 305 bytes .../__pycache__/projection.cpython-38.pyc | Bin 0 -> 3604 bytes .../projection_geometry.cpython-38.pyc | Bin 0 -> 2113 bytes .../region_of_intrest.cpython-38.pyc | Bin 0 -> 1505 bytes .../io/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 171 bytes .../io/__pycache__/loader.cpython-38.pyc | Bin 0 -> 1318 bytes .../io/__pycache__/writer.cpython-38.pyc | Bin 0 -> 2453 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 179 bytes .../rq_json/__pycache__/load.cpython-38.pyc | Bin 0 -> 2254 bytes .../rq_json/__pycache__/write.cpython-38.pyc | Bin 0 -> 2402 bytes rq_controller/common/projection.py | 49 +++++++++++++++--- rq_controller/common/projection_geometry.py | 26 ++++++++-- 14 files changed, 95 insertions(+), 13 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 rq_controller/common/__pycache__/__init__.cpython-38.pyc create mode 100644 rq_controller/common/__pycache__/projection.cpython-38.pyc create mode 100644 rq_controller/common/__pycache__/projection_geometry.cpython-38.pyc create mode 100644 rq_controller/common/__pycache__/region_of_intrest.cpython-38.pyc create mode 100644 rq_controller/common/io/__pycache__/__init__.cpython-38.pyc create mode 100644 rq_controller/common/io/__pycache__/loader.cpython-38.pyc create mode 100644 rq_controller/common/io/__pycache__/writer.cpython-38.pyc create mode 100644 rq_controller/common/io/rq_json/__pycache__/__init__.cpython-38.pyc create mode 100644 rq_controller/common/io/rq_json/__pycache__/load.cpython-38.pyc create mode 100644 rq_controller/common/io/rq_json/__pycache__/write.cpython-38.pyc diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..bf74468 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "browse": { + "databaseFilename": "${default}", + "limitSymbolsToIncludedHeaders": false + }, + "includePath": [ + "c:\\dev\\rq_workflow\\install\\include\\**", + "C:\\dev\\rq_workflow\\install\\include\\**", + "C:\\dev\\ros2_humble\\include\\**" + ], + "name": "ROS" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5626c31 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "python.autoComplete.extraPaths": [ + "c:\\dev\\rq_workflow\\install\\Lib\\site-packages", + "C:\\dev\\rq_workflow\\install\\Lib\\site-packages", + "C:\\ci\\ws\\install\\lib\\python3.8\\dist-packages", + "C:\\dev\\ros2_humble\\Lib\\site-packages", + "" + ], + "python.analysis.extraPaths": [ + "c:\\dev\\rq_workflow\\install\\Lib\\site-packages", + "C:\\dev\\rq_workflow\\install\\Lib\\site-packages", + "C:\\ci\\ws\\install\\lib\\python3.8\\dist-packages", + "C:\\dev\\ros2_humble\\Lib\\site-packages", + "" + ] +} \ No newline at end of file diff --git a/rq_controller/common/__pycache__/__init__.cpython-38.pyc b/rq_controller/common/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5a7ce552844d6e4a6c1828b88db4a6f0d8786a2 GIT binary patch literal 305 zcmYk1&q~BF5XO_V3$nQ2f)C)e2Ymn$5j=?CpQ3mvfl%A&5;y78Np$HG_$<CsPl6|3 z!IKjO*@1k?H~eNY^RQUV1;@u5b&l`PWVS=GIpY%!SX$9aC%mkrSCx{<E0_7a%K4q$ ziz5G$j1_9yFUOMb37TlJzX0?QX`FVqvxS_N<#-1xCT_dSJ`#j@Q_QOQ@Lx&kd&*d< zCH;~HJ7fP?$~pfoXqK2H-`D5Ix`kIw&t`+P?i_Bk?L(}c(^vLU2OHsVsGD`Yf{>^N jxfMDGq#N`edu_P8jm8`e<Fs?)v3+rHnwAP_ls)+a3RqU8 literal 0 HcmV?d00001 diff --git a/rq_controller/common/__pycache__/projection.cpython-38.pyc b/rq_controller/common/__pycache__/projection.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2dbfc5085d556677756493e4a428385bae72688f GIT binary patch literal 3604 zcmb7H&2JmW72nx!E|-)<Np=*+v17O`m^Nyi7C{lXiGZ{S0u*WhqlYX6EH<2_wDf+^ zvrAhP$dd%**nc1g`KbS*r~VOh?V;7J=b{Pvd$TKks0Nzsf^TNtyqS6P_Wgb{{Bx({ zX?ULApA1KLH0|%ySba=14m6FG92Kr{mTDOb7^AwL>VbjMNcGGNOz2E*rB-GKw(7T2 zCvyWgYXvRUc2X~E2kmC8ANZeZ+~utcjkjX^+z2{cf2Q@lYg)h0WIM|9qKc}d$jd{t zot#HPMAK_l_wRf;{ZbU8ct94P$3+%bV%pcGx75nsvc9lj()uEcj^hEXv-))F1}p!D zN~{HpYk|&LY+RaL$7^u&*nG{nh1VWh+)*!ffY+m)sJG4iZ~bqyA>$q1z32p1Z1WAi zd7+)Nz(IYB_r7I(o9|qh(71e;-$DB>f9t{wTCvCXRQqjyPxZGKns@kprSYL@DVuls z1EuLKG!OZEO4I#DGqqp?(R?KR)i6oB_?ja2kDGl93TD&#*QZV8tAk_JfAE(BVW4*A z<>UP(`qCPvMN~<ntb{ZVi#+c8vNJ3OQ5u%xq6)K2Zu7XpB83RYMM+<WlzR(hA(A++ zKWzA75^-rI^gU#6VQ~^C$JGgq+FIydCA?O-LlI?hm~eS-W!e9k)O%T^6{ZcJzm(o! zA_Ue9Cz0HYPvO->#9@_Snyi$zh^vXn2mVb^P*UB&58G$u?@_6=bM2DN*i4@pGiT<$ zwwN|EFZIe8Atz>9Xw580duBsAvlgT~^B`NZHl)Y3XWA7z?6;*=PR6m2ZWtzcQiWk) zM`bk~$5PM7fjvp`>d8l92TO`w5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5gG70DcP-79 zb4mlJ+gf%J9aD%@b`kX<lG+GdzlZa(uh)^h($yw$a-Kxv_=>5G+(yk3n9c2Be41ds zQt_*P_F&DW#jRpt`{TT#Pb)qq@sz}^DBixbj8C%_Pu_jAC-wbieER<#L5SErgr_D= zy}lvPIr&CsHpj_noQC718k~fupsN=vzT98)<+kOIcSX_d?|zUgQ@AquL9UQxf0Hgu zIbHlh>4jld@JUK_KcqWkTK6o^4|NBTZFR}PAA^&Ei}%T`-;nq%gmiJh;2u^@h4NR$ z?^EhMpx#b%K^nwq8ip$$nD|)Gu`lR~LI-w97YA3@apWtm{qB8VXP$%hqwZr!WBF5K z`d!+<aDqE0HXtZJrKOId+I=F68k|JC!4@uDKus)$(I77Of&3+Z1RG_Xm$+v`TX!i& jAdXN=t@y1{l>C<N(>i#c5cbrK1-QlG;^W?egT(kRcz-la literal 0 HcmV?d00001 diff --git a/rq_controller/common/__pycache__/projection_geometry.cpython-38.pyc b/rq_controller/common/__pycache__/projection_geometry.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7efc4a86b91246f1a0538ae704fa85f48a9b64b GIT binary patch literal 2113 zcmZuyOOM+&5GE;!df2=1zLM;wY5KUthb)R7dMJuEKn}SSivWuPg<(KYMA@;TheOKU z+VGxse?pHrB**-U9{MK=UVA9^mUDqFIz!2}k}d_0X2_4DA?KU%Pg`37f$_)P*=V#y z$X{r*hXuxCLa6!%6hQ>dNKOZoqRuilu;6WFcJ2(EoDVo9Pl>RFb4i4A!3M5ir=-uX z&|{zKPE-_S6;+e6P$zw+cb~~JO=7g4CS{&fa;}5TT#Vb=!vo_n1|vX8$bbqmV1g#r z8(T1VEMbrBw{*mWV;&CD72azud=XqihzS=R(Y+)Wbl`%%CAMEvaZB_rZJ6=E-T`}8 z>|NReU+hEZ2YUb6d=t?+N?tz4!2e!FCn;!+_5O!NP)v^t5lI=%wWTVl?US-d`dn{~ z$~ekGH7%<!&-I>2DsWTEa9S$72An)xPnL3$6!m?DuV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.cpython-38.pyc b/rq_controller/common/__pycache__/region_of_intrest.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f5698e732fe423453feb6decb77378412c1d5826 GIT binary patch literal 1505 zcmb7E&2HQ_5ay4h)&AIt)3iy0Hn|nhp?-iOC<^!x6bRg)Msg4qAQX{nudJWVP}^h| z>(d(OOZd?A=2zmWKu>;!9@@-M8)svmN`W6|#1Uus&5T~|><k!=zkY|wpCMy^ld?S| zDnH@0-yvwGdC5|at0+Y!Q_0ygrlk(fnGV(>4KzPuNqB{}>@eZ(&adWp+SI>Hey&?E zw#{i{d!Wni_!lS`e{?GJu8~FHXQ;)6^bW!_GCdvY=$x&28k?T!>)r*|vF@J-_-26m z0QI3Bod@Yq?_eNz+}?}DjSyVaye>@MUP`xX+YDMYYo>Lps>+Q_tv_k;1hUGgsm_C~ zh)EVW4{+MA5LSG}6k7>IzLJPSvm<uN4}tEM1TL_qoIr#M^ax^vO9n$+{&{uq!&sZ& z#_&eHZQyiLHgCt%8pA5f@$>2Hv7NT&`&pKsX2-^oRo)<xO<5Wk=S@{L^%y+Es+lOf z1#!GTTew)EHf@z6kCuEh9^tcmbc>JukES^%v&|rx;`i5lgu;ro><_N_d#=U(Yk4h@ zWqEi-RdV$ojzl<7&(ff&jm7-SytMwN9gNV-g?e693lc36$;9%(?V!939Z=ch+?$ap z4hrfzu;-{ySSwzLLV655hR5<fKNFk1$nQl3?L|emN7lU}J_}ZqJGlzh@`ynn4@~-S z7Z(?10NKJP&hdASFC1U`47%vVWZHnwWD>$2TEiCz>2Rx{(*AWdxzLx=O(I4UXew11 zYcadz(%wg4VnC_-HwreZjK%WtZHBf#Mxr7x?HuaQl1RK=*Xju>EnBlQtk(h)`88H< z!4=jmYGR{d{h}r}8glbLEJI>fA!11chd>o{<$*#-dO%Cp249jyy#o&js3G7XLLz{E zMy|Kv<R)Q*%zmWnTeP$H5U{SrF2`qs1F`((Hd&uO#J>_y4<{pPlA1bPxq(tuqvs{b zBc<NVv$EUqm5}yo?Q6kF+XC$1*KU}XnYEQ^PZ|vrM|VBy6nH{F?Y#w5?m%5ay=X~` z`NL4~ffW4i$nPYf3+s6`TXatMu-mbt4NS7!*nRAS&IKK^b+GqC=ehW4cZVN|bW3-P H#Ylbti||?f literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/__pycache__/__init__.cpython-38.pyc b/rq_controller/common/io/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b999566fba17e5b9ed3a928b1871249d89a86e51 GIT binary patch literal 171 zcmWIL<>g`kf(PwIX(0MBh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o11t*(xR_wJfHn zFupv$C_61DzdR;0uec;JCnv@yGbyGxvm{lwATc>RF+H^yq$)W-ucRnHCnvQiCOJPh mH$N{XGe0IiJ~J<~BtBlRpz;=nO>TZlX-=vg$fnOg%m4sLS}nH# literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/__pycache__/loader.cpython-38.pyc b/rq_controller/common/io/__pycache__/loader.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0aeef032684a9558b82520ee1966f68f2eb772a GIT binary patch literal 1318 zcmb_b&1xGl5SDh=>$T(jku(WC^j3-w%>$HDLedff!3_<)EC#W$<aCqWl`~p5b?~VT z^d<5FekGj>J>?Y&h0e%!;wEXKP%SgkXr%eR8O^?*pRY3<-@Zau`;2`jV|L&k+d?th zs3em-V=;HL7kfB+nV$!7z?t-AkX7<94)bbU&7(NtY?sN33@@1szj$#?@<Z0FUSk~A zYH}MKB;|)|ir@6@>cQXu^oi<}sV;Vv&Q%Em+nC+8%LjvZ>KOfRyL&|m%9I_7H9G<{ zwopt9m2ymDPx<soe&tI~`j^O7Ra7X0E6=eD;wsvav#T;fe+})rvum=B_MDtU<_){B zof!2xDU*GjNChL`KJIClkQT=i*246=-Sm@P?%gCb-P!=hU+At##~DmK9U?v*wDwST zP|O;tAs;fqh8}7@^igBs57~&fAVP05uz^uo7iwq#y(Y||8ZlVF=|^klMO&(mZ8#I> z8cw^JK5wUmDU&Q~@25v?la}gvFX@~n$I8&Djz(%a%M`RbI?r{{PIWtT8E^ImHWJ7^ zErlR#6QW|3kca$Y{rBo@PR}(xTchiuhwp7eP-P#A4kb7pwB{%-VG3Ka&)8#!3>s*R zxLs-Kaxd>?Dpy6R<Qo7DBM;`$3(KS^)3I8_mE9QQ-PV8lHgwoHXnyhR4&OiB`3I`7 zLOdSbka4seqs2SXS7(Sk`8$#Sg1_eQ@3r6h42`D`(YSY`h5rGzK#}B12wN8-*Rr3{ zx*^0_KglK@-;@ALR0%3KP)`H(GE_(rE>Q2l2C3WUyQvsd(LrKpEAl*!-_J&E$zSrF zuUWU1qMu_&dPUC$Cq@^xN-dV9M-J15<Mth6J6MNEK_5c2(aUizuc#Ld^<l&#-r%eL EFZ3!vG5`Po literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/__pycache__/writer.cpython-38.pyc b/rq_controller/common/io/__pycache__/writer.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76b818b42aeab0bdecf1a52ee916a3bfdd4414f6 GIT binary patch literal 2453 zcmb_d-HRJH5SMn>>$T6mv+pDK(T_`LNwR?)eN6}@BrPFO+@nV+EQV#zlHI-Rha;_X zz2K)L&_ALnB+wWCOL{8wDgQ#D&>7k5+t`~XN2*1$nvpc~o6%_WW3yQ&(Ej{Y^gA{o ze<4$BCNOuQ%X>f=VKgEh)qle?;BQ1`Y<U(X%w$$niEYo0t6nvBJcp78gjJaRf-w8J z;nf&DB5w5!=ph}KD(f)Fetv`cT~loyo*jzxg!i&AO&;(x=9xHCjiOYw56^z!1DOB5 z|1ik}mst;W6`KXjUFh-;AY3E$3~u7b=u49s%zOc8d4=1|dTD5MmRAMdVO8KAR)hH( z@O4%PeuXuFUjg3a71jg|t85J<je?}b+8}8bB<pMgB<W1FC5i(LY~HRre44)ATZ z3-Q=ftM>xQzX`J7ClO{`OiZ;mOvNk|{$LghUyl0y@E6q{&cl?8c7%?KpZ5K58kgBj z55ti+92?N@LzkC;jOm#8WNZMXV-qMG=MkCEj&NYswUi}!)E6~i1m=iX0Wu+C6@Gtr z?%(b*{-i4&`=_aR)Q{5BZkWg{h@$Ry;c-`jD>sKh?@=(|5?A$7fR;uP7u{YO$7#|H z)9$JE_+WUZ93QZUneU@*35iHZ#illWy8U)^4)S%bp=vUC!u=s+k=iIkC68DSQ!8&c zrqH$bXd@%fAdQcRXaF;zYNL~85949PW1eK3eJeyNTvIe*R<x0<BSGJ%WDQ1YS3BUB z7{@IV!%gVZ>kBTtbCYXmQ>uQh@B&VV4Y2kWWIW|X$gM@|o3JQHy8j-eIl%T(#(fmd zof4eeQ=ChNwhM5tmcm`y0_9~zr%FGK7#Fj=NrIRwTkvcol8d6B%o1Y{fqznh{>Ff3 zWoc2k&Ux;ljy(Ri799F;Ef@7bd{%<`%De2%FB<O3!G86DVCS3v7mWLeap{Qtxsl5S zga;)E|6?nZ6nmN?;#1Jl)7KXU*l>(hN!JfNvW#SOOkWucs_2RN8~NRMO`pRDCEe&K zdIRdG8Sz9}Q7AKI4Wjf|m(qzbttnSP$Ku`GPe$=E7g)&8D?pwyA(vmko;>=CzP)Gb zk~3HkwKG`S$K(|}2d@FVE{84^*AU)SBnu^PtIUwZl{vC67ouLeq2sP&&BsgV`>O8y zamq#!jvK!Jcoaml8B=CLv=9fLfWSvgY$2&2!D1lrSi~-p&ynmSxeP>^_!??QuA}VS z5k0~JE~-GVODsW-VNm$~Y1CRKe(U;cnR=C5R~7ICo+=|5D(gh1iK^n;6NSebo3f|x g+7zRPr;(xhGTX|zGxhmve3vA?Ne*>rgKnDt0%Y1?i~s-t literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/rq_json/__pycache__/__init__.cpython-38.pyc b/rq_controller/common/io/rq_json/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb5f48d900fd86908f27dd3f2b51e11b9ca06ed7 GIT binary patch literal 179 zcmWIL<>g`kf(PwIX(0MBh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o11v*(xR_wJfHn zFupv$C_61DzdR;0uec;JCnv@yGbyGxvm{lwATc>RF+H^yq$)W-ucRnHCnvQiCOJPh qH$N{XGan?LRSaat$7kkcmc+;F6;$5hu*uC&Da}c>1KIc)h#3InEio4W literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/rq_json/__pycache__/load.cpython-38.pyc b/rq_controller/common/io/rq_json/__pycache__/load.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..69813bc85ebf68b4882fa6ff89365d9a4b0c04e5 GIT binary patch literal 2254 zcmaJ?OK&4Z5bo}Ic<k6&XE#L2K6q$Z34`Jr7laUE5v!mmgs^DQ$Wm+8-A*Pu52w3B zh~=CTDW`}ZuplMJ{Y!m9;<P^jgb-CdUa#{IV|BT!`Y~1Y)mQUltJNUz{Bf!VG9u(p zRAwI^lrLfEryv9oG$S!}|14(k&oVFfW1kY?2|o++Fb?xtT+5?4%Ik3*>_h}vBcF@s zD0xCeC~7A})MR+<#Z5tfAf4zn+)Oq))cTu=*?G-C>-cv5t3=DM6O*i$iIB=RHxD;e zxhwl7EepFit38orE{!_03!8^qavRpa8>|&ZNp0ZPU@cF!WglNM`*;&Y_h2GjP%%3t z11hLsCsFK4Uk1YajR{`_Cw?4)UUNEz;Kvc@b*D$74tfLhIj1+o9O%tc;*+=q0XA)O zYwufK7F8sDI^zb;0~qLyUIbytF*$cW2=Btf^uZ1O#;DQVhA3Be;hK@(HR)hf@2WC& zh7PlV-XB7eBF@tyHJoEMwaf;usI7C}&l0UUe?|U&`uMY+kU#g-9zQ76i$PW%^wL6` zB+Gj1>GPgWja(fj{TGljjl23KB(lshse1h~&hmS{&udKo~|9UiJVa2(4>BX)$2 z-kFWJJN1d#I-cM|fZ2vhntfID-4Q$n4;EV;#$y=zBM^odI;O{vk7M?0`-mBK?v2?6 zJ@THBPs#UWi~K~!9%P7ZSgN3E{BkG@>uIB`k1kpt-`Me06K+!rAS@l&x`4XkBJCS> z3++y{aj|j`PqskSAqYa-bdiphF2&^Hz-`z3ufYlD|2HrhlXEhr;4d?@@?FpsvJIAr z#x7}IrH!HHR)98V{*mXR3pZ?QQ1+9I>tShlp4&S@8lXa{_^{N-2sExtjipLuVG_5n zx1R_b4OEg#o?<HQfn(}EiU%m(1p(H(ILCM`D~2{mlu8a~^QKl{Ext3Ha*$&|BJHl` zaJd5c`o`OEgT^!y+F*>%yI=TE7>*uYPwovbx|C~lby_Q9P{wo@2Ym@mYD{+7OY*yS zj~p?;U{W*2KMzcJUPD9x6W>H&sgFJJ28BwSpfFhjBoME$5Bq`@s5TKgSp$Tkv)WNG z4xs+(P=DPknYFj4c<jh@+w34l3sc)cDx9eTpmz0ekYd|X4<R!3Aqt06!-m5|0k%MI zBlGy~uvC+tIK_kO{lOspr9$*QI2zXy?eJ94;fcaFqp<0y_d#^Rx7>&yO!>)g$iFKA z^#~5djkn8J;lFhSek?ML)kWwsZP4}<c}7G0{T0?n_x}(7OR!^$K<FLCx-hw!VzUIh zpu#(26Ds)|b{^WDGC-WPa9nE20(#O!>oC=UTh+%P-mn5GtuT>Q!e*LDMT!OGK03S{ zK=*Z@ovS%nayhxSZ58g+*qJIqG->nS&>ua#o{VcJJM-A<3*<Dn4bJmY>}NP{at?&g zsukCm6?RzbyKXlnx%vQ%RS{sHRW8I&aARxox#-I*<9sF%Y={cktB`g$H1_<6HobPx zo@=+Az0<Nmv7f_7!6j@7cGwy={49N5c@knSq*91v<pJX9Jczx`we_k<@&1{YzwOY` T=T)p<;HPuq0r<d{!H@p{-gqlv literal 0 HcmV?d00001 diff --git a/rq_controller/common/io/rq_json/__pycache__/write.cpython-38.pyc b/rq_controller/common/io/rq_json/__pycache__/write.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5057d83a064f848cede847c049430adcd42e2b62 GIT binary patch literal 2402 zcma)8OOG2x5bmDo8P9m_jdv5si$H)7upqv1K@ma(DM}PAOCSmwS!zw(J-g$~D?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XBTC+>t{vh?Qk4D8T3rq8{JH{F`hV>(Y^bH~u0C4EV@=~U@6 znei&sgMI!CQ@Casp=EoK)P0%m>3y_qEo_IWuqK<g?zZu(SV87tUTB#|m#R|DhwP$g zd3}&1=`(c|SeyCtF>1>S_zdB76rZE`0>z>#Q~)pv6IJH1Qt`-mDGua_;V9_(D-HN5 zF1)gs5PX@*g)6g)`VwF8R-1O-E-S3a8U>*jmi0uNv#--~T6BEnKWpoxq_&hjRCt-d zbhXFIT4iBXEh_6KfdALV(70GjWa_OoF56j2Ig$tzU4@@$6Q;D%(7fOSWK>}eqLwVg z(zM`wtrKs+!c#l({EV`9qC<LX`?p}u8+75dQ<!?^!R{uWKn0EsZkn9ur8vk?Z*dMY zC7a!`r-j0kVpdU@BZcj$K0$%Uq529%0|g!draeEy1~SVyUr9YqWQAi|;hBM#bv&Rg zx5GMNXUp2VZQ~U%?nlNcDs>)KnFgLgS^CKOVSLMkQkce>1J)mOAaZx_+_N=ow_17k W@`wm-&LaI5kMp?$;DU1j-1rv+%TmJt literal 0 HcmV?d00001 diff --git a/rq_controller/common/projection.py b/rq_controller/common/projection.py index d196bc7..b802794 100644 --- a/rq_controller/common/projection.py +++ b/rq_controller/common/projection.py @@ -1,22 +1,32 @@ +from __future__ import annotations + import numpy as np from numpy import ndarray from .projection_geometry import PyProjectionGeometry from rq_interfaces.msg import Projection, ProjectionGeometry +from sensor_msgs.msg import Image +import ros2_numpy + class PyProjection(PyProjectionGeometry): def __init__(self, focal_spot_mm: ndarray, detector_postion_mm: ndarray, detector_orientation_quad: ndarray, image: np.ndarray, - detector_heigth_mm: float, detector_width_mm: float, frame_id: str = 'object') -> None: - super().__init__(focal_spot_mm, detector_postion_mm, detector_orientation_quad, frame_id) - self.image = image + detector_heigth_mm: float, detector_width_mm: float, frame_id: str = 'object', + focal_spot_orientation_quad: np.ndarray = np.array([0., 0., 0, 1.]), + voltage_kv: float = 100., current_ua: float = 100., exposure_time_ms: float = 1000.) -> None: + super().__init__(focal_spot_mm, detector_postion_mm, detector_orientation_quad, frame_id, focal_spot_orientation_quad) + self.image = image.astype(np.uint16) self.detector_heigth_mm = detector_heigth_mm self.detector_width_mm = detector_width_mm + self.voltage_kv = voltage_kv + self.current_ua = current_ua + self.exposure_time_ms = exposure_time_ms @classmethod def dummy(cls): - return cls(np.array([1., 0., 0]), - np.array([-1., 0., 0]), + return cls(np.array([0., 100., 0]), + np.array([0., -100., 0]), np.array([1., 0., 0, 1.]), np.zeros((10, 10)), 10., 10.) @@ -36,12 +46,25 @@ class PyProjection(PyProjectionGeometry): msg.projection_geometry.detector_orientation_quad.z, msg.projection_geometry.detector_orientation_quad.w]) - image = msg.image + focal_spot_orientation = np.array([msg.projection_geometry.focal_spot_orientation_quad.x, + msg.projection_geometry.focal_spot_orientation_quad.y, + msg.projection_geometry.focal_spot_orientation_quad.z, + msg.projection_geometry.focal_spot_orientation_quad.w]) + + detector_heigth_mm = msg.detector_heigth_mm detector_width_mm = msg.detector_width_mm frame_id = msg.projection_geometry.header.frame_id - return cls(focal_spot_mm, detector_center_mm, detector_orientation_quad, image, detector_heigth_mm, detector_width_mm, frame_id) + image = ros2_numpy.numpify(msg.image) + + voltage_kv = msg.voltage_kv + current_ua = msg.current_ua + exposure_time_ms = msg.exposure_time_ms + + return cls(focal_spot_mm, detector_center_mm, detector_orientation_quad, image, + detector_heigth_mm, detector_width_mm, frame_id, focal_spot_orientation, + voltage_kv, current_ua, exposure_time_ms) def as_message(self) -> ProjectionGeometry: message = Projection() @@ -60,13 +83,23 @@ class PyProjection(PyProjectionGeometry): projection_geometry.detector_orientation_quad.z = self.detector_orientation_quad[2] projection_geometry.detector_orientation_quad.w = self.detector_orientation_quad[3] + projection_geometry.focal_spot_orientation_quad.x = self.focal_spot_orientation_quad[0] + projection_geometry.focal_spot_orientation_quad.y = self.focal_spot_orientation_quad[1] + projection_geometry.focal_spot_orientation_quad.z = self.focal_spot_orientation_quad[2] + projection_geometry.focal_spot_orientation_quad.w = self.focal_spot_orientation_quad[3] + message.projection_geometry = projection_geometry - message.image = self.image + message.image = ros2_numpy.msgify(Image, self.image, 'mono16') + message.detector_heigth_mm = self.detector_heigth_mm message.detector_width_mm = self.detector_width_mm message.projection_geometry.header.frame_id = self.frame_id + message.voltage_kv = self.voltage_kv + message.current_ua = self.current_ua + message.exposure_time_ms = self.exposure_time_ms + return message @property diff --git a/rq_controller/common/projection_geometry.py b/rq_controller/common/projection_geometry.py index 6b4bd73..8548dcd 100644 --- a/rq_controller/common/projection_geometry.py +++ b/rq_controller/common/projection_geometry.py @@ -1,12 +1,17 @@ +from __future__ import annotations + import numpy as np -from rq_interfaces.msg import ProjectionGeometry +from rq_interfaces.msg import ProjectionGeometry, Projection class PyProjectionGeometry(): - def __init__(self, focal_spot_mm: np.ndarray, detector_postion_mm: np.ndarray, detector_orientation_quad: np.ndarray, - frame_id: str = 'object') -> None: + def __init__(self, focal_spot_mm: np.ndarray, detector_postion_mm: np.ndarray, + detector_orientation_quad: np.ndarray, + frame_id: str = 'object', focal_spot_orientation_quad: np.ndarray = np.array([0., 0., 0, 1.]) + ) -> None: self.focal_spot_mm = focal_spot_mm self.detector_postion_mm = detector_postion_mm + self.focal_spot_orientation_quad = focal_spot_orientation_quad self.detector_orientation_quad = detector_orientation_quad self.frame_id = frame_id @@ -14,7 +19,7 @@ class PyProjectionGeometry(): def dummy(cls): return cls(np.array([1., 0., 0]), np.array([-1., 0., 0]), - np.array([1., 0., 0, 1.])) + np.array([0., 0., 0, 1.])) @classmethod def from_message(cls, msg: ProjectionGeometry): @@ -30,9 +35,15 @@ class PyProjectionGeometry(): msg.detector_orientation_quad.y, msg.detector_orientation_quad.z, msg.detector_orientation_quad.w]) + + focal_spot_orientation = np.array([msg.focal_spot_orientation_quad.x, + msg.focal_spot_orientation_quad.y, + msg.focal_spot_orientation_quad.z, + msg.focal_spot_orientation_quad.w]) + frame_id = msg.header.frame_id - return cls(focal_spot_mm, detector_center_mm, detector_orientation_quad, frame_id) + return cls(focal_spot_mm, detector_center_mm, detector_orientation_quad, frame_id, focal_spot_orientation) def as_message(self) -> ProjectionGeometry: message = ProjectionGeometry() @@ -45,6 +56,11 @@ class PyProjectionGeometry(): message.detector_postion_mm.y = self.detector_postion_mm[1] message.detector_postion_mm.z = self.detector_postion_mm[2] + message.focal_spot_orientation_quad.x = self.focal_spot_orientation_quad[0] + message.focal_spot_orientation_quad.y = self.focal_spot_orientation_quad[1] + message.focal_spot_orientation_quad.z = self.focal_spot_orientation_quad[2] + message.focal_spot_orientation_quad.w = self.focal_spot_orientation_quad[3] + message.detector_orientation_quad.x = self.detector_orientation_quad[0] message.detector_orientation_quad.y = self.detector_orientation_quad[1] message.detector_orientation_quad.z = self.detector_orientation_quad[2] -- GitLab