ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
![]() | 1 | initial version |
If you use a single-threaded spinner you don't need to use mutex because the callbacks will be called sequentially, therefore only one callback will be reading or writing the variable at a time.
You can read more about it here:
http://wiki.ros.org/roscpp/Overview/Callbacks%20and%20Spinning