Different motions for a Dynamic model and a Kinematic model

Report crashes, strange behaviour, or apparent bugs
Post Reply
jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Different motions for a Dynamic model and a Kinematic model

Post by jacobi »

Dear Coppelia,

I created a scene, and dragged two robots (e.g. UR5) into the scene.
One robot is unchanged, while the other is set as follows:

1. In the model properties, I set: model is static (not dynamic), and model is not collidable.
2. set each joint as passive mode (or inverse kinematics mode).

Then I run the simulation, and find that the two robot generate different motions. Some portions of the motions are the same, while some portions are basically mirrored.

Could you explain this and suggest approaches to make these motions the same? Many thanks!

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

Re: Different motions for a Dynamic model and a Kinematic mo

Post by coppelia »

Hello,

when using the exact same child script, the motion stays the same. There are two things that could happen:
  • It could be that the dynamic model has joint controller settings that do not allow the motors to run as fast as the motion commands. This is the case when the force/torque is too low, or the upper velocity limit is too low. Or when the controller is not good.
  • Another reason is, most physics engines do not allow to set revolute joints limits to something larger than [-180;+180]. Then, we simply simulate those joints as cyclic joints. This is not the case when not using the physics engines (i.e. not dynamically simulated robot).
Also, what V-REP version are you running?

Cheers

jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Re: Different motions for a Dynamic model and a Kinematic mo

Post by jacobi »

Thanks for prompt reply. My V-rep version is 3.2.1.

Yes, you are right, I found if I uncheck the "Position is cyclic" for the base joint, then the motions are the same.

This is indeed caused by the fact that, for a cyclic joint, to move from 90 to -90, there are two path approaches with a same distance.

Code: Select all

targetPos1={90*math.pi/180,90*math.pi/180,-90*math.pi/180,90*math.pi/180,90*math.pi/180,90*math.pi/180}
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,targetPos1,targetVel)

targetPos2={-90*math.pi/180,45*math.pi/180,90*math.pi/180,135*math.pi/180,90*math.pi/180,90*math.pi/180}
simRMLMoveToJointPositions(jointHandles,-1,currentVel,currentAccel,maxVel,maxAccel,maxJerk,targetPos2,targetVel)
A minor question is that, for the two robots, both with "Position is cyclic" checked, why the passive mode choose a different path approach? Can we specify a parameter to choose desirable one for such a case?

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

Re: Different motions for a Dynamic model and a Kinematic mo

Post by coppelia »

If in the two situations you obtain a result different, can be linked to a very very small positional detail: basically, the shortest path will be chosen if the joint is cyclic. In that case, it could be that in the first situation, we try to go from -180.0001 to 0 degrees, in the other situation, we try to go from -179.9999 to 0 degrees. In that case, two opposite directions will be generated.

When you use the simRMLMoveToJointPositions function, then you can use the very last argument: direction, where you can specify the movement direction in case the joint is cyclic.

Cheers

jacobi
Posts: 11
Joined: 13 Aug 2015, 22:27

Re: Different motions for a Dynamic model and a Kinematic mo

Post by jacobi »

Thank you, copellia.
I forget there is a last parameter:

direction: the desired rotation direction for cyclic revolute joints: 0 for the shortest distance, -x for a movement towards negative values, +x for a movement towards positive values (n=(x-1) represents the number of additional turns). Can be nil or omitted, in which case a value of 0 is used for all joints.

Post Reply