function AnimateRobot(H,AAA,Obj,hmanip,delay)
hold on
for n=1:size(AAA,4);
    %3º -> numero do elo
    %4º -> numero do incremento...
    org = LinkOrigins(AAA(:,:,:,n));
if (hmanip~=0)
    set(hmanip,'XData',org(1,:),'YData',org(2,:),'ZData',org(3,:));
end


    A=eye(4);

    for j=1:size(AAA,3)
        A=A*AAA(:,:,j,n);
        P=A*Obj;
        X=P(1,:); Y=P(2,:); Z=P(3,:);
        set(H(j), 'XData', X,'YData',Y,'ZData',Z);
        
    end
    
     plot3(A(1,4),A(2,4),A(3,4),'r.'); 
    
     pause(delay)
end
end