Gazebo | Ignition | Community
Ask Your Question

accuracy of contact sensor ?

asked 2015-05-08 18:36:10 -0500

djou07 gravatar image

updated 2015-05-13 12:43:24 -0500

Hi every body :)

why when I put a link of a model on the ground, its contact sensor indicates that the link don't touch the ground ?

like this graph shows, 1 if link touches the ground, -1 else

the link doesn't move and stay in place. Normally the data of the sensor should be always 1 !

Is this a bug ? If not this means that the if link is not heavy it doesn't touch 100% the ground.I tried to make the link heavier (100 Kg), same problem.

image description


Here is the source code :


CMakeLists.h (change the extension to .txt)

cmd.h (if you want to plot with gnuplot)

the model is in this video. the box is fixed to the ground

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-05-14 02:17:53 -0500

djou07 gravatar image

I resolved the problem by changing the update rate.

First I didn't precise it. By default the frequency is 1000 times per second. So I modified it to 100 and then to 30. And it worked. Still don't understand why it loses accuracy with big frequency...

So, I want to know what is the recommended frequency ?

thanks in advance

edit flag offensive delete link more

answered 2015-05-13 10:05:18 -0500

niall gravatar image

Some code would help on how you implemented your contact sensor? I had something similar to this and it was because I was reading multiple contacts at the same time. Or maybe your link (box?) is flipping from one corner to another?

edit flag offensive delete link more


thank you very much for your answer, I updated the question. maybe it will flip if the force applied is not enough. but I set 3 N.

djou07 gravatar imagedjou07 ( 2015-05-13 12:48:58 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-05-08 18:36:10 -0500

Seen: 710 times

Last updated: May 14 '15