pyrobosim.utils.knowledge.query_to_entity

pyrobosim.utils.knowledge.query_to_entity(world, query_list, mode, resolution_strategy='first', robot=None)

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

Parameters:
  • world (pyrobosim.core.world.World) – World model.

  • query_list (list[str]) – List of query terms (e.g., “kitchen table apple”)

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

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

  • robot (pyrobosim.core.robot.Robot, optional) – If set to a Robot instance, uses that robot for resolution strategy.

Returns:

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

Return type:

Entity