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

What do you mean by block? Do you want to sometimes stop the callback form executing when it receives a message? You can have a global or class variable that you toggle when you want change whether to callback will execute or not. And then when the callback is called, it can check that variable and simply return immediately if desired. This should work but there might be a better way to do it.