simCheckIkGroup Problem

Report crashes, strange behaviour, or apparent bugs
Post Reply
sneaker
Posts: 12
Joined: 11 Dec 2013, 22:21

simCheckIkGroup Problem

Post by sneaker »

Hi,

i am having a problem with the simCheckIkGroup function.

First, I try to get the JointValues of the Robot that are needed to Move to the target Position with simCheckIkGroup
and then I move to these jointPositions with the simRMLMoveToJointPositions function.

Code: Select all

number,jointValues=simCheckIkGroup(ik,jointHandles)
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,jointValues,targetVel)
This works if the target Position is close to the Initial Position.
But if the distance to the target position is longer, then simCheckIkGroup returns wrong values. (valid, but wrong)

This is also the case with the simHandleIKGroup function.
Here I can help myself by calling simHandleIkGroup 3 Times. Then the robot is at the correct position.

Here is my scene if you want to take a look at it.
http://www.filedropper.com/simcheckikgroupbug

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

Re: simCheckIkGroup Problem

Post by coppelia »

Hello,

this is a normal behaviour: IK is not path or motion planning, and you need to make sure to move by small steps. If a step is too large, then the target position cannot be reached. In that situation you should check the return value of the simCheckIkGroup or simHandleIkGroup functions. You can also adjust the IK group properties so that if the target is not reached, the values won't be applied (when using simHandleIkGroup): click Edit conditional parameters in the IK dialog, then check the two check boxes in the dialog that pops open.

Cheers

sneaker
Posts: 12
Joined: 11 Dec 2013, 22:21

Re: simCheckIkGroup Problem

Post by sneaker »

so is there any other way to get the inverse kinematics of a certain point, and then move to this point in joint mode/forward kinematics mode (via simRMLMoveToJointPosition)?

This is a common option in most robot controllers. It would be nice if it is possible to simulate that in v-rep.

The only option I see is to create a second invisible robot, call simhandleik several times until the result is positiv and then apply the jointvalues of the invisible robot to the visible robot via simRMLMoveTojointPosition. But this kind of messes up the scene and the code.

Maybe you could think about implementing this in the simcheckikgroup so that it only returns correct values.

Best Regards

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

Re: simCheckIkGroup Problem

Post by coppelia »

When you want to retrieve the joint angles corresponding to a specific end-effector pose, you have 2 options:
Cheers

Post Reply