Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

Hi there,

I also noticed something similar, in a plugin, if you do not subscribe to the contacts topic then the contact manager does not have any contacts (myContactManagerPtr->GetContacts()).

myContactSub = my_gz_node->Subscribe("~/physics/contacts", &MyPluginClass::DummyContactsCallback, this);

Another thing that might cause the problem, if the contacts do not change for a given amount of time they are not published anymore (you can check this by spawning a box in an empty world, visualize the contacts, and after a while they disappear)

Cheers, Andrei