Why does my contact sensor publish irregularly?

asked 2021-03-06 15:54:26 -0600

rapidnailcalculator gravatar image

Hi,

I'm very new to ros, gazebo etc and I'm having trouble that I think arises from lack of understanding of how the subscriber/publisher work with regards the libgazebo_ros_bumper.so contact sensor I have implemented.

I have implemented the contact sensor with a few different <update_rate> values, and had a subscriber print the ContactsState states information. At 1KHz update this is usually just one ContactState message (described as in the debug message as i:0/1), with a variable number of sets of contact points reported. However, sometimes it will have two ContactState messages (i:0/2 and i:1/2) that are time stamped a millisecond apart. At higher update rates, the number of ContactState messages within a given ContactsState message varies. Is this simply the contact sensor "saving up" its ContactState messages until it publishes them all in a single ContactsState message, from oldest to newest? If so, why are the number of ContactState messages so variable when the time between updates remains the same?

edit retag flag offensive close merge delete