arcor2
arcor2 copied to clipboard
Branching of action output
From the design document...
- Each output of a suitable type (bool, enum) could be branched into more outputs.
- For instance output of type bool could be (virtually) divided into two outputs: False, True.
- This serves as an “integrated if block” and simplifies conditioning in simple (and probably frequent) cases where there is no need to add additional “if” block.
- In Python, this is translated to if/elif block handling all possible values.
- For types as int or float some kind of compare block (equals, greater_than, etc.) has to be used.
- If “if” is not necessary, the output could be just ignored or stored to a variable.
Action “bool_action” has one output of a type “bool” that is branched (divided) into two (true, false):
What needs to be done:
- [x] Review what is already implemented in the ARServer.
- [x] Divide parameter types into countable and uncountable
- [x] Implement checking of a condition in
check_logic_item
(link). - [x] Support for boolean.
- [ ] Support for enums.
- [x] Deal with blind branches.
- [x] Add support for branching to Build.
- [ ] Write integration tests.