GithubHelp home page GithubHelp logo

SMACH Usecase Question about executive_smach HOT 6 CLOSED

ros avatar ros commented on August 12, 2024
SMACH Usecase Question

from executive_smach.

Comments (6)

bajo avatar bajo commented on August 12, 2024

@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.

haritsahm avatar haritsahm commented on August 12, 2024

@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.

bajo avatar bajo commented on August 12, 2024

If I remember correctly you need to first preempt the currently running ActionState, after that you can execute another one.

from executive_smach.

haritsahm avatar haritsahm commented on August 12, 2024

@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.

bajo avatar bajo commented on August 12, 2024

@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.

haritsahm avatar haritsahm commented on August 12, 2024

@bajo I will try it later. Thank you!

from executive_smach.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.