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

Revision history [back]

You need to spin up another thread to wait and throw back a result once its complete. Or optionally not wait for a result since all you're doing is printing to screen. Since you're not using the result or tracking progress, there's not a bunch of value in waiting around, unless that print statement is really important to you. In that case, you should just run another thread that is waiting for the result and printing the completion status.

You need to spin up another thread to wait and throw back a result once its complete. Or optionally not wait for a result since all you're doing is printing to screen. Since you're not using the result or tracking progress, there's not a bunch of value in waiting around, unless that print statement is really important to you. In that case, you should just run another thread that is waiting for the result and printing the completion status.

If you want to thread it, std::threads is what you want for the most basic implementation https://en.cppreference.com/w/cpp/thread/thread