For now, I'm trying to implement sysCall_jointCallback function without remoteAPI.
Here's my code of sysCall_jointCallback.
Code: Select all
function sysCall_jointCallback(inData)
inData.handle = joint1_h
if inData.first then
print('Joint callback function has called')
end
local max_vel = 99999
inData.targetVel = max_vel
inData.velUpperLimit = max_vel
inData.maxForce = 10
local forceOrTorqueToApply=inData.maxForce -- the maximum force/torque that the joint will be able to exert
-- 5. Following data must be returned to V-REP:
firstPass=false
local outData={}
outData.velocity=maxVelocity
outData.force=forceOrTorqueToApply
return outData
end
Code: Select all
function sysCall_init()
joint1_h = sim.getObjectHandle('LBR4p_joint1')
end
As a debugging, I have checked if my jointCallback function works by using print function. It worked!
Is there anything to do after setting my OutData to move my manipulator?
Thanks for your help, in advance.
PS) my joint1 is set as 'Motor_enabled' and 'Control loop enabled' to use jointCallback function.
Sincerely, Jinhyeok