Page 1 of 1

Set up dependent joint from lua api

Posted: 15 Mar 2019, 10:49
by agsdyson
Hi,

I have set up a dependent joint using the gui and everything behaves as expected.

I am generating robots programattically using the lua api and so far I have not been able to create a dependent joint from lua code.

I can use:

Code: Select all

sim.setJointMode(sim.jointmode_dependent)
but I can't find an api function that specifies the dependancy equation or the joint that the newly created joint depends on.

These are the closest functions to what I want to do, but I am not using the vortex or newton engine so they don't have the desired effect.

Code: Select all

sim.vortex_joint_dependencyfactor (float parameter)
sim.vortex_joint_dependencyoffset (float parameter)
sim.vortex_joint_dependentobjectid (int parameter)

sim.newton_joint_dependencyfactor (float parameter)
sim.newton_joint_dependencyoffset (float parameter)
sim.newton_joint_dependentobjectid (int parameter)
The dependent joints created in the GUI work the ODE physics engine. Is it possible to recreate this behavior using only the lua api?

Thanks

Re: Set up dependent joint from lua api

Posted: 18 Mar 2019, 15:01
by coppelia
Hello,

correct, that functionality is missing. Try downloading V-REP V3.6.1 rev1 in about a day, then you should have a new API function: sim.setJointDependency

Cheers

Re: Set up dependent joint from lua api

Posted: 19 Mar 2019, 15:47
by agsdyson
Thank you, that is very helpful!