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

Could it be possible to define multiple action server in this process, or there will be some problems (such as reentrance, etc).

If you have two very different behaviors that you want to respond to, it is totally reasonable to have two action servers in a single process. Just remember that in order to prevent topic collisions, each action server must operate in its own namespace. And, assuming that you're using the ExecuteCallback to service goals, you're going to now have 2 different Execute callbacks: one for each action server.

If both action servers simultaneously receive goals, then yes, both execute callbacks with be run concurrently. Just as in any event driven asynchronous system, it is your responsibility to add locks to ensure that you don't run into concurrency issues.