I'm trying to drive my by using the following code(It is a thread script):
Code: Select all
-- Set-up some of the RML vectors:
vel=20
accel=10
jerk=10
currentVel={0,0,0,0}
currentAccel={0,0,0,0}
maxVel={vel*math.pi/180,vel*math.pi/180,vel*math.pi/180,vel*math.pi/180}
maxAccel={accel*math.pi/180,accel*math.pi/180,accel*math.pi/180,accel*math.pi/180}
maxJerk={jerk*math.pi/180,jerk*math.pi/180,jerk*math.pi/180,jerk*math.pi/180}
targetVel={0,0,0,0}
targetPos1={90*math.pi/180,60*math.pi/180,90*math.pi/180,-90*math.pi/180}
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,targetPos1,targetVel)
targetPos2={-90*math.pi/180,-60*math.pi/180,-90*math.pi/180,90*math.pi/180}
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,targetPos2,targetVel)
targetPos3={0,0,0,0}
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,targetPos3,targetVel)
This is my file "https://1drv.ms/u/s!AmNQPbMfN-sCapGY7IhuumVKyLc"
Thank you very much
Mingzuo