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

I've managed to work around this by removing the block beginning 'while rclpy.ok( ):' and replacing it with the following:

future = self.read_bool_client.call_async(request)    
self._logger.info("Made asynchronous call") 
future.add_done_callback(self.some_new_callback)

Where the new callback takes over the next step in execution - I'd still be interested to hear if there's some way of executing this in a single sequential callback, although this may contravene the general ROS principle of not using synchronous callbacks nested within other callbacks