ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
First, have you thought of making your SMACH state machine controlled by the actionlib API with the SMACH ActionServerWrapper? This lets you start and preempt execution of a SMACH container over actionlib actions, which are basically preemptable service calls. ActionServerWrapper wraps a SMACH container in an actionlib server, and then you can "command" the SMACH plan with the normal actionlib API.
If you really must use a service, then I have two thoughts:
Additionally, this is a really good use case for event-driven SMACH state transitions (something which I think SMACH could really use).
2 | No.2 Revision |
First, have you thought of making your SMACH state machine controlled by the actionlib API with the SMACH ActionServerWrapper? This lets you start and preempt execution of a SMACH container over actionlib actions, which are basically preemptable service calls. ActionServerWrapper wraps a SMACH container in an actionlib server, and then you can "command" the SMACH plan with the normal actionlib API.
If you really must use a service, then I have two thoughts:
Additionally, this is a really good use case for event-driven SMACH state transitions (something which I think SMACH could really use).use, and could be implemented without making SMACH much more complex).