## Impact force on collision

Typically: "How do I... ", "How can I... " questions
Justus
Posts: 42
Joined: 24 Jan 2017, 07:37

### Impact force on collision

Hi,

We are simulating conveyor belts. Our goal is to control the conveyor so that there are only minimal/low-impact collisions between the objects on the conveyors. We can count the collisions but this says little on impact (objects collide with each other with different speeds).

Question: Is there a way to measure the impact force when objects are colliding?

Regards,
Justus

coppelia
Posts: 7324
Joined: 14 Dec 2012, 00:25

### Re: Impact force on collision

Hello Justus,

normally, in order to measure a force/torque, you would need a force sensor attached between two shapes. But there is another way, which is a little bit more troublesome:

simGetContactInfo lets you parse all the contact pairs in one simulation step. Since a simulation step is usually composed by 10 dynamic simulation steps, you have 10 different lists to parse (unless you set the simulation time to the same as the dynamics simulation step size).

Have a look how the model Models/other/contact display.ttm works

Cheers

Justus
Posts: 42
Joined: 24 Jan 2017, 07:37

### Re: Impact force on collision

Great tip! Visualizing force works. Something I cannot explain is the following:

I used "models/other/contact display.ttm", drew a sphere with mass 1 KG at about 10 cm above the floor. When it lands on the floor it shows the big impact, which then stabilizes to ~9.81 (Z-force). However, every ~100ms the force goes up to ~21.6 for just 1 measurement (out of the 10 made during one sim. step). This only happens with the Bullet physics engines.

Do you know what is happening?

coppelia
Posts: 7324
Joined: 14 Dec 2012, 00:25

### Re: Impact force on collision

You will notice that if you switch the engine, the result will be slightly different. This is directly linked to how the various engines are handling the contact. But on average, you should have a constant force (e.g. in one dyn. engine calc. step, the force is 0, in the next it would be twice of what is expected).
I would simply average the force over one full simulation step (i.e. 10 dyn. engine calc. steps, if you use the default settings).

Cheers