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

Support variables, references to members, late-initialization #103

Merged
merged 54 commits into from
Jul 3, 2024

Conversation

fred-labs
Copy link
Contributor

Until now the final parameters of actions were generated during parsing.
To be able to support additional use cases, it is required to resolve just before execution.
With this PR the parsing is moved to a newly defined execute() method that is called with the actual execution of the behavior.

One use case is, that an action might change variables values for later usage. This is now possible by internally creating a py-trees blackboard variable for any VariableDeclaration.

Additionally it is now supported to refer to members of parameters (that can either be fixed parameters or variables). Example:

struct test_struct:
    member: string = "foo"

scenario test_scenario:
    do serial:
        log(test_struct.member)

@fred-labs fred-labs changed the title Support variables Support variables, references to members, late-initialization Jun 28, 2024
Copy link

github-actions bot commented Jun 28, 2024

Test Results

235 tests   221 ✅  27m 29s ⏱️
 14 suites   14 💤
 14 files      0 ❌

Results for commit 18474ce.

♻️ This comment has been updated with latest results.

@fred-labs fred-labs enabled auto-merge (squash) July 1, 2024 17:52
@fred-labs fred-labs requested a review from fmirus July 1, 2024 17:52
docs/libraries.rst Outdated Show resolved Hide resolved
scenario_execution_ros/test/test_assert_topic_latency.py Outdated Show resolved Hide resolved
@fred-labs fred-labs merged commit f9697fe into main Jul 3, 2024
24 checks passed
@fred-labs fred-labs deleted the blackboard_var branch July 3, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants