Ensuring mutual exclusion between different actions
Hi! I'm looking for a good way to ensure that different actions do not run at the same time.
Let's say we have a robot that can do different actions, such as moving and making a measurement. It seems natural to implement each of these actions as different actionlib servers as they would require different types of variables as a goal. But we want to avoid multiple actions running at once, such as the robot starting to move while it is making a measurement.
What would be a good way to design such a system? Such that it is simple to add on more actions when needed with minimal re-writing. While ensuring that the actions cannot run at the same time.
Looking forward to your answers :)