Ask Your Question

Revision history [back]

Please take a look at ros::topic::waitForMessage(..).

Please take a look at ros::topic::waitForMessage(..).

That would allow you to receive a single message without having to manage while loops and variables yourself, but I'm not sure this is really the best way to go about this.