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

Callbacks are called during spin() or spinOnce() (see the overview on spinning for details). Callbacks are also blocking, so while your action callback is executing, your node won't spin, and no subscription callbacks will be performed during that time.

If it's possible, you need to change the way your action server is implemented. Have a look at the goal callback method tutorial. It's written in cpp, but the concept is the same. Basically, you subscribe to goal messages and store the necessary data in the node. Then, in the main loop, you call a function to do a little bit on whatever action you're performing and possibly publish some feedback. That way, your node can keep spinning, and subscriptions callbacks can still occur.