how achieve the constant pose kuka end effector after grasp
Posted: 13 Nov 2014, 09:39
hi,
i am working on kuka lWR robotic arm. i am controlling kuka robotic arm with remote Api matlab. my problem is how to achieve the constant pose of end effector after grasping the cup etc. here is my some matlab code, i use robotic tool box to calculate inverse kinematic and send to kuka vrep model, joint1 to joint7 is vrep handle
L1 = Link( 'a',0, 'alpha', 90,'d',0);
L2 = Link( 'a',0, 'alpha', -90,'d',0);
L3 = Link( 'a',0, 'alpha', -90,'d',0.4);
L4 = Link( 'a',0, 'alpha', 90,'d',0);
L5 = Link( 'a',0, 'alpha', 90,'d',0.4);
L6 = Link( 'a',0, 'alpha', -90,'d',0);
L7 = Link('a',0, 'alpha', 0,'d',0);
bot = SerialLink([L1 L2 L3 L4 L5 L6 L7], 'name', 'LBR4');
T1=bot.fkine([0 0 0 0 0 0 0])
T2=bot.fkine([0 -pi/2 0 0 0 0 0])
T3=bot.fkine([0 -pi/2 0 0 0 0 0])
T4=bot.fkine([pi/3 pi/4 0 0 pi/6 0 0])
t = [0:0.2:6]';
Traj1 = ctraj(T1, T2, length(t))
Traj2 = ctraj(T3, T4, length(t))
q1=bot.ikine(Traj1,'pinv')
function button_VrepJointPosition(source, eventdata,vrep,clientID,joint1,joint2,joint3,joint4,joint5,joint6,joint7,q1,camhandle,frameNumber, pathName,rgbSensor)
for i=1:31
vrep.simxSetJointTargetPosition(clientID,joint1,q1(i:i,1),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint2,q1(i:i,2),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint3,q1(i:i,3),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint4,q1(i:i,4),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint5,q1(i:i,5),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint6,q1(i:i,6),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint7,q1(i:i,7),vrep.simx_opmode_oneshot)
end
end
i am working on kuka lWR robotic arm. i am controlling kuka robotic arm with remote Api matlab. my problem is how to achieve the constant pose of end effector after grasping the cup etc. here is my some matlab code, i use robotic tool box to calculate inverse kinematic and send to kuka vrep model, joint1 to joint7 is vrep handle
L1 = Link( 'a',0, 'alpha', 90,'d',0);
L2 = Link( 'a',0, 'alpha', -90,'d',0);
L3 = Link( 'a',0, 'alpha', -90,'d',0.4);
L4 = Link( 'a',0, 'alpha', 90,'d',0);
L5 = Link( 'a',0, 'alpha', 90,'d',0.4);
L6 = Link( 'a',0, 'alpha', -90,'d',0);
L7 = Link('a',0, 'alpha', 0,'d',0);
bot = SerialLink([L1 L2 L3 L4 L5 L6 L7], 'name', 'LBR4');
T1=bot.fkine([0 0 0 0 0 0 0])
T2=bot.fkine([0 -pi/2 0 0 0 0 0])
T3=bot.fkine([0 -pi/2 0 0 0 0 0])
T4=bot.fkine([pi/3 pi/4 0 0 pi/6 0 0])
t = [0:0.2:6]';
Traj1 = ctraj(T1, T2, length(t))
Traj2 = ctraj(T3, T4, length(t))
q1=bot.ikine(Traj1,'pinv')
function button_VrepJointPosition(source, eventdata,vrep,clientID,joint1,joint2,joint3,joint4,joint5,joint6,joint7,q1,camhandle,frameNumber, pathName,rgbSensor)
for i=1:31
vrep.simxSetJointTargetPosition(clientID,joint1,q1(i:i,1),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint2,q1(i:i,2),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint3,q1(i:i,3),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint4,q1(i:i,4),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint5,q1(i:i,5),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint6,q1(i:i,6),vrep.simx_opmode_oneshot)
vrep.simxSetJointTargetPosition(clientID,joint7,q1(i:i,7),vrep.simx_opmode_oneshot)
end
end