Page 1 of 1

parallel joint

Posted: 16 May 2018, 04:02
by wpc
Hello:
I want to contral parallel joint with remote api. i learned that i need to set up and solve IkGroup by examples. But there are not related functions in remote api such as python. So, i used the function simxCallScriptFunction . But no effect after using function. The related codes are as follows:
In vrep:

Code: Select all

parallelfunction=function(jhandle,jangle)
    ikGroup=simGetIkGroupHandle('ik')
    -- First set the motor joint into passive mode
    simSetJointMode(jhandle,sim_jointmode_passive,0)
 
    -- Set the desired joint angle
    local angle=20*math.pi/180*math.sin(math.pi*simGetSimulationTime())
    simSetJointPosition(jhandle, jangle)

    -- Compute
    simHandleIkGroup(ikGroup)
end
In python:

Code: Select all

def setparalleljoint(jhandle,jangle):
	res=vrep.simxCallScriptFunction(clientID,'objectName',vrep.sim_scripttype_childscript,
                'parallelfunction',[],jangle,jhandle,buffer,vrep.simx_opmode_blocking)	
Could you tell me how can i contral parallel joint with remote api only for FK in kinematic simulation? I have learned to use lua control parallel joint in vrep。

Thank you.

Re: parallel joint

Posted: 18 May 2018, 13:55
by coppelia
Hello,

you first need to identify where the problem comes from: is it linked to the remote API? Or the script function?
Is your script function called? If you call the same function directly from the script, is the behaviour different?

Cheers