Comments (6)
@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.
This would listen to certain inputs (eg. input from touch interface or speech reco, scheduled task events on ROS topics), do some simple rule-based decision making process and trigger the appropriate sub-state machine (eg. go_to_charging_station).
For us this would run for days, so no need to restart it after a task was finished.
from executive_smach.
@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?
from executive_smach.
If I remember correctly you need to first preempt the currently running ActionState, after that you can execute another one.
from executive_smach.
@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
from executive_smach.
@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.
from executive_smach.
@bajo I will try it later. Thank you!
from executive_smach.
Related Issues (20)
- Build failure for ROS Iron: "Could not find a package configuration file provided by ament_cmake_flake8" HOT 4
- SimpleActionState uses inappropriate default outcomes value
- SimpleActionState will hang forever if action node dies
- Porting SMACH to ROS2 HOT 16
- Release executive_smach to ROS Noetic? HOT 1
- add_auto not behaving as expected
- Using same data in different states of SMACH Concurrent-container HOT 1
- TypeError: can't pickle _thread.lock objects
- When does the "execute" function of the State class get called? HOT 1
- Publishing SMACH introspection structure message failed. HOT 1
- SMACH with no ROS HOT 1
- State machines cannot be pickled
- How to use callback arguments
- Can't preempt state machine more than once HOT 1
- Constant userdata passing (or constant remapping)
- Problem with rosrun smach_viewer smach_viewer.py HOT 2
- Input keys check on StateMachine doesn't check if the keys are already there HOT 1
- Release ROS1 2.5.1 HOT 1
- Preempting a concurrence container might not have 'preempted' as outcome
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from executive_smach.