ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is not currently possible, so you'll have to do an asynchronous service call, starting it in the subscription callback and finishing it in a callback when the response is received. Here's an example:

In general, it's a bad idea to block in a subscription (or service, or timer) callback since that prevents other callbacks from being handled.