function [mov] = visualizeRobots(f,n,Xs,Ys,Thetas,idx,color,makeMovie,mov,winsize)

clf;
axis([-10 10 -10 10])
axis manual
set( gca,'nextplot','add' );
for j = 1:n
    h = plot_arrow( Xs(j,idx),Ys(j,idx),Xs(j,idx)+cos(Thetas(j,idx)),Ys(j,idx)+sin(Thetas(j,idx)),...
        'color',color(j,:),'facecolor',color(j,:),'edgecolor',color(j,:) );
    set( h,'linewidth',2 );
end
hold off;

if makeMovie == true
    if idx < 3 %so we don't see giant arrows
        clf
    end
    mov(:,idx) = getframe(f,winsize);
else
    mov = [];
end

end