How to get stable measurements when using force sensor?

Typically: "How do I... ", "How can I... " questions
Post Reply
21207_iHome
Posts: 8
Joined: 25 Apr 2017, 03:13

How to get stable measurements when using force sensor?

Post by 21207_iHome »

Hello everyone, I want to measure the contact force by using a force sensor. Firstly I try a very simple scene which consist of two cuboids connected by a force sensor.
Image
And according to Design consideration 6~8, I modified the mass and principal moments of inertia. The mass of the upper cuboid is set to 10kg. So, I think the force sensor value along Z-axis is obviously 98N. But the value is random and unstable when using bullet or ODE engine. However the Newton physics engine did very well without changing anything.
Image
Is there a such big difference between different physics engines? How can I get correct result from the bullet engine?
Do you have any suggestions? Thanks!

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

Re: How to get stable measurements when using force sensor?

Post by coppelia »

Hello,

yes, there are unfortunately significant differences between physics engines. Bullet and ODE are often considered as game engines, since they do not always produce very realistic data, but can be tuned to be very stable and fast.

Many parameters will directly influence the force sensor reading, such as: the dynamics simulation time step, the resolution iterations, the masses and inertias involved, whether the bodies also collide with each other, etc.

But maybe you can post your scene so that we can have a look at it in more details.

Cheers

21207_iHome
Posts: 8
Joined: 25 Apr 2017, 03:13

Re: How to get stable measurements when using force sensor?

Post by 21207_iHome »

Thanks for your reply.
The link of the scene is https://d.pr/MiHuR. I have tuned many parameters, but the result is bad when using bullet or ODE.
And the result of Newton engine is https://d.pr/3zbO
I don't know why there is such a big difference. Could you help me ? Thanks!

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

Re: How to get stable measurements when using force sensor?

Post by coppelia »

I had a look at your scene, and following happens: the two objects collide with each other slightly (it is a border condition and only some of the engines will register that collision). The solution: simply adjust the local respondable masks of your two bodies, so that they won't react to collision anymore. Then the sensor reading will be much better.

Cheers

21207_iHome
Posts: 8
Joined: 25 Apr 2017, 03:13

Re: How to get stable measurements when using force sensor?

Post by 21207_iHome »

coppelia wrote:I had a look at your scene, and following happens: the two objects collide with each other slightly (it is a border condition and only some of the engines will register that collision). The solution: simply adjust the local respondable masks of your two bodies, so that they won't react to collision anymore. Then the sensor reading will be much better.

Cheers
It works. Thank you very much!

Post Reply