7.3 Making an iteration using HARK-Designer


I want a process to be performed a fixed number of repetition like in a “for loop.”


This can be done by using the Iterator  subnetwork and Iterator  node.

For example, if the localization result of ConstantLocalization is to be passed to DisplayLocalization 500 times, the network should be created as shown in Fig.7.1. Note that the Iterator  node is at New Node $\rightarrow $ Flow $\rightarrow $ Iterator .

\includegraphics{fig/recipes/FlowDesigner_003-2} \includegraphics{fig/recipes/FlowDesigner_003}
Figure 7.1: Sample network: The left panel is the MAIN  subnetwork, and the right panel is the Iterator  subnetwork

Execute the network. The network is working properly if the fixed sound source localization result displays the frame number set in the Iterator .


Iterate  The loop count set in the MAX_ITER decrements every repetition. If the value is more than 0, the output is set to true, otherwise, it is set to false.

By setting this output in the CONDITION terminal, the process will only be performed by the number of repetition defined.

See Also