Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem is solved!

I realized the subscriber object might also have a sub.getNumPublishers(), this way I could check this each loop. Also to ensure this worked I let the publisher sleep 1 second after advertising, then 1 second after publishing.

This is probably a hacky solution but it is only for a test where I can force values on my autonomous robot in the command line on the fly.

Thanks for the tip NEngelhard, it led me towards my solution.