Activation of IK Element

Requests or suggestions for new features
Post Reply
kodachi
Posts: 2
Joined: 12 Apr 2013, 09:32

Activation of IK Element

Post by kodachi »

Hi,
I would like to activate an IK Element by using "RegularAPI".
I could change some joint mode properties from force/torque mode to IK
mode, but I couldn't activate "Element is active" boxes in execution of
vrep simulation.

e.g.
REP_DLLEXPORT simInt simSetIkElementActive(simInt ikGroupHandle,simInt
tipDummyHandle,bool isActive)
{
...
CikGroup* it=ct::ikGroups->getIkGroup(ikGroupHandle);
...
CikEl* el=it->getIkElementWithTooltipID(tipDummyHandle);
...
el->setActive(isActive);
...
}

Is there any other way?

Thanks.

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

Re: Activation of IK Element

Post by coppelia »

Hello,

have you tried using the function simSetIkElementProperties, and setting the constraints argument to zero to deactivate the IK element? That should work fine, though not extremely elegant ;)

Cheers

kodachi
Posts: 2
Joined: 12 Apr 2013, 09:32

Re: Activation of IK Element

Post by kodachi »

Thank you for your response.

I have tried to use "simSetKiElementProperties", but I couldn't solve the problem.

Please watch the following URL.
http://youtu.be/O-w38yB3Zbo

The "Element is active" checkbox in IK elemnent properties is unmarked when I change joint modes by Regular API.
I want to change joint modes from the IK mode to force/torque mode vice versa during simulation running.

I guess it must be possible to control IK joint mode if I can mark that checkbox by some API function.

Can I ask you to develop such API funcs?

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

Re: Activation of IK Element

Post by coppelia »

Hello,

Ah, I think I see what happens:

When you run IK for an element that is not valid, then it is automatically disabled. This happens when you temporarily switch the joint mode.

One way of avoiding this would be to also temporarily avoid executing the IK group that handles the IK element. This could be done by calling:
and this only if your IK group is implicitely handled by default.

Above method only works if temporarily disabling the whole IK group works for you. Let me know, otherwise we will try to add a flag to enable/disable individual IK elements.

Cheers

Post Reply