Joint velocity

Typically: "How do I... ", "How can I... " questions
Post Reply
Bellinsbauer
Posts: 21
Joined: 22 Apr 2018, 07:44

Joint velocity

Post by Bellinsbauer » 31 Aug 2018, 13:47

Good morning.
I am wondering if V rep has a function which retrieves, instead of the joint position values as in sim.checkIkGroup, the joint velocity values, those obtained knowing the inverse of the Jacobian and the velocity of the gripper ( Q°=J^(-1)*S° ).
In my task I'm using sim.rmlPos to follow an object which is moving on a conveyor belt with my joints set in IK mode.

Code: Select all

rmlObject=sim.rmlPos(3,0.0001,-1,currentPosVelAccel,maxVelAccelJerk,{1,1,1},{jointValues[1],jointValues[2],jointValues[3],Qtarget[1],Qtarget[2],0})
This function is in a while loop because I should calculate at each iteration my new jointValues to reach the object which is moving. And they are easy to calculate with "sim.checkIkGroup". But what about Qtarget[1] and Qtarget[2]? They can not be 0 because my object is moving at a certain velocity and therefore I should apply this Q°=J^(-1)*S° where S° is the velocity of my object and J is the Jacobian. I tried to calculate Q° and the Jacobian manually at each iteration as following

Code: Select all

sim.computeJacobian(ikGroupHandle,0)
Jacobian,JacobianSize=sim.getIkGroupMatrix(ikGroupHandle,0)

but something is wrong.

Could you suggest me something?
Leonardo

Post Reply