Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In C++, you can use ros::topic::waitForMessage(): http://docs.ros.org/indigo/api/roscpp/html/namespaceros_1_1topic.html

Note that this will be slow, because internally it creates a subscriber, waits for it to connect, waits for the first message, and then removes the subscriber.