...
 
Commits (8)
......@@ -10,115 +10,28 @@ actuators:
- 0
channels:
mass_observer_deflationpath:
coefficient_Pout:
- -0.0016168662595908562
- -0.0015097471114139918
- -0.0005800718977539967
- -0.0021242122064543093
- -0.0007666628821214218
- -0.0015958434010035043
- 0
- 0
coefficient_Psupply:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0
- 0
coefficient_bias:
- 0.012864487173452233
- -0.03961815940473912
- -0.033479687115889334
- 0.024768407633688483
- -0.05523629863613699
- -0.00685537207295539
- 0
- 0
coefficient_friction:
- -0.03602927603430779
- -0.046917666203807176
- -0.0475232371606362
- -0.033409085164536015
- -0.06156819914347921
- -0.024469513800780215
- 0
- 0
coefficient_injector:
- -0.7366250524164704
- -0.6796672055752857
- -0.6940081106091512
- -0.7189081530978955
- -0.6955506163303652
- -0.7349870878777801
- 0
- 0
minimal_mass_change:
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
coefficient_Pout: [-0.0019486563545565716, -0.001630704479116521, -0.0007783609667367103,
-0.0010665158758436932, 0.0008028172926755617, 0.0001496146126067771, 0, 0]
coefficient_Psupply: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]
coefficient_bias: [0.06849645464400211, -0.030629581464268085, -0.0077502975396228635,
-0.1503822318004655, -0.32220462414890605, -0.2957953998978038, 0, 0]
coefficient_friction: [0.07621722889191501, 0.0342427954403236, 0.02859135840397764,
0.009191375036562366, -0.0017936504480947635, 0.0386745423951107, 0, 0]
coefficient_injector: [-0.7812922427608278, -0.7116970072990145, -0.7242177573798964,
-0.7375180246231469, -0.7217784999804854, -0.7627433144824398, 0, 0]
minimal_mass_change: [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5]
mass_observer_inflationpath:
coefficient_Pout:
- -0.0015187968884620403
- -0.0014065902363839952
- -0.0010822644255990574
- -0.0012522323328682569
- -0.001042770323861337
- -0.0020975356644820594
- 0
- 0
coefficient_Psupply:
- 0.0035167787644046194
- 0.00366581115432901
- 0.003675122134413233
- 0.0016149816060655382
- 0.0015850932237264997
- 0.0014128457730333954
- 0
- 0
coefficient_bias:
- -0.5695754204447123
- -0.6113056174760914
- -0.8537774711286179
- 0.16629990594688593
- -0.04974019015171294
- 0.48005163919303584
- 0
- 0
coefficient_friction:
- 0.3594292142048378
- 0.33034215598564537
- 0.2936295322430817
- 0.32608895569950813
- 0.33858288826372773
- 0.34745529142482773
- 0
- 0
coefficient_injector:
- 0.5702735733959337
- 0.5227517790630235
- 0.5329925944591092
- 0.5368289031801242
- 0.556454574839814
- 0.5840851175770825
- 0
- 0
minimal_mass_change:
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
coefficient_Pout: [0.004725859920382915, 0.003132968464052723, 0.0031407721126566687,
0.002032042738775358, 0.0029147802823538335, 0.0024707450614414386, 0, 0]
coefficient_Psupply: [-0.038306287272228415, -0.026345281564882937, -0.02403213834212981,
-0.013703151956711955, -0.017179949188812122, -0.016704062162112704, 0, 0]
coefficient_bias: [14.85089612242583, 10.416995084785203, 9.337238240206068, 5.589409721945575,
6.591250548364157, 6.726711383079314, 0, 0]
coefficient_friction: [0.6858599449300176, 0.5589431207960982, 0.507519429613661,
0.5115788917583939, 0.5946201823886065, 0.6327201395542298, 0, 0]
coefficient_injector: [0.4157481831078704, 0.4146669954665546, 0.4308498990681886,
0.45034003563796593, 0.43806785602730963, 0.452187460004946, 0, 0]
minimal_mass_change: [1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5]
nominal_volume: []
os:
hostname: beagleX.local
......
actuators:
actuation_ratio: [0.02, 0.02, 0.02, 0.02, 0, 0, 0, 0]
channels:
mass_observer_deflationpath:
coefficient_Pout: [-0.0018952313732572557, -0.0013065147598870092, -0.002005497394772071,
-0.00127305158336663, -0.0007949107500658109, -0.0015106943615953994, 0, 0]
coefficient_Psupply: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]
coefficient_bias: [0.12291859938854799, 0.03224226148012477, -0.04727428985667359,
-0.04408067556587092, 0.0720016655175133, 0.087087313382602, 0, 0]
coefficient_friction: [-0.005454912298199499, -0.010292502755131994, -0.009015755171917939,
-0.1403613394541166, 0.06335332970428664, -0.0016698314393945868, 0, 0]
coefficient_injector: [-0.7148075717800018, -0.7131459550226052, -0.7264779227293654,
-0.6104593185077293, -0.7808723286572182, -0.7388769027135307, 0, 0]
minimal_mass_change: [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5]
mass_observer_inflationpath:
coefficient_Pout: [0.0021493679515148354, 0.0021421807989086255, 0.0018321990403523517,
0.0011164844109019158, 0.002795126346036559, 0.002864012319160913, 0, 0]
coefficient_Psupply: [-0.014954571607847786, -0.014114689395215613, -0.0162221075269239,
-0.016813419659614283, -0.02387941679365276, -0.02036356971632857, 0, 0]
coefficient_bias: [5.818289915685726, 5.439662933710819, 6.887632247305088, 7.0358808726513145,
9.793092734584363, 7.759724176822725, 0, 0]
coefficient_friction: [0.5062497671076527, 0.4945438926176113, 0.5458156411612163,
0.522483900578272, 0.6260997295097943, 0.568258707467364, 0, 0]
coefficient_injector: [0.4959702170112427, 0.4955594780307857, 0.4929093764959804,
0.4820686338665038, 0.48241086489796114, 0.4978336406038174, 0, 0]
minimal_mass_change: [1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5]
nominal_volume: []
os: {hostname: beagleX.local}
valves:
lohm_deflate: []
lohm_inflate: []
minimum_deflation_period: []
minimum_inflation_period: []
nominal_pressure_supply: 280.0
on_off_time_offset: [0, 0, 0, 0, 0, 0, 0, 0]
actuators:
actuation_ratio:
- 0.02
- 0.02
- 0.02
- 0.02
- 0
- 0
- 0
- 0
actuation_ratio: [0.02, 0.02, 0.02, 0.02, 0, 0, 0, 0]
channels:
mass_observer_deflationpath:
coefficient_Pout:
- -0.0013827112312906368
- -0.0017031053408351224
- -0.0018018991681658719
- -0.0024621338235537842
- -0.0008132986576195137
- -0.0005228573316912102
- 0
- 0
coefficient_Psupply:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0
- 0
coefficient_bias:
- 0.030730527750847614
- 0.03552824457156056
- 0.0351356723076961
- 0.0870725951687703
- -0.0024284216073802156
- 0.0023160940008253306
- 0
- 0
coefficient_friction:
- -0.04825867140957227
- -0.08407661627769639
- -0.054324120906841925
- -0.02658727789183875
- -0.028889481910084874
- -0.01736442029419323
- 0
- 0
coefficient_injector:
- -0.7392014789482725
- -0.6814836414560633
- -0.6922965760190325
- -0.7055943655481054
- -0.7143194844753606
- -0.7256569308225739
- 0
- 0
minimal_mass_change:
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
coefficient_Pout: [0.00015773171013880316, 0.00026312907559311594, 7.783859898143064e-05,
-0.0007437305456647059, 0.001287872421017855, 0.0007073980458529167, 0, 0]
coefficient_Psupply: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]
coefficient_bias: [-0.21793686824888248, -0.30359344684170786, -0.2892324455958999,
-0.21123187807363308, -0.3655109281286979, -0.20223068322930082, 0, 0]
coefficient_friction: [0.005394916318339271, -0.020463285787963248, -0.004777803514768086,
0.016727583487607167, 0.014998866548673717, 0.0006357162002548211, 0, 0]
coefficient_injector: [-0.7627398391422128, -0.708751720005587, -0.7138269839751552,
-0.7243690466363353, -0.733097152709615, -0.7335234018846097, 0, 0]
minimal_mass_change: [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5]
mass_observer_inflationpath:
coefficient_Pout:
- -0.0005110746913590329
- -0.0007564772592199852
- -0.0012600948102325148
- -0.0009120915792251242
- -0.0014243061505006547
- -0.0004805194356791161
- 0
- 0
coefficient_Psupply:
- 0.003134209830583168
- 0.0028787654299602225
- 0.004434955316797501
- 0.004866041232573508
- 0.004746430638870775
- 0.003173253893212757
- 0
- 0
coefficient_bias:
- -0.9732736807961757
- -0.6712514673536418
- -0.8770359835211767
- -1.2308167099946736
- -0.9891362125559962
- -0.8876834674733409
- 0
- 0
coefficient_friction:
- 0.3404094994614185
- 0.37467792199791583
- 0.37234242728687933
- 0.35087805048558524
- 0.35269050984515204
- 0.34707949112312975
- 0
- 0
coefficient_injector:
- 0.5723468220797333
- 0.5693469303164649
- 0.5411955962388928
- 0.5540755905907173
- 0.5454016088481153
- 0.5159179497287
- 0
- 0
minimal_mass_change:
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
coefficient_Pout: [0.0025089733301158056, 0.0028936513549710514, 0.0016868730597706608,
0.0020130704380003413, 0.0017608722383896918, 0.0011395607792660557, 0, 0]
coefficient_Psupply: [0.0026823378476967387, -0.0009602023368541291, 0.0026867328923323645,
0.003251569340259955, 0.003154219525065885, 0.004737645717257964, 0, 0]
coefficient_bias: [-1.4695732134521524, 0.02924079529570811, -0.8619073787778238,
-1.261509073329746, -1.1034092510586806, -1.9113084310212276, 0, 0]
coefficient_friction: [0.5489613846195629, 0.6254006507082112, 0.580321098493852,
0.5524301634450235, 0.5748085745186403, 0.45353242240581204, 0, 0]
coefficient_injector: [0.47546020128872046, 0.45469176282954676, 0.44560907734055377,
0.4614176179678264, 0.443824153890394, 0.46695139687361104, 0, 0]
minimal_mass_change: [1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5]
nominal_volume: []
os:
hostname: beagleX.local
os: {hostname: beagleX.local}
valves:
lohm_deflate: []
lohm_inflate: []
minimum_deflation_period: []
minimum_inflation_period: []
nominal_pressure_supply: 280.0
on_off_time_offset:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
on_off_time_offset: [0, 0, 0, 0, 0, 0, 0, 0]
actuators:
actuation_ratio:
- 0.02
- 0.02
- 0.02
- 0.02
- 0
- 0
- 0
- 0
actuation_ratio: [0.02, 0.02, 0.02, 0.02, 0, 0, 0, 0]
channels:
mass_observer_deflationpath:
coefficient_Pout:
- -0.0019568752626189325
- -0.0014351447565632085
- -0.0008595807155817117
- -0.0035679267173585453
- -0.0010868447884881452
- -0.001073104367868519
- 0
- 0
coefficient_Psupply:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0
- 0
coefficient_bias:
- 0.03161934473230943
- 0.01914601390006787
- -0.013645538233451049
- 0.38809097611795984
- 0.006244183858759911
- 0.005681995786011029
- 0
- 0
coefficient_friction:
- -0.06949886272019075
- -0.065338583937439
- -0.04920594589726427
- -0.09024166387615094
- -0.031533201140930285
- -0.056763667256606795
- 0
- 0
coefficient_injector:
- -0.7124618362429702
- -0.6816891247247078
- -0.7137525342774647
- -0.6778605461699957
- -0.7001591088016743
- -0.6824873018996
- 0
- 0
minimal_mass_change:
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
coefficient_Pout: [-0.0008679621046172453, -0.0002616556086399574, 0.0004190424968121692,
-0.003362226124022677, 0.0001484941488771735, 0.00012841941971557247, 0, 0]
coefficient_Psupply: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]
coefficient_bias: [-0.12032382086016824, -0.17305906804547, -0.20374980866520964,
0.35955805999401136, -0.18502136302594785, -0.1871819097514127, 0, 0]
coefficient_friction: [0.026748283398258577, -0.004396219343872854, 0.054873540332592674,
-0.09459294996649767, 0.04819465105629933, 0.006076061203678873, 0, 0]
coefficient_injector: [-0.7541855158875789, -0.7079288325507367, -0.7597062119354497,
-0.6759331447372191, -0.7355073697529377, -0.709727982897665, 0, 0]
minimal_mass_change: [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5]
mass_observer_inflationpath:
coefficient_Pout:
- -0.0004335957274896349
- -0.0003957852324422839
- -0.001695747678593751
- -0.002485209564858864
- -0.0009644702704653242
- -0.00027886043058452287
- 0
- 0
coefficient_Psupply:
- 0.0021820687498340947
- 0.0017495608033694621
- 0.004940214452652108
- -0.003917923803407605
- 0.0036904008557124817
- 0.001563423154420828
- 0
- 0
coefficient_bias:
- -0.500430940741964
- -0.3153591881221587
- -0.8410899530684173
- 2.4454190491668015
- -0.8282979569789628
- -0.2947664963429091
- 0
- 0
coefficient_friction:
- 0.38030848096311626
- 0.37434447297909673
- 0.36841755988908464
- 0.4152152945843884
- 0.3622688963925165
- 0.35408247848430713
- 0
- 0
coefficient_injector:
- 0.5883048749706704
- 0.5357147170444232
- 0.5928726873536269
- 0.5267050301808726
- 0.55945955738128
- 0.53380647192378
- 0
- 0
minimal_mass_change:
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
coefficient_Pout: [0.006447007403575084, 0.0045870847311935865, 0.005632739688164717,
-0.0012890013729019364, 0.004996742483693209, 0.004507756673688513, 0, 0]
coefficient_Psupply: [-0.013584184434382847, -0.0068080278577304434, -0.01310262015354061,
-0.007583488065781278, -0.007183031651554664, -0.007909099550479413, 0, 0]
coefficient_bias: [4.367524101522509, 2.0698209839987314, 4.811503373001484, 3.6642501331506185,
2.250172800425963, 2.4992793852048756, 0, 0]
coefficient_friction: [0.7679675688960412, 0.6380538583451401, 0.8188221729575268,
0.4445960302632746, 0.7123080284462695, 0.6055267286021431, 0, 0]
coefficient_injector: [0.4090448962900668, 0.4133840642826511, 0.3862555903283787,
0.5123190948414419, 0.3977097446434305, 0.41646087441167373, 0, 0]
minimal_mass_change: [1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5]
nominal_volume: []
os:
hostname: beagleX.local
os: {hostname: beagleX.local}
valves:
lohm_deflate: []
lohm_inflate: []
minimum_deflation_period: []
minimum_inflation_period: []
nominal_pressure_supply: 280.0
on_off_time_offset:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
on_off_time_offset: [0, 0, 0, 0, 0, 0, 0, 0]
actuators:
actuation_ratio:
- 0.02
- 0.02
- 0.02
- 0.02
- 0
- 0
- 0
- 0
actuation_ratio: [0.02, 0.02, 0.02, 0.02, 0, 0, 0, 0]
channels:
mass_observer_deflationpath:
coefficient_Pout:
- -0.0009984521604731987
- -0.0017029787688268396
- -0.001127986377620139
- -0.0008270916375019
- -0.0012366660092588497
- -0.0009274347888989212
- 0
- 0
coefficient_Psupply:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0
- 0
coefficient_bias:
- -0.01906330310997184
- 0.015851319960736632
- 0.0076085382710484595
- -0.0336510078770651
- -0.023652406008817906
- -0.022677755659007204
- 0
- 0
coefficient_friction:
- -0.087905970261769
- -0.04408410263918116
- -0.054433282717241696
- -0.06635937098252373
- -0.08484039494465977
- -0.024850716198981517
- 0
- 0
coefficient_injector:
- -0.641632295239167
- -0.696372931293546
- -0.7043182555330599
- -0.6826155428836108
- -0.6616549117218197
- -0.7406441745811291
- 0
- 0
minimal_mass_change:
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
- -1.5
coefficient_Pout: [-0.0010921848367868997, -0.002378816902165834, -0.0020150819056452413,
0.00038890113411985117, -0.0001322386612615037, 0.00011572870042764888, 0, 0]
coefficient_Psupply: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0]
coefficient_bias: [-0.015004704036108762, 0.1297289631582874, 0.1561363175110344,
-0.21818683590048238, -0.1884214065770209, -0.14675895515613213, 0, 0]
coefficient_friction: [-0.040890574352158676, 0.07427226791051178, 0.06906047027225726,
0.012297555642427072, -0.007545026212547823, 0.08063284387245684, 0, 0]
coefficient_injector: [-0.6585576072495658, -0.743335101727143, -0.7525170071290684,
-0.7160702755017696, -0.694902461888332, -0.786525143278924, 0, 0]
minimal_mass_change: [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5]
mass_observer_inflationpath:
coefficient_Pout:
- 0.0004885821133002531
- -0.0005085391061244212
- -0.0006031649382411846
- -0.0009567102254539127
- -0.000907731553250784
- -0.0011726708596504153
- 0
- 0
coefficient_Psupply:
- 3.610560443008206e-06
- 0.0009421579405313338
- 0.0011291704819600588
- 0.004829180703351416
- 0.004625830940392235
- 0.005017356887936105
- 0
- 0
coefficient_bias:
- -0.24319048253170905
- -0.011650435989194463
- -0.04647030223484627
- -1.2316474405282403
- -1.2090144272432362
- -1.1956339598453987
- 0
- 0
coefficient_friction:
- 0.28506980206773247
- 0.3511138982228483
- 0.3593055606825024
- 0.3477630293149137
- 0.3726608193994824
- 0.3493997465429582
- 0
- 0
coefficient_injector:
- 0.4941416256749894
- 0.5444994627827903
- 0.5471579612428552
- 0.5709455293727365
- 0.5515807939755557
- 0.5962996818255011
- 0
- 0
minimal_mass_change:
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
- 1.5
coefficient_Pout: [0.001523439264871593, 0.002366883126973281, 0.002606262300821999,
0.0014697355026349335, 0.001594886014581555, 0.0019576158610888697, 0, 0]
coefficient_Psupply: [-0.008298203595017331, -0.016697835532417195, -0.01756444377458559,
0.0018266817272172414, 0.0021268685148468636, -0.0020672228083327276, 0, 0]
coefficient_bias: [2.8474790772282645, 6.3618394590651715, 6.701164095037331,
-0.6842723189976407, -0.8780539371085005, 0.8183947374308964, 0, 0]
coefficient_friction: [0.3826534737999432, 0.6116885781329326, 0.6240397278247426,
0.6380668497539185, 0.634591163982337, 0.6896790936176438, 0, 0]
coefficient_injector: [0.4486936387129102, 0.42492239729944864, 0.4253127784127695,
0.4376523100834639, 0.4328757740227184, 0.44059639527013206, 0, 0]
minimal_mass_change: [1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5]
nominal_volume: []
os:
hostname: beagleX.local
os: {hostname: beagleX.local}
valves:
lohm_deflate: []
lohm_inflate: []
minimum_deflation_period: []
minimum_inflation_period: []
nominal_pressure_supply: 280.0
on_off_time_offset:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
on_off_time_offset: [0, 0, 0, 0, 0, 0, 0, 0]
# -*- coding: utf-8 -*-
"""
Converts a HDF5 file into a csv file
@author: Callum Waters
@copyright 2013-2016 Robotics and Biology Lab, TU Berlin
@licence: BSD Licence
"""
import pandas
import sys
import csv
if __name__ == "__main__":
#read filename from command line, if provided
if len(sys.argv) > 1:
calibrationDBFile = sys.argv[1]
else:
calibrationDBFile = input("Enter calibration data file name: ")
store = pandas.HDFStore(calibrationDBFile)
keylist = [item[0] for item in list(store.items())]
for key in keylist:
df= store[key]
file_name = str(key[1:])
print(file_name)
df.to_csv(file_name + '.csv', index=False)
# -*- coding: utf-8 -*-
"""
This script checks for leaks in a vessel by releasing the values, checking the pressure
and then checking the pressure again after closing the valves for a set period
@author: Callum Waters
@copyright 2020-2023 Robotics and Biology Lab, TU Berlin
@licence: BSD Licence
"""
from pneumaticbox import io, api, utils
import time
channels = 6
delay = 0.5
inflation = 0.8
deflation = 2.5
airserver = utils.connectToDefaultPneumaticbox()
msgs = []
now = api.now()
pressures_before = [None] * channels
pressures_after = [None] * channels
waiting_period = 20.0;
tolerance = 1.0;
accepted = input("Inflation Period: " + inflation + " seconds. Please ensure vessel attached can withstand supply pressure" +
"then press y to start")
if accepted == "y" or accepted == "Y":
print("Pressurizing all channels")
for i in range(channels):
airserver.submit( api.MsgConfigurationControllerThreshold(i) )
airserver.submit( api.MsgControllerActivate(i) )
airserver.submit( api.MsgSignalEvent(api.BLOCK_SIGNALS_CLIENT + i, 1.0, now + delay) )
airserver.submit( api.MsgSignalEvent(api.BLOCK_SIGNALS_CLIENT + i, 0, now + delay + inflation) )
SIGNAL_POUT = api.SIGNALS_CHANNEL[i][2]
airserver.submit( api.MsgSubscribe(SIGNAL_POUT, 0.05 , now + delay ))
time.sleep(delay + inflation + 2.0)
airserver.service_incoming_messages()
for i in range(channels):
SIGNAL_POUT = api.SIGNALS_CHANNEL[i][2]
pressures_before[i] = airserver.serversignals[SIGNAL_POUT][1][0]
print("Begining holding time")
time.sleep(waiting_period)
print("Finishing holding time")
airserver.service_incoming_messages()
leakages = False
for i in range(channels):
SIGNAL_POUT = api.SIGNALS_CHANNEL[i][2]
pressures_after[i] = airserver.serversignals[SIGNAL_POUT][1][0]
if (pressures_before[i] > pressures_after[i] + tolerance or pressures_before[i] < pressures_after[i] - tolerance):
leakages = True
print("Leakage observered on channel " + str(i) + ": " + str(pressures_before[i]) + " -> " + str(pressures_after[i]))
print("Depressurizing all channels")
now = api.now()
for i in range(channels):
airserver.submit( api.MsgSignalEvent(api.BLOCK_SIGNALS_CLIENT + i, -1.0, now + delay) )
airserver.submit( api.MsgSignalEvent(api.BLOCK_SIGNALS_CLIENT + i, 0, now + delay + deflation) )
time.sleep(delay + deflation)
if not leakages:
print("Passed leakage test. All channels held their pressure")