function waitFinalization(H, scuid)

fim = 1;
while(fim)
    aux = 1;
    for scu=1:length(scuid),
        [servos,state,rx,error,errorstr]=readjoint(H,scuid(scu),0);
        aux = aux & state(4);
    end
    fim = ~(fim & aux);
end
