Skip to content

Enable local variables in sub-tree #706

@galou

Description

@galou

As sub-trees get more complicated, I tend to always use _autoremap="true" rather than writing a long list of remappings. Even if I would be OK with not using _autoremap, I cannot ensure that other users of the sub-tree I write also avoid to use it.

Now, I have a case where I compute some small trajectories identified with a shared prefix and then combine them. I do not know in advance how many of these trajectories will be in the blackboard but what I know for sure is that I don't want to share these small trajectories with other calls to the sub-tree.

I see two solutions:

  • use a prefix to identify a local variable, e.g. local{var}
  • add an attribute to the BehaviorTree element to list the variables that should not be shared even if _autoremap is used. Not so nice, IMHO.

I can implement something but I'd like to have some guidance on what to implement.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions