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.
Activation of IK Element
Re: Activation of IK Element
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
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
Re: Activation of IK Element
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?
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?
Re: Activation of IK Element
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:
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
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:
- simSetExplicitHandling(ikGroup,1)
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