0
$\begingroup$

Rosanswers logo

Hello everyone,

in our Project we have a GUI that upon button click calls a ros service that does somenthing. While the callback routine is executed the GUI freezes of course because it waits for the callback to return.

What would be the most elegant way to avoid that behavior? (The Service Response is unimportant to the GUI)

Kind Regards Niklas


Originally posted by Niklas on ROS Answers with karma: 11 on 2011-04-27

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I see two options:

  1. Use a topic instead of a service. Topics are exactly designed for "I don't need a response"
  2. If you must use a service, you could likely spin up another thread to execute the service call in so that it doesn't block you GUI thread.

Originally posted by Eric Perko with karma: 8406 on 2011-04-27

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.