-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMACH Usecase Question #75
Comments
@haritsahm this is quite similar to how I used smach a few years ago. Main difference would be that I had a combined task monitor / manager. |
@bajo I see, thank you. Another question, if an action state is running and there is a new task that needs to be executed immidiately, how to set that action state to stop? |
If I remember correctly you need to first preempt the currently running ActionState, after that you can execute another one. |
@bajo do you have an example of requesting a preempt of a running state from other task/state? The only available example in tutorial is using a concurrence with a monitor state |
@haritsahm sorry, no public example to point you to. But I guess it depends how you are using the actionlib state. I think you just need to send a new goal to the running actionlib state, with a preempt request as message. See for example the tutorial at http://wiki.ros.org/smach/Tutorials/Simple%20Action%20State , especially the execute_cb of the TestServer. |
@bajo I will try it later. Thank you! |
Hi! First if all, your State Machine is Awesome!
I'm using it to control my robot and here is my architecture so far,
As you can see, after Initializing System, it will change to Task_Monitor State that will read user input from rosservice to determine the next task. My question is, is it a good idea to listen input from user using service/msg? Can I use smach for my robot task controller based on user input and it will run until we terminate the system or is it for single task only (opendoor_fsm, go_somewhere_fsm) and I have to call it from other node? Thankyou!
The text was updated successfully, but these errors were encountered: