meaning of inData and outData of sysCall_jointCallback function?

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 4
Joined: 29 May 2019, 16:53

meaning of inData and outData of sysCall_jointCallback function?

Post by Jinhyeok »

Hello, all.
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')
    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:
    local outData={}
    return outData
On the initialization, I have defined handle for joint 1.

Code: Select all

function sysCall_init()
    joint1_h = sim.getObjectHandle('LBR4p_joint1')
Even if I defined my maxForce and forceOrTorqueToApply on outData, it seems that my manipulator doesn't move.
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

Site Admin
Posts: 8724
Joined: 14 Dec 2012, 00:25

Re: meaning of inData and outData of sysCall_jointCallback function?

Post by coppelia »


what happens if you hard-code the max. force/torque and joint target velocity in the joint callback function? Does it work then?
Can you post a simple scene that illustrates your problem?


Post Reply