Last active
June 26, 2023 22:59
-
-
Save WestsideRobotics/a8e32dc2ce31cfc408be65c92bb81826 to your computer and use it in GitHub Desktop.
6-18-23 OpMode for FTC PR 2853, testing Webcam Control Blocks for Exposure and Gain 6/26/23 removed setProcessEnabled()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xml xmlns="https://developers.google.com/blockly/xml"> | |
<variables> | |
<variable id="puLG)dm!G_PW2D_0fg4N">myExposureControl</variable> | |
<variable id="ZVg[+e:.))r//_%M^Nz-">myGainControl</variable> | |
<variable id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</variable> | |
<variable id="d3c/kq?LHN~m;PA@fr-t">setModeBoolean</variable> | |
<variable id="B2#938q-r59OnX0GL2vb">setGainBoolean</variable> | |
<variable id="3_c70R~v%rN0,CI.DkqB">myGainValue</variable> | |
<variable id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</variable> | |
<variable type="AprilTagProcessor.Builder" id="NYqOu)Ei(Q{C!f;y!a^O">myAprilTagProcessorBuilder</variable> | |
<variable id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</variable> | |
<variable id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</variable> | |
<variable id="!;}U%XlE[1kRUxXb?;0=">setExposureBoolean</variable> | |
<variable id="aUe.oa!*S^m@RJWfjO!X">minGain</variable> | |
<variable id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</variable> | |
<variable id="YvlvTQ@0/mh_dUUW{(a;">maxGain</variable> | |
<variable id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</variable> | |
<variable id="TH^`wXe*;d{FEY#vBAtF">minExposure</variable> | |
<variable id="cf*^ww67t7IG$zoNx7I@">maxExposure</variable> | |
<variable type="VisionPortal.Builder" id="wx@xgbnS_]b0DQL.08Qg">myVisionPortalBuilder</variable> | |
</variables> | |
<block type="procedures_defnoreturn" id="WtpyD@tEu+EoY=P9iY,D" deletable="false" x="-206" y="-160"> | |
<field name="NAME">runOpMode</field> | |
<comment pinned="false" h="45" w="532">This function is executed when this Op Mode is selected from the Driver Station.</comment> | |
<data>{"commentPositionLeft":-133,"commentPositionTop":-70}</data> | |
<statement name="STACK"> | |
<block type="comment" id="vG1;7$#*;crH,9)V$Lbq"> | |
<field name="COMMENT">This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation.</field> | |
<next> | |
<block type="comment" id="vUNjVyX%Y9V~:.7m2xe7"> | |
<field name="COMMENT">It also tests the new "transformer Blocks" for Exposure and Gain.</field> | |
<next> | |
<block type="variables_set" id="+WOa|3hz0c^Rah6+[;U4"> | |
<field name="VAR" id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id="C]dWgdzJ2YW[h}=7w5QN"> | |
<field name="BOOL">TRUE</field> | |
</block> | |
</value> | |
<next> | |
<block type="procedures_callnoreturn" id="f5VC4xOrYYZrGzpFY}@G"> | |
<mutation name="initAprilTag"/> | |
<comment pinned="false" h="60" w="270">Initialize AprilTag before waitForStart.</comment> | |
<next> | |
<block type="controls_whileUntil" id="h1Xrlgu|L8w(=tIL,Q8V"> | |
<field name="MODE">WHILE</field> | |
<value name="BOOL"> | |
<block type="logic_operation" id="z2}lPJUqg#pK?C$DvTO." inline="false"> | |
<field name="OP">AND</field> | |
<value name="A"> | |
<block type="logic_compare" id="d!oj^kSgz%zjku|L3UxS" inline="false"> | |
<field name="OP">NEQ</field> | |
<value name="A"> | |
<block type="visionPortal_getCameraState" id="@S]9Bi|b/[P{$:xVO5RX"> | |
<comment pinned="false" h="150" w="325">Return the state of the camera.</comment> | |
<value name="VISION_PORTAL"> | |
<block type="variables_get" id="Vw2e55.uo`X]7PA(6hin"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="B"> | |
<block type="visionPortal_typedEnum_cameraState" id=";Qw#T4e8Fp%Ayv=IaV@1"> | |
<field name="CAMERA_STATE">STREAMING</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="B"> | |
<block type="linearOpMode_opModeInInit" id="qkVI4$;4h~JUJxQD6BiD"/> | |
</value> | |
</block> | |
</value> | |
<statement name="DO"> | |
<block type="comment" id=":uOqfr2m9(aBG`ytR7!-"> | |
<field name="COMMENT">Wait for Streaming to begin, before using Camera Controls.</field> | |
<next> | |
<block type="linearOpMode_sleep_Number" id="W~bNu[!LFp4xMLXE2q6{"> | |
<value name="MILLISECONDS"> | |
<shadow type="math_number" id="s@8U^NWR20-Fz#c_D~!}"> | |
<field name="NUM">200</field> | |
</shadow> | |
</value> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<next> | |
<block type="procedures_callnoreturn" id="-BLW2A#m5-DaP,Fi~U15"> | |
<mutation name="initialize Exposure Control"/> | |
<next> | |
<block type="procedures_callnoreturn" id="c:T)Cv@Q-!K+TUN,sH(o"> | |
<mutation name="initialize Gain Control"/> | |
<next> | |
<block type="telemetry_addTextData_All" id="Y/b(p3p_Ls7l_.)bQt%8"> | |
<value name="KEY"> | |
<shadow type="text" id="]K/@Q[7z:EBSoy.ggFCo"> | |
<field name="TEXT">DS preview on/off</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="eV-62@bA|1V9{)n7lim2"> | |
<field name="TEXT">3 dots, Camera Stream</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="/Zm[n8^)(`(S}Ab9j!;|"> | |
<value name="KEY"> | |
<shadow type="text" id="E)4aB(Zb2,Da/0v0AiN="> | |
<field name="TEXT">></field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="^u5_oh+s(.Vs1Kk;$yw9"> | |
<field name="TEXT">Touch Play to start OpMode</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_update" id="CcM7+$syN,5p}u1NCi8q"> | |
<next> | |
<block type="linearOpMode_waitForStart" id=":`$wN_ci`O;o6P0~.(+g"> | |
<next> | |
<block type="controls_if" id="}Q?5mbxSO8Di;i!__6[y"> | |
<value name="IF0"> | |
<block type="linearOpMode_opModeIsActive" id=")o%YFX/#9kvv^sgXr4~5"/> | |
</value> | |
<statement name="DO0"> | |
<block type="controls_whileUntil" id="^0Kagy/e+Ea{rbZPv2G6"> | |
<field name="MODE">WHILE</field> | |
<value name="BOOL"> | |
<block type="linearOpMode_opModeIsActive" id="e)cr{!2VIET83s,JWC.="/> | |
</value> | |
<statement name="DO"> | |
<block type="procedures_callnoreturn" id="vFtq$`!=QgH!UFn~vc0A"> | |
<mutation name="set Exposure"/> | |
<next> | |
<block type="procedures_callnoreturn" id="FNL703DS@`YK;5_#FE%F"> | |
<mutation name="set Gain"/> | |
<next> | |
<block type="procedures_callnoreturn" id="L1~6q-w9m`2ahlT|b!@A"> | |
<mutation name="telemetryAprilTag"/> | |
<next> | |
<block type="telemetry_update" id="exvivmft-pX$n!1,8Ea$"> | |
<comment pinned="false" h="55" w="295">Push telemetry to the Driver Station.</comment> | |
<next> | |
<block type="linearOpMode_sleep_Number" id="jjoCwI:;J87CrtGs%}K7"> | |
<comment pinned="false" h="46" w="191">Share the CPU.</comment> | |
<value name="MILLISECONDS"> | |
<shadow type="math_number" id="w~.7$M*lJeh#@I/xsbHy"> | |
<field name="NUM">20</field> | |
</shadow> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
</statement> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="fQp~,ZYAv00*6j5^:acx" x="509" y="-168"> | |
<field name="NAME">initialize Exposure Control</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="variables_set" id="cIU,w5I;3FNYSCEa4J-2"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
<comment pinned="false" h="150" w="325">Get the ExposureControl object, to allow adjusting the camera's exposure.</comment> | |
<value name="VALUE"> | |
<block type="visionPortal_getExposureControl" id="fPmk;?I8]MC)0TycR(S3"> | |
<value name="VISION_PORTAL"> | |
<block type="variables_get" id="4!;mpJ@mF3pa1eJL.7u#"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="S9y[x,OEXUTLN1;~6A%t"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setModeBoolean</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id="n3fi8q|kLrUW[@?=@a[0"> | |
<field name="BOOL">FALSE</field> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="g5}@kOj[+VUMRF(PHVMP"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setExposureBoolean</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id=")+e@cFc,;WKs2%5s$%6z"> | |
<field name="BOOL">FALSE</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="0tk7!PD{,d0SCEU?gi57"> | |
<field name="COMMENT">Enable ONE of the next two Blocks.</field> | |
<next> | |
<block type="exposureControl_setMode" id="VgxsIQIBo`h)Oq~@sBRj"> | |
<mutation has_output="false"/> | |
<comment pinned="false" h="150" w="325">Set the exposure mode value.</comment> | |
<data>{"commentPositionLeft":-68,"commentPositionTop":-175}</data> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="Kz*N#NT7o3d.]Hbm$#nW"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="MODE"> | |
<shadow type="exposureControl_typedEnum_mode" id="DX!V|FN}5(,NI1j96t/v"> | |
<field name="MODE">Manual</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="variables_set" id=";1kP4`0-*:Sv^izRmWY+" disabled="true"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setModeBoolean</field> | |
<value name="VALUE"> | |
<block type="exposureControl_setMode" id="O7).)ZZNrQ(-VxXe@,uK"> | |
<mutation has_output="true"/> | |
<comment pinned="false" h="150" w="325">Set the exposure mode value.</comment> | |
<data>{"commentPositionLeft":-68,"commentPositionTop":-175}</data> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="Rz_E5p7k!84tbj4[OE`9"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="MODE"> | |
<shadow type="exposureControl_typedEnum_mode" id="l@?TxU=H_5Y3)wu..~^`"> | |
<field name="MODE">Manual</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="N0I;MY}X2B%sr+-srwxp"> | |
<field name="VAR" id="TH^`wXe*;d{FEY#vBAtF">minExposure</field> | |
<value name="VALUE"> | |
<block type="exposureControl_getExposure" id="t!2e_y,3-]}OWI19^8e@"> | |
<field name="FUNC">getMinExposure</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="o:|Ft@9.S|azDy9+O_2j"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="y){gz1@IiNC(ei-vZpg0"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="F$kPup9*q@74HeiGguF}"> | |
<field name="VAR" id="cf*^ww67t7IG$zoNx7I@">maxExposure</field> | |
<value name="VALUE"> | |
<block type="exposureControl_getExposure" id="6(YKCxW1F!+1E+|:*m;8"> | |
<field name="FUNC">getMaxExposure</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="TA7{*4yR%u/.qe*wz;ki"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="gE,@En`Wvo,jW+U-zXCy"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="khE)ay;ssG?Nq7ducezI"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
<value name="VALUE"> | |
<block type="exposureControl_getExposure" id="GmA+gF7;U/Nw1gq;4T8L"> | |
<field name="FUNC">getExposure</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="Q+8dVHl-MD[|$I_^}g(9"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="/j{!)hT=3/]IoP_jHsj0"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="Q]epLJ8t7%$CryS7Sz]0" x="1404" y="-173"> | |
<field name="NAME">initialize Gain Control</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="variables_set" id="_u:lGRkUORt$*t8[9kx~"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
<comment pinned="false" h="150" w="325">Get the GainControl object, to allow adjusting the camera's gain.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="VALUE"> | |
<block type="visionPortal_getGainControl" id="Q$r1W31^-#Cx)KgNN={#"> | |
<value name="VISION_PORTAL"> | |
<block type="variables_get" id="|6l*s$zl*~qbQp3`,;i4"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="yEdKu)qMi(0dsc;aSe9B"> | |
<field name="VAR" id="B2#938q-r59OnX0GL2vb">setGainBoolean</field> | |
<value name="VALUE"> | |
<block type="logic_boolean" id="00G/o(kULaz!UyDPBpX:"> | |
<field name="BOOL">FALSE</field> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="Gc3~Ny:|u_N#H5OJ6~cX"> | |
<field name="VAR" id="aUe.oa!*S^m@RJWfjO!X">minGain</field> | |
<value name="VALUE"> | |
<block type="gainControl_getGain" id="v^K-Dtja4^fv6|IsJjB8"> | |
<field name="FUNC">getMinGain</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) gain.</comment> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="G+wN6~xZ2{!|RM@En0}t"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="$C8c`N^wFI[p@ozMW#!{"> | |
<field name="VAR" id="YvlvTQ@0/mh_dUUW{(a;">maxGain</field> | |
<value name="VALUE"> | |
<block type="gainControl_getGain" id="Mf2*Qyy}}|)pSi[Re7@a"> | |
<field name="FUNC">getMaxGain</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) gain.</comment> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="SQh)]p)(9!-*ls,[h4|f"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="/M?:+pqNG7UiUwWW/[+p"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
<value name="VALUE"> | |
<block type="gainControl_getGain" id="yyi.-{=~/ipIA{d?B{qh"> | |
<field name="FUNC">getGain</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) gain.</comment> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="SJUL?Bg?G67j{^jBMU5j"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="%M8Sjfbt@M*M9T/?h@st" x="1404" y="141"> | |
<field name="NAME">set Gain</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="comment" id="!MHi2EXMt*P4y+uRYwEo"> | |
<field name="COMMENT">Adjust Gain with Right Joystick up and down.</field> | |
<next> | |
<block type="math_change" id="=v!Nw[@eG`e,;Gh2f7@P"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
<value name="DELTA"> | |
<shadow type="math_number"> | |
<field name="NUM">2</field> | |
</shadow> | |
<block type="math_arithmetic" id="f@4Ll$gi7!gXu3n+4Yb/"> | |
<field name="OP">MULTIPLY</field> | |
<value name="A"> | |
<shadow type="math_number"> | |
<field name="NUM">1</field> | |
</shadow> | |
<block type="gamepad_getProperty_Number" id="hrJ$V,#;F,KT^3`Cni!i"> | |
<field name="IDENTIFIER">gamepad1</field> | |
<field name="PROP">RightStickY</field> | |
<data>{"IDENTIFIER":"gamepad1"}</data> | |
</block> | |
</value> | |
<value name="B"> | |
<shadow type="math_number" id="lw?jJqE4f!}3HIFZ2VVS"> | |
<field name="NUM">-2</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="$t43=OfDqN$6jo,L+nnQ"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
<value name="VALUE"> | |
<block type="math_constrain" id="*)2*9npPDYX+MA?R`6M1"> | |
<value name="VALUE"> | |
<shadow type="math_number"> | |
<field name="NUM">50</field> | |
</shadow> | |
<block type="variables_get" id="?~Hn`^Av:ln-*skYf_l;"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
</block> | |
</value> | |
<value name="LOW"> | |
<shadow type="math_number"> | |
<field name="NUM">1</field> | |
</shadow> | |
<block type="variables_get" id="wFrGWeZJHyOp3Y$m$-XF"> | |
<field name="VAR" id="aUe.oa!*S^m@RJWfjO!X">minGain</field> | |
</block> | |
</value> | |
<value name="HIGH"> | |
<shadow type="math_number"> | |
<field name="NUM">100</field> | |
</shadow> | |
<block type="variables_get" id="q6SxCl*z:xsa8f$wUJ-C"> | |
<field name="VAR" id="YvlvTQ@0/mh_dUUW{(a;">maxGain</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="fF%xPzU)4EWmt);,6QsT"> | |
<field name="COMMENT">Enable ONE of the next two Blocks.</field> | |
<next> | |
<block type="gainControl_setGain" id="+5791~wTsyV#UBnl:fBP"> | |
<mutation has_output="false"/> | |
<comment pinned="false" h="150" w="325">Set the gain. Requires Exposure Control Mode to be MANUAL.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="xHa#uA`Iz@?CeG7)B;il"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
<value name="GAIN"> | |
<shadow type="math_number" id="TNTxL=K-my]{~BMIXf9U"> | |
<field name="NUM">25</field> | |
</shadow> | |
<block type="variables_get" id="c0XRhMqzo]x@(RmXqdfM"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id=")#pad?dcm_M^Qvd@H,/S" disabled="true"> | |
<field name="VAR" id="B2#938q-r59OnX0GL2vb">setGainBoolean</field> | |
<value name="VALUE"> | |
<block type="gainControl_setGain" id="`UWiR6bns/nBF/4!Rf%!"> | |
<mutation has_output="true"/> | |
<comment pinned="false" h="150" w="325">Set the gain. Requires Exposure Control Mode to be MANUAL.</comment> | |
<data>{"commentPositionLeft":-81,"commentPositionTop":-175}</data> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="NTqXK:|xM[AF|h;1jfXl"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
<value name="GAIN"> | |
<shadow type="math_number"> | |
<field name="NUM">25</field> | |
</shadow> | |
<block type="variables_get" id="#i$|r*9Zg`huG-T{KSUb"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="vfYy`ej%l(M{`HA79t?r"> | |
<value name="TEXT"> | |
<shadow type="text" id="SIoJikcSuz]vK(tV]d_z"> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="Ne{!A/RB`45Td;LNpv5v"> | |
<value name="KEY"> | |
<shadow type="text" id="8rlj$976.a[bO*wAn9,7"> | |
<field name="TEXT">setGainBoolean, if used</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="variables_get" id="B%J)L9/vDjjs@(i9vbyn"> | |
<field name="VAR" id="B2#938q-r59OnX0GL2vb">setGainBoolean</field> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="Ole~4g{Q=i5o_MLV6xk]"> | |
<value name="KEY"> | |
<shadow type="text" id="_n3CH?;2r0C#[E21AQf="> | |
<field name="TEXT">Right Joystick up/down: myGainValue</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="?8JDYO[}~FQ~l#%UI]0/"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="?z2_t_D8rX$FVlW.lkrV"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="variables_get" id="dkUVtp2;bOdM]dhJCT4*"> | |
<field name="VAR" id="3_c70R~v%rN0,CI.DkqB">myGainValue</field> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="14w]d#4q8RZP(AG!!)Ga"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="ekIM!f%@mB7W+{nHN4;["> | |
<value name="KEY"> | |
<shadow type="text" id="kt|.#jFsG(/Ee+C=#Do8"> | |
<field name="TEXT">actual Gain value from webcam</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="BymJ*WN7_H`jKPae$[sy"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="AFrm%GfDMerVI6eu(GYQ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="gainControl_getGain" id="Ww^q.LmAhz]E}v?PTYL4"> | |
<field name="FUNC">getGain</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) gain.</comment> | |
<value name="GAIN_CONTROL"> | |
<block type="variables_get" id="YX]b}DF(vHvSt!GxEmmp"> | |
<field name="VAR" id="ZVg[+e:.))r//_%M^Nz-">myGainControl</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="?BT0nl6+AQK,p?YjZdCe"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="6(R9{]~cvOn[(#xb8M6P" x="510" y="436"> | |
<field name="NAME">set Exposure</field> | |
<comment pinned="false" h="80" w="160">Describe this function...</comment> | |
<statement name="STACK"> | |
<block type="comment" id="@{Y#t`sftT}0]FF11w@g"> | |
<field name="COMMENT">Adjust Exposure with Left Joystick up and down.</field> | |
<next> | |
<block type="math_change" id="=EfWUUz(T#YV5zQF[@xd"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
<value name="DELTA"> | |
<shadow type="math_number" id="[bAY*OWXjPmG%?!TQ+{]"> | |
<field name="NUM">2</field> | |
</shadow> | |
<block type="math_arithmetic" id="-.S$o$;95i4alhDXNnn{"> | |
<field name="OP">MULTIPLY</field> | |
<value name="A"> | |
<shadow type="math_number" id="_W0PS#wk4Gj2}D2_PRII"> | |
<field name="NUM">1</field> | |
</shadow> | |
<block type="gamepad_getProperty_Number" id="GIXrc,}rzwhRU+1k5uj]"> | |
<field name="IDENTIFIER">gamepad1</field> | |
<field name="PROP">LeftStickY</field> | |
<data>{"IDENTIFIER":"gamepad1"}</data> | |
</block> | |
</value> | |
<value name="B"> | |
<shadow type="math_number" id="F7w?)]tWYlo+D6+%f#XW"> | |
<field name="NUM">-2</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="variables_set" id="N*xOW=cYtxm{9tKdb+fi"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
<value name="VALUE"> | |
<block type="math_constrain" id="Ue{!*1dV#E{78J(EKbqJ"> | |
<value name="VALUE"> | |
<shadow type="math_number" id="0Yk2X821UH.hoYW-=w+}"> | |
<field name="NUM">50</field> | |
</shadow> | |
<block type="variables_get" id="tH2CNP+M)k.?kX:IaUAy"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
</block> | |
</value> | |
<value name="LOW"> | |
<shadow type="math_number" id="4tauSa5%#VKF3l4|wC|t"> | |
<field name="NUM">1</field> | |
</shadow> | |
<block type="variables_get" id="xlKSrkC*um(SG+8+|}!;"> | |
<field name="VAR" id="TH^`wXe*;d{FEY#vBAtF">minExposure</field> | |
</block> | |
</value> | |
<value name="HIGH"> | |
<shadow type="math_number" id="XXPz=s`Qn%0~GJ_p|_iq"> | |
<field name="NUM">100</field> | |
</shadow> | |
<block type="variables_get" id="#-8g8m:Mg-l(D4c*L%NI"> | |
<field name="VAR" id="cf*^ww67t7IG$zoNx7I@">maxExposure</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="{fQQ:cb|*/F[#,)/[WLS"> | |
<field name="COMMENT">Enable ONE of the next two Blocks.</field> | |
<next> | |
<block type="exposureControl_setExposure" id="kz--I?G3`.7$P4NWFRs5"> | |
<mutation has_output="false"/> | |
<comment pinned="false" h="150" w="325">Set the exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="ZCQm,|bT_tQ|wJC=JInj"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="DURATION"> | |
<shadow type="math_number" id=")pXBxWM}i_A`YVZ[fJTY"> | |
<field name="NUM">30</field> | |
</shadow> | |
<block type="variables_get" id="^vIbhj3+A-d^Beh2{tmg"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="^XLyl-,Z}^vu#@b6#)U4"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="variables_set" id="WezcDHjYxcdg6am!su6w" disabled="true"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setExposureBoolean</field> | |
<value name="VALUE"> | |
<block type="exposureControl_setExposure" id="C9o@KFd}^;9#77nPUvza"> | |
<mutation has_output="true"/> | |
<comment pinned="false" h="150" w="325">Set the exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="q0gp]P[rm`)wN[oEB!*W"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="DURATION"> | |
<shadow type="math_number"> | |
<field name="NUM">30</field> | |
</shadow> | |
<block type="variables_get" id="g~8_Vm5f0{?2j%M*9{r1"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="@#N^`T`n}SQW8UyrEv~3"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="F4|d.o.-Uy[8xm.VHb;s"> | |
<value name="KEY"> | |
<shadow type="text" id="CEFUZ3[,]6SgqC-Pt32^"> | |
<field name="TEXT">setModeBoolean, if used</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="variables_get" id="0=mNsoqGbaLY7a+3./3)"> | |
<field name="VAR" id="d3c/kq?LHN~m;PA@fr-t">setModeBoolean</field> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="r}aJJeUB/EAVd*d[gJgl"> | |
<value name="KEY"> | |
<shadow type="text" id="$GySn4JP-Tc0)@^Saqj;"> | |
<field name="TEXT">setExposureBoolean, if used</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="T}@S|=^/5F7yDq11MIqT"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="variables_get" id="^#%8`w72kETF}L{S*6F~"> | |
<field name="VAR" id="!;}U%XlE[1kRUxXb?;0=">setExposureBoolean</field> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="]8-OP?gW_H8m-p|B-M}D"> | |
<value name="KEY"> | |
<shadow type="text" id="|P9B$Cue2pab44c2+C4X"> | |
<field name="TEXT">Left Joystick up/down: myExposureValue</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="-DqAtNcsXD*?)9#D/3_7"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="Z2mPXRy*{{`Z(n@#yJRS"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="variables_get" id="qrLF(kRV/Y@PZwx$]/3W"> | |
<field name="VAR" id="?$5B~Px*.0/^b(+=;!)C">myExposureValue</field> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id=",Ft~apl]@?/6P.|EQema"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="nnq#--K6Punrm`*q+;e|"> | |
<value name="KEY"> | |
<shadow type="text" id="[,[80LKZM)g?S}}578nC"> | |
<field name="TEXT">actual exposure value from webcam</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<block type="misc_formatNumber" id="Oycch?s|qu(-1f8Txi{L"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="I`FNplAC4qP3~;U,f7oJ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="exposureControl_getExposure" id="~GGHsY2Gb`@fq@9J$r)j"> | |
<field name="FUNC">getExposure</field> | |
<comment pinned="false" h="150" w="325">Return the current (or minimum or maximum) exposure.</comment> | |
<value name="EXPOSURE_CONTROL"> | |
<block type="variables_get" id="EtQn:s:1iEM;5Ib*f3f4"> | |
<field name="VAR" id="puLG)dm!G_PW2D_0fg4N">myExposureControl</field> | |
</block> | |
</value> | |
<value name="TIME_UNIT"> | |
<shadow type="misc_typedEnum_TimeUnit" id="g^Tw}D$cG;F1xGG?l_iC"> | |
<field name="TIME_UNIT">MILLISECONDS</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="|cY]*/Mc,P+AMr?[C]GF"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id=":Un!nS!LS%^tq]:g4^?Z" x="-208" y="738"> | |
<field name="NAME">initAprilTag</field> | |
<comment pinned="false" h="80" w="160">Initialize AprilTag Detection.</comment> | |
<statement name="STACK"> | |
<block type="comment" id="Z#tr,B$;l$RV0)j4q0n."> | |
<field name="COMMENT">First, create an AprilTagProcessor.Builder.</field> | |
<next> | |
<block type="aprilTagProcessorBuilder_create_assign" id="]gR@^J/H_v)OY6f[`3z5"> | |
<field name="APRIL_TAG_PROCESSOR_BUILDER" id="NYqOu)Ei(Q{C!f;y!a^O" variabletype="AprilTagProcessor.Builder">myAprilTagProcessorBuilder</field> | |
<next> | |
<block type="comment" id="-dkxGvL2:a(h8n8Mok-i"> | |
<field name="COMMENT">Create an AprilTagProcessor by calling build.</field> | |
<next> | |
<block type="variables_set" id="$.wt,WCD1s5fSqROQT*("> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
<value name="VALUE"> | |
<block type="aprilTagProcessorBuilder_build" id="3Vk~@]VGDELD;GHGgEgn"> | |
<field name="APRIL_TAG_PROCESSOR_BUILDER" id="NYqOu)Ei(Q{C!f;y!a^O" variabletype="AprilTagProcessor.Builder">myAprilTagProcessorBuilder</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="w{nzs#L5ZbP.GKW2S`x_"> | |
<field name="COMMENT">Next, create a VisionPortal.Builder and set attributes related to the camera.</field> | |
<next> | |
<block type="visionPortalBuilder_create_assign" id="s1^/ZS*LG[dC%CsYcl=%"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<next> | |
<block type="controls_if" id="T`t))DI)e(S6b*Xls7U="> | |
<mutation else="1"/> | |
<value name="IF0"> | |
<block type="variables_get" id="Zr+H]wQb_aiB|J+{-0:G"> | |
<field name="VAR" id="3.)/eLHm(iRl1^Qsq;Hb">USE_WEBCAM</field> | |
</block> | |
</value> | |
<statement name="DO0"> | |
<block type="visionPortalBuilder_setCamera" id="h;`Yd}]R=F.Fw89p`1N/"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<comment pinned="false" h="68" w="247">Use a webcam.</comment> | |
<value name="CAMERA"> | |
<shadow type="navigation_webcamName" id="b`AjugjMrzm855@U*q;W"> | |
<field name="WEBCAM_NAME">Webcam 1</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<statement name="ELSE"> | |
<block type="visionPortalBuilder_setCamera" id="pm=N,.9EB)-Y)[HJlB;-"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<comment pinned="false" h="56" w="298">Use the device's back camera.</comment> | |
<value name="CAMERA"> | |
<shadow type="navigation_typedEnum_builtinCameraDirection" id="8u8O_}55dptgjBxmKq`9"> | |
<field name="CAMERA_DIRECTION">BACK</field> | |
</shadow> | |
</value> | |
</block> | |
</statement> | |
<next> | |
<block type="comment" id="-QJd~|I/HUP84GR.F=0N"> | |
<field name="COMMENT">Add myAprilTagProcessor to the VisionPortal.Builder.</field> | |
<next> | |
<block type="visionPortalBuilder_addProcessor" id="`A$k?7nl@kd=7y*v@/+-"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
<value name="VISION_PROCESSOR"> | |
<block type="variables_get" id="HoXmAtlB7{ai0YF!ZyTl"> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
</block> | |
</value> | |
<next> | |
<block type="comment" id="6Q2EYFS^A(u/rVLX*nI}"> | |
<field name="COMMENT">Create a VisionPortal by calling build.</field> | |
<next> | |
<block type="variables_set" id="UggZXj@UuhBf97)(oA;m"> | |
<field name="VAR" id="Xk!_{IPng0#/P|7dx?3N">myVisionPortal</field> | |
<value name="VALUE"> | |
<block type="visionPortalBuilder_build" id="OBOV:tKH!^AaYsI{A$~x"> | |
<field name="VISION_PORTAL_BUILDER" id="wx@xgbnS_]b0DQL.08Qg" variabletype="VisionPortal.Builder">myVisionPortalBuilder</field> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
<block type="procedures_defnoreturn" id="Eg%7GTPuhcoA]FCw9:]O" collapsed="true" x="-208" y="1226"> | |
<field name="NAME">telemetryAprilTag</field> | |
<comment pinned="false" h="80" w="160">Display info (using telemetry) for a recognized AprilTag.</comment> | |
<statement name="STACK"> | |
<block type="variables_set" id="c8~R@@~J_)0dhTTP,GP@"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
<comment pinned="false" h="80" w="160">Get a list of AprilTag detections.</comment> | |
<value name="VALUE"> | |
<block type="aprilTagProcessor_getLatestDetections" id="^Sth`xX=n79Q8`P*Z#qt"> | |
<value name="APRIL_TAG_PROCESSOR"> | |
<block type="variables_get" id="Icn).;@XjTI7SR.j$UY#"> | |
<field name="VAR" id="?.?jAjDXaP~!^(jq/Ls_">myAprilTagProcessor</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="tpt|};%V*Y/Jp7xaWt9)"> | |
<value name="TEXT"> | |
<shadow type="text" id="HJ/qb!~X%(aOG]no+FQ5"> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addTextData_All" id="3m5}jTks8BeMJ]|.h*Kp"> | |
<value name="KEY"> | |
<shadow type="text" id="MNA3Pe{~9.uc1dSMmO=j"> | |
<field name="TEXT"># AprilTags Detected</field> | |
</shadow> | |
</value> | |
<value name="TEXT"> | |
<shadow type="text" id="DRWu-r*O-0eJ4pG2n$_l"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="lists_length" id="q{bEB[P*p2XiVOMj*ku#"> | |
<value name="VALUE"> | |
<block type="variables_get" id="/5v#48C2W5M+l:4)g!zX"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="controls_forEach" id="|@Y$y8D~],V(MRQ+Cyv{"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
<comment pinned="false" h="81" w="199">Iterate through list and call a function to display info for each recognized AprilTag.</comment> | |
<value name="LIST"> | |
<block type="variables_get" id="W,d1s!eFWeDT0X}~eq,n"> | |
<field name="VAR" id="l)/,LjA`jR!1Nc@Z:`l!">myAprilTagDetections</field> | |
</block> | |
</value> | |
<statement name="DO"> | |
<block type="comment" id="U@Dkpel-LMa.00jJsqA-"> | |
<field name="COMMENT">Display info about the detection.</field> | |
<next> | |
<block type="telemetry_addLine" id="qrKb?#/HMYJo.RhU8rW:"> | |
<value name="TEXT"> | |
<shadow type="text" id="3^Lv-r.jG6}7LV;(yIh."> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="controls_if" id="1KHSCf_sX!Qd~BKfG}QD"> | |
<mutation else="1"/> | |
<value name="IF0"> | |
<block type="aprilTagDetection_getProperty_IsNotNull" id=":^$lP:Ut!p3Z)E+vy^]D"> | |
<field name="PROP">metadata</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="9Lq*6VTlT$7uDRiB|mYe"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<statement name="DO0"> | |
<block type="telemetry_addLine" id="awB~K!HjEb=h6tM,%vLN"> | |
<value name="TEXT"> | |
<shadow type="text" id="?hM/$PX}4MN:|W`joKgn"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="0C_x2#T#t7yl!%45k{$?"> | |
<mutation items="4"/> | |
<value name="ADD0"> | |
<block type="text" id="buEo7p[-2T4:49=`uwK1"> | |
<field name="TEXT">==== (ID </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="aprilTagDetection_getProperty_Number" id="lifbVBMNn+.1j?y6v54X"> | |
<field name="PROP">id</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="w(63KWmGiZ83+qITBep;"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="=n-]].djPxb,OFyxcOQF"> | |
<field name="TEXT">) </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="aprilTagDetection_getProperty_String" id="=AvXMAjUic3u3lbFtEt4"> | |
<field name="PROP">metadata.name</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="zKHYs.Y87Qrl9%G~Oq^V"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id=";grqK`+-g7;g50c=|L0l"> | |
<value name="TEXT"> | |
<shadow type="text" id="!y]i-sUsabeyV/)u=6D5"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="4TtGi;Z(gbFaks}Eap^9"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="+]Cns+.i=%b0bFaT6;NI"> | |
<field name="TEXT">XYZ </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="df*#gw3iYx$kvL$9{Y?m"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="g`p?z|x@JeU%MJ4.tSFQ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="jUN`u.6t[:O8`9Ncql]!"> | |
<field name="PROP">ftcPose.x</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="mb(6}~t}KLoi4`XT~d:H"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="k*}!VVn#l8HSq7E2i?#R"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="mh4H+`GE$Em,(iS4ZjPR"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="y34}1aACqw@S]sESt=A#"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="4Oj?ZaC$d#_1X}?b[T.|"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="2cGf/q9c-ZnJ}LB6C1i$"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="^ZxENE!MDi;z:vW0d@XL"> | |
<field name="PROP">ftcPose.y</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="bYyr?K,sa#Z.])=_ot.X"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="BQJxM*kkA=P:cx1$gjDj"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="$REh~]PUb9LYTO;OfzqZ"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="D7A3=:fGOVPSdci(UQtX"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id="FCZL%yFs6[0x{rm0ps54"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="|j[Xf6X[,{Y~6k#Ow9ay"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="@o/Xx/]f-CWGv|Tr)2Nk"> | |
<field name="PROP">ftcPose.z</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="[9!-4|yF{X2|/{iSu:SC"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="ga,Viu`_|ozkv#5q3*@0"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="(E3-dHVlUbl(~6A~LN[p"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id=")9nfo^3]N$S,m~5}*3*="> | |
<field name="TEXT"> (inch)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="6W%[*9{;}.5Jl{VBB=*t"> | |
<value name="TEXT"> | |
<shadow type="text" id=";t?`r+|~SzTLUUHO=;M9"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="$$x)e|XJcO*g[Y8~M2/Q"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="CNSpY2iH=tR#]P,pi4u."> | |
<field name="TEXT">PRY </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="sht8%%Nn`h2}jwZ`-{x)"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="?pMQrP+klggGPQ})NZWJ"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="Iy|1o|tQ9/Xq~XhaEN$_"> | |
<field name="PROP">ftcPose.yaw</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="rVJim4c8+/ys[,t:o!0a"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="mHP*I^3G3|9rAiui`;?f"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="VxWPF,FgQz,lDodmj[WR"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="]dbZO?6z_PP)Na=ij|hW"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="!i;Ow5b5|tm]^:f=af8O"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="xsH[9W8/eLks@vlm]1*g"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="ShLjZCVXxN!~/4l*tkIW"> | |
<field name="PROP">ftcPose.pitch</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="OCoPF8gE#WFKctf6vd6f"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="DyJDDqNjyT?RD%Og91T/"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="M?Svc5)[b)Apn186A8Em"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="7-XP1=zX3p(TS(}va$9`"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id=":tQhsy?3wU|KpZT;GEux"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="v%b/#{Uh]xNL*jCpZAlp"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="rr^=wlJCB2_afebAXJ}Z"> | |
<field name="PROP">ftcPose.roll</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="vBZ8!}wPWKb}V3-g]Wle"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="mu5y,^`sp#UgVsrfnkbc"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="1a@0e%XGstoBjtg)K@p]"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id="I*Wn1Gf}j+e`]CP5J0Cp"> | |
<field name="TEXT"> (deg)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="p~aY/Ief^l:6#%yF5mBb"> | |
<value name="TEXT"> | |
<shadow type="text" id="[:Q^{:f(MSqR]$h@YO_G"> | |
<field name="TEXT">text</field> | |
</shadow> | |
<block type="text_join" id="7AAW16ak[E;pRyJ50_pV"> | |
<mutation items="7"/> | |
<value name="ADD0"> | |
<block type="text" id="_D88fgJh36dZBe#kxQkh"> | |
<field name="TEXT">RBE </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="o=,mI,_W=C-(irqk:S^/"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="67$:0vchTm|ZAu?yf9Zs"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="V_e8w[RX[YJ6%2RfwTK4"> | |
<field name="PROP">ftcPose.range</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="5U:C0C|9gsGJwjwric-u"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="E}T84I!akJTmE1gb#KTc"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="UKUfpg-DJ~rM||Pp1;?~"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="/)!A!j+m`c^.RSzJfnW8"> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="v,Ilg5bR5*;(#^l3B@-0"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="%)S}?+}8]#C5YOJMTtIz"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="}bh%9Kz6)u_zYo7,L]Iq"> | |
<field name="PROP">ftcPose.bearing</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="B6P^H@vWo+vyX@sYn_ik"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="5ti##om.fc`N4y~4C#;|"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="22o;=,7*otM:5h`-4L|A"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="Q|e}m1um|X;(#X^F`wb("> | |
<field name="TEXT"> </field> | |
</block> | |
</value> | |
<value name="ADD5"> | |
<block type="misc_formatNumber_withWidth" id="x-{*.Ghd4zinz}U9X3?V"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id=".MdJRQ6rUBU)RFzD8T%o"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="D(K1+O}E+Y7i_ek8}A?z"> | |
<field name="PROP">ftcPose.elevation</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="sv;lYz!5q^E[A|N14(.X"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="GU73O^@;SXL))%*l[8Me"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="4Nv)-M9MfCY%aAn:1SEF"> | |
<field name="NUM">1</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD6"> | |
<block type="text" id="x`,kpt}.uw,YSWON!D^j"> | |
<field name="TEXT"> (inch, deg, deg)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<statement name="ELSE"> | |
<block type="telemetry_addLine" id=".k7)ZU|.JU[vLM%.9oWH"> | |
<value name="TEXT"> | |
<shadow type="text" id="hqwM9[:8R6P;nJWo`z$@"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="Q$XL59m.y(HLLD=Lb6bM"> | |
<mutation items="3"/> | |
<value name="ADD0"> | |
<block type="text" id="GO{s|1|cjZX5wm!s}6^U"> | |
<field name="TEXT">==== (ID </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="aprilTagDetection_getProperty_Number" id="YbKMT]1!N/1orH}f.`^%"> | |
<field name="PROP">id</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="*DZMa]u.xVDWo54-+9Xp"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="Ej2sUV*ZReT^:zwt~{Ar"> | |
<field name="TEXT">) Unknown</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="*wewMc^H[$Rs0;EK}Ow]"> | |
<value name="TEXT"> | |
<shadow type="text" id="2oq;P##KvH:(,WjrIe3!"> | |
<field name="TEXT"/> | |
</shadow> | |
<block type="text_join" id="DS^4mx0$o}XW[*EAx9g+"> | |
<mutation items="5"/> | |
<value name="ADD0"> | |
<block type="text" id="~aS!V+hMdY{-*4G3Ow%3"> | |
<field name="TEXT">Center </field> | |
</block> | |
</value> | |
<value name="ADD1"> | |
<block type="misc_formatNumber_withWidth" id="NWWJ-BvdUXyMBZ|RD`m}"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="WWZ1rIy[E-^rf4i5ES.w"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="Kns6PW?m}A;SO?@NVb#)"> | |
<field name="PROP">center.x</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="Ar)`$(G]w1~mg?c!0{v;"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="ZZ080[{./+Y}t=(P1DCR"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="sPPkrRLvHyLpl?+E}RhL"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD2"> | |
<block type="text" id="QO=g./qsEJDCSmKz*Wpu"> | |
<field name="TEXT"/> | |
</block> | |
</value> | |
<value name="ADD3"> | |
<block type="misc_formatNumber_withWidth" id="IGswFrO!Q%aCF}3x,SPE"> | |
<value name="NUMBER"> | |
<shadow type="math_number" id="iQ6P;:;Igrei}.mq2:.{"> | |
<field name="NUM">3.14159265</field> | |
</shadow> | |
<block type="aprilTagDetection_getProperty_Number" id="P2eT2TYX6nNBSYz7e^E)"> | |
<field name="PROP">center.y</field> | |
<value name="APRIL_TAG_DETECTION"> | |
<block type="variables_get" id="ZmOVtYIkx|@b66VSAfd]"> | |
<field name="VAR" id="vP~n9zf$lW%hYD/C.j_-">myAprilTagDetection</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
<value name="WIDTH"> | |
<shadow type="math_number" id="MQkYmiA}ms4pA[Ifr2gb"> | |
<field name="NUM">6</field> | |
</shadow> | |
</value> | |
<value name="PRECISION"> | |
<shadow type="math_number" id="*L=(!sY,[nz~xV=Ke@]u"> | |
<field name="NUM">0</field> | |
</shadow> | |
</value> | |
</block> | |
</value> | |
<value name="ADD4"> | |
<block type="text" id="RlN,el}fA6Th3SjoD@!G"> | |
<field name="TEXT"> (pixels)</field> | |
</block> | |
</value> | |
</block> | |
</value> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
<next> | |
<block type="telemetry_addLine" id="3N{F`jhy%rx/{Xex;5zu"> | |
<value name="TEXT"> | |
<shadow type="text" id="ds{Hr}!u1tUZ{*]D~==j"> | |
<field name="TEXT"/> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="[:W.s1Ok!]MP)3.3IU{#"> | |
<value name="TEXT"> | |
<shadow type="text" id="Pzz,~#oj]g6(p8-kE+HJ"> | |
<field name="TEXT">key:</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="(z3|~vT*DZX[fOyQ2%S["> | |
<value name="TEXT"> | |
<shadow type="text" id="M=~-,X%t3PZW:?]x+FCV"> | |
<field name="TEXT">XYZ = X (Right), Y (Forward), Z (Up) dist.</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="M,AbdMv6W{1dFQc)zQt~"> | |
<value name="TEXT"> | |
<shadow type="text" id="`KTr5c!E2VUU.9*_77qL"> | |
<field name="TEXT">PRY = Pitch, Roll & Yaw (XYZ Rotation)</field> | |
</shadow> | |
</value> | |
<next> | |
<block type="telemetry_addLine" id="uuC6(PL0R.pO7.AFo]db"> | |
<value name="TEXT"> | |
<shadow type="text" id="^GlP*DEB!=^Mvq=zsRKv"> | |
<field name="TEXT">RBE = Range, Bearing & Elevation</field> | |
</shadow> | |
</value> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</next> | |
</block> | |
</statement> | |
</block> | |
</xml> | |
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<Extra> | |
<OpModeMeta flavor="TELEOP" group="" autoTransition="" /> | |
<Enabled value="true" /> | |
</Extra> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment