Robotics StackExchange | Archived questions

messages broadcasting inconsistently

Hello, I have a problem where I try to send on the /gazebo/default/visual topic. The messages are sent and received properly in the majority of the cases, however, sometimes they get stuck. I triple checked the syntax, the messages are send in one loop instance and not in the next with the same code, it appears to be random. I'm reading the topic in a different terminal where the messages just don't appear (and the addressed functionality is not reacting in gazebo). After not finding a solution I tried to print the outgoing message-count and block the plugin:

while (m_publisher->GetOutgoingCount() > 0) {
    std::cout << m_pub->GetOutgoingCount() << " ";
    fflush(stdout);
    usleep(100);
}

In the majority of the cases the queue gets emptied properly, but in the mentioned cases, the program just gets stuck forever as the messages are not received.

Anyone knowing what could be the problem? Any help appreciated!

Asked by Frederik Siepe on 2018-10-10 13:44:54 UTC

Comments

Answers