Implement block programming (using Blockly) (#272)

* Clover Blockly: add first blocks set

* Adjust Blockly settings

* Fix get_position output type

* Add screenshot

* Rename readme.md to README.md

* Resize screenshot

* Add package.xml

* Little change

* Fixes

* Add python_compressed to blockly

* Implement some of the Clover blocks in Python

* Make Python indentation 4 spaces

* Fixes to Python blocks implementation

* Implement set_velocity block in Python

* Implement wait_arrival block in Python

* Fix indentation in Python implementation of blocks

* Fix

* Fix land_wait template

* Set reserved words in Python

* Change default frame_id to aruco_map in get_position block

* Fix

* Move blocks definitions to blocks.js

* Get rid of missing favicon error

* Simplify navigate

* Rearrange layout, add tabs

* Generate Python code

* Small style change

* -console.log

* Code style

* Use modules

* Move modules to the header

* Correct order for ROS definitions + generating "backend" code

* Fix rangefinder_distance block

* simple_offboard: commands to change only yaw and yaw rate

* Implement set_yaw block

* Start working on Blockly documentation

* Implement print block with a topic

* Unneeded code

* Little fixes

* Fix indentation

* Fixes

* Fix wait_arival, get_distance

* Implement running Blockly programs, implement prompt block, fixes

* Add land button

* Little change

* Fix reserved words + little fixes

* +x for main.py

* Simplify run button

* Auto-save and load workspace

* Make land button work

* Handle exceptions

* Minor change

* Add help URL for blocks

* Fix

* Implement arrived block

* Mark blockly and highlight.js as linguist-vendored

* Add forgotten CMakeLists.txt

* Add wait checkbox to set_yaw block

* Disable run button when disconnected

* Add message and service files

* Add some comments

* Add tooltip to some blocks

* Implement GPIO blocks

* Don’t latch print message to prevent duplication

* Prevent duplication prompts

* Add ROS init code to backend code anyways

* Make GPIO blocks color a constant

* Minor fix

* More correctly update blocks on input value changes

* Minor fixes

* Remove unneeded readonly attribute

* Add marker ID shadow blocks to toolbox

* Add lacking reserved words

* Fix frame id generation for complex marker id expressions

* Consider frame_id in set_yaw block

* Shorten ros module import

* Implement stop service

* Disable and enable run button correctly

* Don’t print KeyboardInterrupt exceptions

* Put notifications to notifications element

* Add 'running' mark

* Disable signal in backend python code

* Sleep a little bit to let rospy initialize publishers

* Remove accidental code

* Make ROS namespace and private namespace constants

* editorconfig-lint: don’t check Blockly code

* Use private namespace constant in Python generator

* Implement ~running topic to display current program status more robustly

* Make navigate tolerance and sleep time constants

* Make set_leds and and set_effect services proxies persistent

* Replace a number with constant

* Limit ~block topic publishing rate
Otherwise messages get queued making the frontend to freeze

* Improve internal documentation

* Append 'map' to frames list

* Return degrees in get_attitude block

* Move getting yaw in a separate block

* Improve block tooltips

* Add some more files to editorconfig-lint excludes

* Add get_yaw block to toolbox

* Implement get_time block

* Implement ~store and ~load services for storing user programs

* Set auto_arm only in take_off block

* Minor CSS fixes

* Make 'Python' tab textarea-like

* Implement saving and loading programs

* Adjust styles

* Retrieve only .xml files in load service

* Forgotten code

* Documentation on store and load services

* Add some examples

* Add blocks programming arg to launch file

* Update docs

* Add package’s dependencies

* Add dependency

* Add title to select

* Fix syntax

* Minor fix in docs

* Add forgotten roslib.js

* Run user program in the same process

* Use print function for print block in Python 2

* Add variables example

* Fix url

* Add functions example

* Fix set_servo block

* Fix gpio_read block

* Update blocks screenshot

* Update docs

* Update docs

* Fix set_effect block

* Minor fix in example

* Add setpoint block, remove set_velocity from toolbox

* Remove unused modules

* Unused variable

* Add English article skeleton

* Clarify backend node link error

* Remove unused variable

* Update documentation

* Fix link to documentation

* Add Blockly logo

* Update English article

* Add Blocks programming link to the main page

* Minor change

* Add catkin_install_python to CMakeLists.txt

* Make navigate tolerance and sleep time configurable

* Add minor todo

* Add blockly examples directory to editorconfig-lint excludes

* Rename main node to clover_blocks

* Add a warning to the old blocks programming article

* Fix editorconfig-lint exclude
This commit is contained in:
Oleg Kalachev
2020-09-30 17:07:03 +03:00
committed by GitHub
parent c6a238c671
commit 2f6125ce54
79 changed files with 10931 additions and 31 deletions

View File

@@ -0,0 +1,73 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="take_off" id="w4,Hi[}0b.mX68K|hOJv" x="38" y="63">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="q!Ln!d`jutn*3Gy56B0A">
<field name="NUM">1.5</field>
</shadow>
</value>
<next>
<block type="controls_repeat_ext" id="fD/HWb]kb!^pYK{UkM;0">
<value name="TIMES">
<shadow type="math_number" id="%FP0k|kaf~A`0N;M{Oiy">
<field name="NUM">10</field>
</shadow>
</value>
<statement name="DO">
<block type="navigate" id="qM5ROiq4r:$lq}8U_wol">
<field name="FRAME_ID">ARUCO_MAP</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="=MBV;9zGH8S`Xh57/E;C">
<field name="NUM">0</field>
</shadow>
<block type="text_prompt_ext" id="rUDMP2~yFR!7E`Q]pR/i">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="z+Q3vS?)kxHl?HTcuI?(">
<field name="TEXT">Enter X</field>
</shadow>
</value>
</block>
</value>
<value name="Y">
<shadow type="math_number" id="%$`av8A.w}vNqG-]1GOn">
<field name="NUM">0</field>
</shadow>
<block type="text_prompt_ext" id=".AjhH^Rh*i}+14s)K-:g">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="x#)(kg5PB;0uZA5;{(GT">
<field name="TEXT">Enter Y</field>
</shadow>
</value>
</block>
</value>
<value name="Z">
<shadow type="math_number" id="T,]q+-@V;tCYLy$-(o3}">
<field name="NUM">1.5</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="VRo?s#0d)Gl@9fsK@gR=">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="mmZc+d=W})w.AN*B_dSe">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="land" id="JB%yj/X~K=8A2=Q*7cRs">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,64 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="take_off" id="R@=3~Fq;AxFaRO{ZDFUM" x="37" y="63">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="cf8/,N48N;Fvn@EWB%,B">
<field name="NUM">1.5</field>
</shadow>
</value>
<next>
<block type="controls_repeat_ext" id="qc$F96[A^%lj,-l[fhX+">
<value name="TIMES">
<shadow type="math_number" id="v0QgNIpGzMIb`P@8D@}.">
<field name="NUM">3</field>
</shadow>
</value>
<statement name="DO">
<block type="navigate" id="]kCOMt@NSf$9:N1Fx~dE">
<field name="FRAME_ID">ARUCO</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="}(7P5,{6%^::Gzb;kRaf">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="hz#sFvY/;IL5IRLQVa.K">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="n0ULZn64%k.:,l(,D?TZ">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="P4^twyJo6as#G1}^Dlq8">
<field name="NUM">0</field>
</shadow>
<block type="text_prompt_ext" id="ot;{twL$8`H*Wiafz3D,">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="@P[TyPj[n1*;EcUC?lwF">
<field name="TEXT">Enter marker ID</field>
</shadow>
</value>
</block>
</value>
<value name="SPEED">
<shadow type="math_number" id="WrsUXacZ2w)D]d?:@ec_">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="land" id="G5+Fs.6Y4(K9Dw`wjgua">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,97 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="take_off" id="R@=3~Fq;AxFaRO{ZDFUM" x="162" y="63">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="cf8/,N48N;Fvn@EWB%,B">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="set_effect" id="5K8qDD0/@Ab!k+ad6IPj">
<field name="EFFECT">FILL</field>
<value name="COLOR">
<shadow type="colour_picker" id="=*Y*L:1DI7y$.RR$6jNQ">
<field name="COLOUR">#ff0000</field>
</shadow>
</value>
<next>
<block type="navigate" id="kE7TL3+{PI.GiXby~SyO">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="W$eQ*Xv/e(*`e%8--W:P">
<field name="NUM">1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="i~r{%5mpU|}FL|9p!5yG">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="fZ{Cz~^LoWvM#,#;!co_">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="z$Hj|-?4e3zy@Jx$/THh">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="FjRM:aex=:/l_``^zcO]">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="set_effect" id="Q^DQoW/6G$7#YPlXc}%]">
<field name="EFFECT">FILL</field>
<value name="COLOR">
<shadow type="colour_picker" id="mjOY6]=uMY4$r8^n:n|}">
<field name="COLOUR">#3333ff</field>
</shadow>
</value>
<next>
<block type="navigate" id=";|j@sXR{9)9@ran7g[;~">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="TH(htYn}*/a{[::sFQ[x">
<field name="NUM">-1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="h@`=v?y+Tuh,I)wv?+`f">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="pzz:U%?m/~~B$-FF!fD?">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="Ze2Nun;[K{X.1kE0anMF">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="+[A5TSXF:hw4T1M]e~Wu">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="land" id="G5+Fs.6Y4(K9Dw`wjgua">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,184 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="MEu_bi$Xk5e(#Q`Yu=k0">start_x</variable>
<variable id="GtS.)8^|(~RL*T4.~#VV">start_y</variable>
<variable id="jksdQ,]0F47Xan8{_(?+">start_z</variable>
</variables>
<block type="procedures_defnoreturn" id="X0i)DAnNpakX]gr;CC0}" x="588" y="88">
<field name="NAME">memorize position</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="variables_set" id="Ma4s0pE-i`P:(-|?c88v">
<field name="VAR" id="MEu_bi$Xk5e(#Q`Yu=k0">start_x</field>
<value name="VALUE">
<block type="get_position" id="~uz[sPf[(s,15#x]3tAw">
<field name="FIELD">X</field>
<field name="FRAME_ID">MAP</field>
<value name="ID">
<shadow type="math_number" id="V#rB*5s3W^*q75}gScM(">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="variables_set" id="I07,0;W#gn1CNY697O9n">
<field name="VAR" id="GtS.)8^|(~RL*T4.~#VV">start_y</field>
<value name="VALUE">
<block type="get_position" id="z(5A+nNX@tWO[J/X6Hb(">
<field name="FIELD">Y</field>
<field name="FRAME_ID">MAP</field>
<value name="ID">
<shadow type="math_number" id="6dM^zy88YqX`3ch{IH{1">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="variables_set" id="AGgAbxz?+u_2^h;Xo4oc">
<field name="VAR" id="jksdQ,]0F47Xan8{_(?+">start_z</field>
<value name="VALUE">
<block type="get_position" id="k~cMq+jvE^,Ip*kKUmw]">
<field name="FIELD">Z</field>
<field name="FRAME_ID">MAP</field>
<value name="ID">
<shadow type="math_number" id="Q8RU-5,2UG*IfCeZg0cy">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="take_off" id=".0#}q|m$C-GD,.fM/9:/" x="137" y="162">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="H6G+npH8DS90OnBKP;qy">
<field name="NUM">2</field>
</shadow>
</value>
<next>
<block type="procedures_callnoreturn" id="_r_hGwEy6uksz}DtrwxW">
<mutation name="memorize position"></mutation>
<next>
<block type="navigate" id="e{_?bCxQ}za#e~~A2GmJ">
<field name="FRAME_ID">ARUCO_MAP</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="}P]lFX9(He:*{Rvp8[.q">
<field name="NUM">0</field>
</shadow>
<block type="text_prompt_ext" id="L:~.WP`isNJ/TBBP75.{">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="v87(;,:4$T8wgbByRv`z">
<field name="TEXT">Input X</field>
</shadow>
</value>
</block>
</value>
<value name="Y">
<shadow type="math_number" id="eMbKtnF{B^P*p7zRD8SX">
<field name="NUM">0</field>
</shadow>
<block type="text_prompt_ext" id="fp[sLcO^N:q}9k6zYwnN">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="2Bqk0Rm@h*Vef,,:0c!+">
<field name="TEXT">Input Y</field>
</shadow>
</value>
</block>
</value>
<value name="Z">
<shadow type="math_number" id="1sLNKuRa}07Ek(eHK;/S">
<field name="NUM">2</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="guM,}nHUz^a?_H3(b{FW">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id=".EckPx#fD.[:qSk}5/-J">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="text_print" id="d,aouAR0nE80mk6qTAti">
<value name="TEXT">
<shadow type="text" id="Yr%NvOOvCnrBP8}m]bn`">
<field name="TEXT">Point reached. Going back.</field>
</shadow>
</value>
<next>
<block type="procedures_callnoreturn" id="B0o:6T%+wpg{O%s27:bH">
<mutation name="navigate to memorized position"></mutation>
<next>
<block type="land" id="~%g;%HDPtF!lqHY}KO@/">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
<block type="procedures_defnoreturn" id="POzAJb%[yRgBrEn9K*x{" x="587" y="362">
<field name="NAME">navigate to memorized position</field>
<comment pinned="false" h="80" w="160">Describe this function...</comment>
<statement name="STACK">
<block type="navigate" id="VX|`@L*bU=aY`4!l=Pbw">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="c$==spjA=Vin//l1(1V@">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="LxP$oVs*8[{CH4o^RY._">
<field name="VAR" id="MEu_bi$Xk5e(#Q`Yu=k0">start_x</field>
</block>
</value>
<value name="Y">
<shadow type="math_number" id="a)/FEG4j=.584f/:2$?H">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="_-Ib6#usbp0NS}DZ7OGS">
<field name="VAR" id="GtS.)8^|(~RL*T4.~#VV">start_y</field>
</block>
</value>
<value name="Z">
<shadow type="math_number" id="q*MDfPe,V]rfhC1pnltq">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="VY4xW2Y|=*AH3`s2C@)5">
<field name="VAR" id="jksdQ,]0F47Xan8{_(?+">start_z</field>
</block>
</value>
<value name="ID">
<shadow type="math_number" id="OiuYE,a3PqUW.vst+Qc$">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="X2Ou?:=kt:`aOq,#Q-)+">
<field name="NUM">0.5</field>
</shadow>
</value>
</block>
</statement>
</block>
</xml>

View File

@@ -0,0 +1,106 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="_{V-S5HPBUl]CcJkL1Jw">led_count</variable>
</variables>
<block type="variables_set" id="{)^J~:UMX%D;RWvztWLN" x="113" y="87">
<field name="VAR" id="_{V-S5HPBUl]CcJkL1Jw">led_count</field>
<value name="VALUE">
<block type="math_number" id="V_W$3,VFwZjcc|?|1o`l">
<field name="NUM">58</field>
</block>
</value>
<next>
<block type="controls_whileUntil" id="U1it{GcGuSS:=[xiwZr1">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="logic_boolean" id="]7ZDRwde}/RqjQCX}aVW">
<field name="BOOL">TRUE</field>
</block>
</value>
<statement name="DO">
<block type="set_effect" id="WI0zqOz/z3].cR/6UWHn">
<field name="EFFECT">FILL</field>
<value name="COLOR">
<shadow type="colour_picker" id="B`6;Xv{s2TFp8Yd=ZpSD">
<field name="COLOUR">#000000</field>
</shadow>
</value>
<next>
<block type="set_led" id="^Vcs}ki?#ctf7rAchix$">
<value name="INDEX">
<shadow type="math_number" id="U;VWW$[*LOF7Gf,~?YR7">
<field name="NUM">0</field>
</shadow>
<block type="math_arithmetic" id="AI6PZBd`]_Z%_~4c-%dB">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="|p}X]`SedK3).F/;}NlB">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="-haE#:,cg{-J=NZERA;F">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number" id="::st;ot}[r]csqceURu*">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="a%+LN)F~=Igg+,p02[qo">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="*yIGN((y)/^z0:f5:VDw">
<field name="NUM">1</field>
</shadow>
<block type="get_yaw" id="mf%77q30bEqNfc/3`Mtb">
<field name="FRAME_ID">MAP</field>
<value name="ID">
<shadow type="math_number" id="xb32G.N#ip`|^Xv*MOmY">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="T/fTrm;j2Azgav;gI{ZW">
<field name="NUM">180</field>
</shadow>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="Wo1/ZCeir,u6/.e1H+BB">
<field name="NUM">360</field>
</shadow>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="jENTcXz0C5/=)Xpd!}LL">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="Ko,`n=i88FY~`YbQLA?[">
<field name="VAR" id="_{V-S5HPBUl]CcJkL1Jw">led_count</field>
</block>
</value>
</block>
</value>
<value name="COLOR">
<shadow type="colour_picker" id="+vw3bff.5c[=_w,Xm^C(">
<field name="COLOUR">#3366ff</field>
</shadow>
</value>
<next>
<block type="wait" id="DT%f$bn1*1El5zsgUW8Y">
<value name="TIME">
<shadow type="math_number" id="~Y0hNY[_^#v@aZkE-TH[">
<field name="NUM">0.1</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,30 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="controls_whileUntil" id="A:_Z_27?K?HlScug%u|5" x="113" y="113">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="logic_boolean" id="/rlzePJ6XJcv22J(Q4bs">
<field name="BOOL">TRUE</field>
</block>
</value>
<statement name="DO">
<block type="set_effect" id="GT~AX(j]r)u^,f_n0agS">
<field name="EFFECT">WIPE</field>
<value name="COLOR">
<shadow type="colour_picker" id="G`I)ZAuIGcnWNyO@N(sH">
<field name="COLOUR">#ff0000</field>
</shadow>
<block type="colour_random" id="}(${|~%[}eJ.QUY?FWi_"></block>
</value>
<next>
<block type="wait" id="Ux(J;l+?5Gq2n^*!jXj^">
<value name="TIME">
<shadow type="math_number" id=")As9bASkedr9x@M)*)Pf">
<field name="NUM">1</field>
</shadow>
</value>
</block>
</next>
</block>
</statement>
</block>
</xml>

View File

@@ -0,0 +1,88 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="take_off" id="R@=3~Fq;AxFaRO{ZDFUM" x="162" y="112">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="cf8/,N48N;Fvn@EWB%,B">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="navigate" id="[r%uJ2rw#3j.sLSBFf`N">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="5;@1vq|;OnlHl#FFDm/}">
<field name="NUM">1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="Jhe8@=gRxwj0oO*Q1F7V">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="wms+rWijPhnI/K++At;P">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id=".^-h~@m]zg3il)O.9eFy">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="3L3FgAO(:aZp/:V%u=P7">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="set_yaw" id="nE,tYuHO--PmXN:*g@D%">
<field name="FRAME_ID">body</field>
<field name="WAIT">TRUE</field>
<value name="YAW">
<shadow type="angle" id="DoJ$Yj+fVT~cj=E%N:4+">
<field name="ANGLE">180</field>
</shadow>
</value>
<next>
<block type="navigate" id="H6W4@QtAT{_xo0.fO^z4">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="|.KN1m1O$/3=C,WG3sx}">
<field name="NUM">1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="oyc7mxrbA/@[_1wtPER^">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="dh}ac~kErkIIFeIZB,)d">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="q+{la-yiw61v9BSV-y};">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id=";dk@RJGfZ)5w*:m4kp==">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="land" id="53Ssv6^lEHoD?tBO{5Sh">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,86 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="take_off" id="R@=3~Fq;AxFaRO{ZDFUM" x="62" y="88">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="cf8/,N48N;Fvn@EWB%,B">
<field name="NUM">1</field>
</shadow>
<block type="text_prompt_ext" id="#BO!OX5u-GHwsu!KzBT5">
<mutation type="NUMBER"></mutation>
<field name="TYPE">NUMBER</field>
<value name="TEXT">
<shadow type="text" id="unay$W?6.WiDB!|[3GN3">
<field name="TEXT">Enter flight altitude</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="navigate" id="BOHP@mRbJamp}]6/yc,n">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="hzjq`v(`k6vZN],.8%Hf">
<field name="NUM">1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="FIVk1Hm_+CU8XB~t@?S;">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="B{LoNO6}MgJ.JeN+8]tR">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="w!F}PhAG[Gn;5XsIg$XL">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="AjhS9Wf?M`%}A(H_bW9K">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="navigate" id="|Aa[hh]OAUS+b7I?;3VJ">
<field name="FRAME_ID">BODY</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="=n#)78Bd*!iJyzF=dSA*">
<field name="NUM">-1</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="YqC+GQF/[G=li}/s_o)q">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="~xsT!Ug+uMeU5F/Y4;k5">
<field name="NUM">0</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="%WRn|02iTTwCG:zB}dSf">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="A#q.M,b1D*,13Ldp.F2w">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="land" id="_U*W_q1)l+l@#^TC%w)w">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,60 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="text_print" id="2p:*N].+8c=|ZJXCWVn[" x="162" y="88">
<value name="TEXT">
<shadow type="text" id="9H+7z4A.pZ:Zz)7}H3Y7">
<field name="TEXT">Start mission</field>
</shadow>
</value>
<next>
<block type="take_off" id="R@=3~Fq;AxFaRO{ZDFUM">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="cf8/,N48N;Fvn@EWB%,B">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="text_print" id="|Tdajnf]Rz@ajSW`0Skv">
<value name="TEXT">
<shadow type="text" id="Wqr:Hf~r2d.A%S7%%4.)">
<field name="TEXT">Take off complete, wait</field>
</shadow>
</value>
<next>
<block type="wait" id="-]MH9NMT#N-w!5yI1$F)">
<value name="TIME">
<shadow type="math_number" id="?k~ZUNcrx-iC;LFmarbm">
<field name="NUM">3</field>
</shadow>
</value>
<next>
<block type="text_print" id="SXJsfN{P13FL~n9;|%P:">
<value name="TEXT">
<shadow type="text" id="[Z5,f|El:VX5zcRaMtXa">
<field name="TEXT">Land</field>
</shadow>
</value>
<next>
<block type="land" id="G5+Fs.6Y4(K9Dw`wjgua">
<field name="WAIT">TRUE</field>
<next>
<block type="text_print" id="o?bvXARz^4_U0oXC-#.V">
<value name="TEXT">
<shadow type="text" id="`tadiS,[OZ`#f:=u.:9~">
<field name="TEXT">Mission finished</field>
</shadow>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>

View File

@@ -0,0 +1,137 @@
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="]gc9ItU#$!=G*S._3$n~">start_x</variable>
<variable id="D9Oy(29I!!k9+(#zI,4}">start_y</variable>
</variables>
<block type="take_off" id="X]W2Bs=WFxFsco{Yr`bH" x="87" y="88">
<field name="WAIT">TRUE</field>
<value name="ALT">
<shadow type="math_number" id="{7ezr;C@IT-IJ3ylt?];">
<field name="NUM">1.5</field>
</shadow>
</value>
<next>
<block type="variables_set" id="IWR_j|7pUxrIGrxGLP#Z">
<field name="VAR" id="]gc9ItU#$!=G*S._3$n~">start_x</field>
<value name="VALUE">
<block type="get_position" id="ze{FI]Vv*E3kZ1Zw6Bmn">
<field name="FIELD">X</field>
<field name="FRAME_ID">ARUCO_MAP</field>
<value name="ID">
<shadow type="math_number" id="s~^V?k;dKa(($OG9mAK)">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="variables_set" id="s3rE=-6+;f(Lua_uKGY[">
<field name="VAR" id="D9Oy(29I!!k9+(#zI,4}">start_y</field>
<value name="VALUE">
<block type="get_position" id="?t+jp;7Bk#wzoz=DY{sO">
<field name="FIELD">Y</field>
<field name="FRAME_ID">ARUCO_MAP</field>
<value name="ID">
<shadow type="math_number" id="KybjD~@_RFIx=8Dzbz4v">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="text_print" id="|xj}5M(:.~`Vpq-GKi/0">
<value name="TEXT">
<shadow type="text" id="{o^2v+y6L^1#[Y8r_sdW">
<field name="TEXT">Fly to point 0, 0</field>
</shadow>
</value>
<next>
<block type="navigate" id="-8]peWQRtTK$1X0J0w!2">
<field name="FRAME_ID">ARUCO_MAP</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id="PT`K-=?U^uL#BXouoi~G">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_number" id="d_1oBZdx#`_kbWf_Qu$g">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Z">
<shadow type="math_number" id="}Y,E=*pJaG+HOSB*f=aX">
<field name="NUM">1.5</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id=")/%?zNt|6thYwjowvbk/">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="MH}%@OvXa*FK-Vx63RTd">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="text_print" id="IVsd5hFEwp@V?3f02p},">
<value name="TEXT">
<shadow type="text" id="0gcgp`mZ,9oDTS[4vWpT">
<field name="TEXT">Fly to initial point</field>
</shadow>
</value>
<next>
<block type="navigate" id=":;b$YH+6#3h/_$Fa}0w_">
<field name="FRAME_ID">ARUCO_MAP</field>
<field name="WAIT">TRUE</field>
<value name="X">
<shadow type="math_number" id=";GL$bb^Yu;vQrhxy(o:S">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="tsqWR~saO6UU^*iLmDZ(">
<field name="VAR" id="]gc9ItU#$!=G*S._3$n~">start_x</field>
</block>
</value>
<value name="Y">
<shadow type="math_number" id="y5|y58G[s-,qnfB/@Xr%">
<field name="NUM">0</field>
</shadow>
<block type="variables_get" id="Hfzk#prb}M2BbEWIAX3k">
<field name="VAR" id="D9Oy(29I!!k9+(#zI,4}">start_y</field>
</block>
</value>
<value name="Z">
<shadow type="math_number" id="B%NGa`:z=[Kpij2$0p}T">
<field name="NUM">1.5</field>
</shadow>
</value>
<value name="ID">
<shadow type="math_number" id="KaLkf?/NkD_7q@=J1G|I">
<field name="NUM">0</field>
</shadow>
</value>
<value name="SPEED">
<shadow type="math_number" id="Agwx#kYhdE}!dY!St:L1">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="land" id="8y]p?)Zm2}*+;0HP]p1$">
<field name="WAIT">TRUE</field>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>