How to trace the movement of robot arm ??????in this code it actually follow a circle trajectory.and i want to trace that movement of arm...

6 views (last 30 days)
mdl_puma560
radius=0.2
n=200;
PA = transl([-0.6, 0, -0.5]);%points out of trajectory
PB = transl([-0.4, 0, -0.5]);%Start point in the path
INI= transl([-0.4, 0.2, -0.5]);%center for circle
%Start generating trajectories
for i=1:n TRAJ(:,:,i)=INI*trotx(-pi/2)*troty(2*pi*i/n)*transl(0, 0, -radius);%For circle trajectory points
end
%Inverse Kinematics of all paths
Q1=p560.ikine6s(TRAJ,'run','b');%inverse kinematics of all points of circle
LA=ctraj(PA,PB,50);%Cartesian trajectory between two poses
QLA=p560.ikine6s(LA,'run');%inverse of points between two poses.
p560.plot(QLA)%plot the movement from base to new point
p560.plot(Q1(1,:))%for end joint
hold on circle1=circle([-0.4 0.2 -0.5],radius);% draw a circle of constant radius 0.2 plot3(circle1(1,:),circle1(2,:),circle1(3,:),'r','lineWidth',1)%draw a path for robot to follow in my case it is circle
p560.plot(Q1)%in this robot will follow the circle trajectory

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!