Set up dependent joint from lua api

Typically: "How do I... ", "How can I... " questions
Post Reply
agsdyson
Posts: 31
Joined: 13 Feb 2019, 14:02

Set up dependent joint from lua api

Post 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

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

Re: Set up dependent joint from lua api

Post 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

agsdyson
Posts: 31
Joined: 13 Feb 2019, 14:02

Re: Set up dependent joint from lua api

Post by agsdyson »

Thank you, that is very helpful!

Post Reply