pyrobosim.utils.knowledge.query_to_entity

pyrobosim.utils.knowledge.query_to_entity(world: World, query_list: str | list[str], mode: str, resolution_strategy: str = 'first', robot: Robot | None = None) Entity | None

Resolves a generic query list of strings to an entity mode can be “location” or “object”

Parameters:
  • world – World model.

  • query_list – List of query terms (e.g., “kitchen table apple”). These can be specified as a list of strings, or as a single space-separated string.

  • mode – Can be either “location” or “object”.

  • resolution_strategy – Resolution strategy to apply (see apply_resolution_strategy())

  • robot – If set to a Robot instance, uses that robot for resolution strategy.

Returns:

The entity that meets the mode and resolution strategy, or None.