Start a new topic

CoppeliaSim Prismatic Joint Force has a limit with Vortex



I am simulating a Kuka KR10 R900 robot with a Schunk EGN100 gripper on CoppeliaSim. Please see the attached scene. (I am unsure if you guys deal with this sort of thing but please hear me out) ... Z69NVFVL5M 

I have placed a force sensor between the gripping fingers and the jaw which holds them in the EGN100 Gripper.  I use this to read the force in the Y-axis three times during a pick and place process process. 


I have downloaded Vortex physics engine and am I having a lot of success with it. However, with Vortex, when I change the gripping force (on line 6 of the KUKA KR10 child script) the force sensors read it very accurately as far as 160N. However, once I go over this, for example 350N, the force sensor consistently only gives readings of around +/- 166N in the Y axis.

I have consulted CoppeliaSim about this and they cannot understand why this might be happening. I have changed many parameters in the simulation and other physics engines such as Bullet 2.83 register the force increase perfectly. As such this seems to be linked to something in my simulation that is affecting how Vortex operates?

Do you have any idea why this might be?  

Thank you very much!

Hi Matthew,

I can't access the google drive document.


Hi Matthew,

do you have a vortex file that i can look at?


Hi Michel,

Sorry I don't quite understand? Do you mean a file where Vortex is the selected physics engine?

Please try this if so:

Thanks again!

Hi Matthew,

I was able to run your simulation. Thanks for the file.

Very nice simulation!

So, what you are saying is that if I change the value of the force in line 6 in your script KukaKR10 to anything higher than about 160, that the force sensor still reports only a gripping force of 166 consistently. Correct?

I suppose the print statement you added in line 86 reports the sensor force you are talking about.

    -- Get the force on the LH Force Sensor and print it


        print(f[2]) <<<<<<< here

        AbsoluteYForce = math.abs(f[2])

    -- If the force in the y direction is greater than 1 (signifies successful grip)

    -- Count as a successful grip 

I am not familiar with the coppelia API. Can you explain me how the force sensor works exactly? Is it obtaining the force directly from the Vortex constraint?

Also, I would like to know the force in the constraint is set in Coppelia. Does it set the maximum force that the constraint can apply in order to achieve its goal?

If you run a simple simulation just in the Vortex editor with a prismatic joint, and you set the min/max forces of the prismatic to a higher value, it will also apply this specified force if it must in order to achieve the desired target location or velocity, depending on how you control the joint (velocity based or position based control).

So, I suppose the answer lies in the details of implementation of the Coppelia force sensor and how this value is actually obtained, and from which data source in Vortex.

Any information that you might have in this regard could be helpful to get to the bottom of this.

I am not familiar with the implementation of the Vortex integration in Coppelia, since this is not something we maintain ourselves here. Coppelia Robotics maintains the code.

I see though that the source code is available here:

The force sensor API for the Vortex integration seems to be provided here:

See function void reportConfigurationAndForcesToForceSensor(...)

The implementation is here:

The force which is read by the force sensor is obtained in line 977 in the file above. The force is obtained in world space from the constraint API and represents the constraint force applied to the rigid body (part) in world space.

There is some calculation done on the force in the Coppelia code, maybe to bring the world space force and torque into inertial frame; I didn't dig enough to be sure.

If you make a test in Vortex Editor only (a prismatic, with two parts; one static and one dynamic) then you could confirm that the forces returned are accurate and as you expect.

The forces that are read are part of the prismatic joint's outputs in the editor. So you can easily read them in a test simulation and play around with the prismatic max forces and observe the corresponding results.

Attached you will find a test simulation which I took the freedom to create for you. It runs with 2019c.

Here is the result when I set up the joints controlling the gripper to use a max force of 200 Newton.


As you can see, the two grippers apply exactly 200 Newton, since this is their max force specified in the constraint properties.


So, the behaviour in Coppelia Robotics must stem somehow from the implementation in the Coppelia integration of Vortex, or in the way the robot is modelled in the Coppelia simulation scene.

Maybe you could show this case to the people from Coppelia Robotics. This might help them understand what is going on on their end.

Attached is the test simulation I was using in the Vortex Editor (Gripper Test - Vortex Studio

To redo my experiment, just open the assembly and press play.




Hi Daniel,

Thank you so much for the comprehensive reply.

Apologies I've been slow to get back!

I have a project due on April 30th and I will hopefully get back to this properly after this time.

In the meantime, do you happen to know how the coefficient of friction of a colliding pair would be calculated in the event that they are both set to ScaledBox but the coefficient itself is different?

I am awaiting a reply from CoppeliaRobotics for the same.

Thank you,


1 person likes this

Hi Matthew,

No worries. There is no rush on my end ;)

I simply hope I can help out. Keep me posted.

Regarding the friction coefficient:

I am unsure how the friction coefficient for colliding entities in Coppelia is decided and or configured. In Vortex it works as follows:

If you have the material properties for two surfaces A and B, and A has a lower friction coefficient than B, the friction coefficient of A will be chosen when the surfaces of type A and B collide.

In the editor this is reflected in the material table. The individual materials can be configured independently, and the interior of the table (a symmetrical table, since order here obviously doesn't matter; "A colliding with B" vs. "B colliding with A") is automatically calculated from the individual materials' properties.

The user can override these automatically calculated pairings though and chose any properties they want.

The rule of thumb for the auto-calculation is that the property which adds the least resistance is chosen for the pairing.

Intuitive examples:

  • Ice (with zero friction) and steel (with some non-zero friction) would have zero friction (friction of ice).
  • Rubber (with low stiffness) and steel (with high stiffness) would have low stiffness (stiffness of rubber).
Note that the damping coefficients are chosen based on which material's stiffness coefficient is chosen.
In the example above, the damping would also be chosen from the rubber material alongside its stiffness.

One notable exception of the "lowest resistance" rule is the adhesive force. In this case, the greater of the two adhesive forces is chosen.
Example: Sticky glue (high adhesion) on steel (no adhesion) will be using adhesive force from glue.

Let me know if this is clear.


Login to post a comment