Changing SMACH states on a service request
I am using SMACH to create a state machine. I would like to create a state machine that switches state when a service request is received (i.e. the state machine has a service server). I have a simple GUI with a START/STOP button. The GUI executes a service request when the button(s) are pressed. I would like to change from and IDLE state on START and go back to it when the STOP button is pressed. Is there a preferred way of embedding the service server in a SMACH state machine and what is the best way to trigger state transitions based on a service request event?