ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
So, it is possible to set the initial state (and userdata) of a SMACH state machine with smach.Container.set_initial_state(). So if your battery monitor preempted the state machine, and you stored the active states of the containers you cared about, you could "resume" from a given state of execution later on. You'd have to do the bookkeeping on your own, but you should be able to get the behavior that you want.
What SMACH really needs is an extension for event-based transitions, and then you could distribute the responsibility of pausing / resuming in each active container.