Is this SimpleActionClient instantiation thread-safe for the callbacks?

asked 2022-10-26 18:24:55 -0500

Pinknoise2077 gravatar image

First, I am constructing an instance of the template class SimpleActionClient as follows:

actionlib::SimpleActionClient<MyAction> client(nh_, "topic", true /*spin_thread*/);

Later I am assigning callbacks (done_cb, active_cb, feedback_cb) with sendGoal.

Will those callbacks be thread-safe since they use the same global spinner or would they not be thread-safe in this case since the spinning is done in a separate thread?

edit retag flag offensive close merge delete