How to trigger SMACH state transitions from another node
Hi
I'm using the SMACH state machine and want to trigger state changes from other nodes. For example from a keyboard node to ABORT the running process at any time.
One could of course do this by having the keyboard node send out an ABORT message on a topic and continuously monitor the given topic in each state, and induce a transition to an abort state if the ABORT message is received. But it sounds to me that it's to tedious to incorporate code in each state and at all waiting stages (for example while waiting for my laser to heat up or waiting for some other action to finish). Tedious and error prone.
Are there any other better ways to do this. Possibly some method to make this progress more event-driven.
regards - Frimann