parallel joint

Typically: "How do I... ", "How can I... " questions
Post Reply
wpc
Posts: 7
Joined: 06 Jun 2017, 02:22

parallel joint

Post by wpc » 16 May 2018, 04:02

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.

coppelia
Site Admin
Posts: 6740
Joined: 14 Dec 2012, 00:25

Re: parallel joint

Post by coppelia » 18 May 2018, 13:55

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

Post Reply