BehaviorTree.CPP
BehaviorTree.CPP copied to clipboard
_autoremap keyword not behaving as expected in version 4.4.0
Hello, I just upgraded from version 4.1.1 to 4.4.0, and been having issues with the _autoremap keyword.
I had the following pattern in my application:
<root BTCPP_format="4">
<BehaviorTree ID="Subtree1">\n"
<Sequence>
<PrintToConsole message="{msg1}"/>
<PrintToConsole message="{msg2}"/>
</Sequence>
</BehaviorTree>
<BehaviorTree ID="Subtree2">
<Sequence>
<SubTree ID="Subtree1" msg1="foo1" _autoremap="true"/>
<SubTree ID="Subtree1" msg1="foo2" _autoremap="true"/>
</Sequence>
</BehaviorTree>
<BehaviorTree ID="MainTree">
<SubTree ID="Subtree2" msg2="bar"/>
</BehaviorTree>
</root>
Subtree1accepts 2 input ports (msg1andmsg2) and prints them to console using the customPrintToConsolenodeSubtree2callsSubtree1twice with_autoremap=trueand themsg1port explicitly specified (foo1andfoo2)MainTreecallsSubtree2and sets themsg2port set to bebar
I would have expected the output of running MainTree to produce
foo1
bar
foo2
bar
However, the output I am getting is:
foo2
bar
foo2
bar
For some reason the msg1 port value seems to contain foo2 for both instances of Subtree1, even though for the first instance msg1 should be foo1.
Would appreciate it if you could advise if this is a bug, or if the intention/use of the _autoremap keyword has changed?
fixed. thanks for reporting