ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 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.