Skip to content
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

How to use Parallel node #185

Open
XingbangChan opened this issue May 5, 2020 · 6 comments
Open

How to use Parallel node #185

XingbangChan opened this issue May 5, 2020 · 6 comments
Assignees
Labels
documentation Improve the documentation

Comments

@XingbangChan
Copy link

hi, could you please provide an example of using parallel node ,all of your doc only provide the squence, fallback control node example. thx(^o^)/

@facontidavide facontidavide added the documentation Improve the documentation label May 5, 2020
@facontidavide facontidavide self-assigned this May 5, 2020
@facontidavide
Copy link
Collaborator

I will... eventually

@gramss
Copy link
Contributor

gramss commented May 24, 2020

+1 from me. I would like to use this feature with ROS.

@albuckley
Copy link

Yeah I am a bit confused here by what this 'parallel' means. Is this meant to be 'concurrent' or is there some magic that forces the use of a separate processor we assume to exist.

Otherwise I don't follow what parallel does that is different from corountines or reactiveSequence

@facontidavide
Copy link
Collaborator

there is indeed a conceptual overlap with reactive nodes.

This is the reason why, if BT.CPP even reaches version 4.0, I will convert the reactive nodes into Parallel ones.

@albuckley
Copy link

albuckley commented Oct 20, 2021

Things are starting to make a little more sense reading into the code.

The comments in some of the bt_navigator plugin control nodes are helpful, explaining the execution flows such as the following from 'round_roboin_node':

 * |    A    |    B    |    C    |
 * --------------------------------
 * |  IDLE   |  IDLE   |  IDLE   |
 * | RUNNING |  IDLE   |  IDLE   |       - at first A gets ticked. Assume it returns RUNNING
 *                                                        - RoundRobin returns RUNNING and no other nodes are ticked.
 * | FAILURE | RUNNING |  IDLE   |  - A returns FAILURE so B gets ticked and returns RUNNING
 *                                                        - RoundRobin returns RUNNING and C is not ticked yet
 * | FAILURE | SUCCESS |  IDLE   |  - B returns SUCCESS, so RoundRobin halts all children and
 *                                                        - returns SUCCESS, next iteration will tick C.
 * | RUNNING |  IDLE   | FAILURE |  - C returns FAILURE, so RoundRobin circles and ticks A.
 *                                                        - A returns RUNNING, so RoundRobin returns RUNNING.

@Lecrapouille
Copy link

Yes, at least the doc should refer to its name, as well as ParallelAll, to indicate its existence. I guess this is 3thd most important control node in my opinion. @albuckley https://arxiv.org/pdf/1709.00084.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improve the documentation
Projects
None yet
Development

No branches or pull requests

5 participants