Strange Behaviour SimGetContactInfo

Report crashes, strange behaviour, or apparent bugs
yonotu999
Posts: 1
Joined: 10 Apr 2017, 14:09

Strange Behaviour SimGetContactInfo

Postby yonotu999 » 04 May 2017, 15:43

Hi

I'm having some strange behaviour while using SimGetContactInfo. I use the ContactInfoDisplay provided in Models. And every works fine but, when I change the custom simulation time step, I receive more contact points than I should. For example I'm simulating a robot grabbing a ball, and I want to know the contact forces between the fingers and the ball, If only 2 fingers are touching the ball, and the custom simulation time step is 5 ms, I receive 2 forces as usual. However if I change the custom simulation time step to 15 ms, I received 6 forces, and to 25 ms I received 10 forces. Even when I using the default simualtion parameters I have the same issue.

Regards

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

Re: Strange Behaviour SimGetContactInfo

Postby coppelia » 05 May 2017, 08:47

Hello,

the behaviour is actually normal: by default, a simulation step is 50ms. But the physics engines do not work well with such large steps. So the physics engines will use a time step of 5ms (by default). This means that the physics engine will run 10 times in a single simulation step. Again, this is the default behaviour and all can be adjusted according to your needs.
But in the end, if the physics engine runs 10 times, it might also detect 10 contact forces. For a same contact point, you may average out those forces.

You can also read more in the function description of simGetContactInfo.

Cheers


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 8 guests