Git Product home page Git Product logo

Comments (2)

brettpac avatar brettpac commented on July 30, 2024

Hello @sukhrajklair,
Thanks for the excellent question.

Ok, so the general way we've approached this is through the use of components attached to specific clients.

Going with the example you outlined above, let's name the two states StGoalEvaluator and StGoalExecutor. I'm imagining a process where StGoalEvaluator would receive and evaluate a new goal request. If the evaluation of the request succeeds, then the state would throw a success event (which it could transition on to StGoalExecutor) and during onExit, write the accepted goal to a goal queue component attached to the Nav2z Client (for instance) in the Navigation Orthogonal. The next state would select the goal from the queue and navigate to the goal pose.

Here are some components we've written before for the Nav2z Client Behavior Library that may have some of the functionality you're looking for...

https://github.com/robosoft-ai/SMACC2/tree/humble/smacc2_client_library/nav2z_client/nav2z_client/include/nav2z_client/components

This state and client behavior may also give you some inspiration...

https://github.com/robosoft-ai/SMACC2/blob/humble/smacc2_sm_reference_library/sm_dance_bot_warehouse_2/include/sm_dance_bot_warehouse_2/states/st_navigate_undo_motion.hpp

https://github.com/robosoft-ai/SMACC2/blob/humble/smacc2_client_library/nav2z_client/nav2z_client/include/nav2z_client/client_behaviors/cb_undo_path_backwards.hpp

And can be seen in this demo...
https://www.youtube.com/watch?v=A3kmCQS_ww8

Regarding the use of the data fields in the events, the main purpose of the fields is to identify which runtime object threw a given event, and from what Orthogonal (to account for multiple instances of a given runtime object, say for instance in the case of a two arm robot that uses two instances of Moveit) or State (in the case of state reactors) the event was thrown from.

I suppose it would be possible to create different events able to carry other data, but I'd need to hear the specific use case first.

from smacc2.

sukhrajklair avatar sukhrajklair commented on July 30, 2024

I hadn't thought of using components but now I can see how they can be used to carry data between states. Thanks for the suggestion and examples.

from smacc2.

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.