You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple copies of a robot with a given name can be placed on the map via palette entries (see also #1396). In goal checking logic, we may want to iterate over all robots of a given template.
The robotnumbered command was used in the gated_paddock scenario (#835) to iterate over sheep robots, since at that stage within the scenario, sheep were the only robots.
However, in a scenario with lots of growing plants, it is inefficient to use robotnumbered to find the desired named robots.
robotnamed will simply return the first instance of a robot with a given name, which does not facilitate iteration. I tried using selfdestruct within a loop inside the goal logic, but this does not remove the robot from the robotnamed lookup table soon enough to facilitate selection of the next robot; the attempt to iterate through all robots of a given name by selfdestructing them resulted in an infinite loop.
There should exist a command that returns a list of all robots with a given name. Perhaps a more general command could list of all robots that satisfy a certain predicate, but note that currently a given robot's name is not queryable.
The text was updated successfully, but these errors were encountered:
Multiple copies of a robot with a given name can be placed on the map via palette entries (see also #1396). In goal checking logic, we may want to iterate over all robots of a given template.
The
robotnumbered
command was used in thegated_paddock
scenario (#835) to iterate oversheep
robots, since at that stage within the scenario,sheep
were the only robots.However, in a scenario with lots of growing plants, it is inefficient to use
robotnumbered
to find the desired named robots.robotnamed
will simply return the first instance of a robot with a given name, which does not facilitate iteration. I tried usingselfdestruct
within a loop inside the goal logic, but this does not remove the robot from therobotnamed
lookup table soon enough to facilitate selection of the next robot; the attempt to iterate through all robots of a given name byselfdestruct
ing them resulted in an infinite loop.There should exist a command that returns a list of all robots with a given name. Perhaps a more general command could list of all robots that satisfy a certain predicate, but note that currently a given robot's name is not queryable.
The text was updated successfully, but these errors were encountered: