Return to called state in smach
I would like to create a wait_for_user_input state in smach for states Foo and Bar.
Once a user gives input the wait_for_user_input state should return to the state which transitioned to it.
For example Foo -> wait_for_user_input -> Foo.
What is the best way to do this?
It seems the only option is to create a wait_for_user_input state for Foo and Bar separately - but this seems to be quite a bit of code. Does anyone have a suggestion for a technique to make this more seamless?
Thanks! Steve