Can a SMACH state machine be paused and resumed?
Hello,
I've been working through the smach and teer tutorials. Teer appears to make it easy to pause and resume a collection of tasks. I was wondering if there is a way to do something similar in SMACH.
My use case is a robot that is running around the house doing things by executing a SMACH state machine. However, it is also monitoring its battery levels using a SMACH MonitorState. When the battery levels fall too low, the robot should navigate to its docking station, recharge, then resume the execution of the original state machine where it left off.
I can imagine using a global "pause/resume" flag in the main state machine across all its contained states but this doesn't feel very SMACH-like. Does any one know how to implement this kind of pause/resume using SMACH?
Thanks!
patrick