You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: setupDaisyController.m
    path of file: ./repos/hebi-matlab-examples/kits/daisy
    
    the code of the file until where you have to start completion: function [ controllerGroup ] = setupDaisyController( robotName, controllerName )
%SETUPCONTROLLER Set up a group that contains a single mobile device for
%controlling the Daisy hexapod robot.

    % Group for the iPad / Mobile Device that's used for the controller.
    % This gets done continuously in a loops since it is likely that the

    
function [ controllerGroup ] = setupDaisyController( robotName, controllerName )
%SETUPCONTROLLER Set up a group that contains a single mobile device for
%controlling the Daisy hexapod robot.

    % Group for the iPad / Mobile Device that's used for the controller.
    % This gets done continuously in a loops since it is likely that the
    % app is closed or the device is off the network when starting the
    % script.
    if nargin>1 && ~isempty(controllerName)
        fprintf('Connecting to controller...');
        retryDelayTime = 2.0;
        while true
            try
                controllerGroup = ...
                    HebiLookup.newGroupFromNames( robotName, controllerName );
                fprintf('DONE.\n');
                break;
            catch
                disp(['  Did not find controller: ' robotName '|' controllerName]);
                pause( retryDelayTime );
            end