pyrobosim.utils.knowledge.resolve_to_location

pyrobosim.utils.knowledge.resolve_to_location(world, category=None, room=None, resolution_strategy='first', robot=None, expand_locations=False)

Resolves a category/room query combination to a single specific location.

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

  • category (str, optional) – Location category (e.g. “table”)

  • room (str, optional) – Room name to search in (e.g. “kitchen”)

  • 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.

  • expand_locations (bool) – If True, expands location to individual object spawns.

Returns:

The location or object spawn that meets the category and/or room filters, or None.

Return type:

pyrobosim.core.locations.Location/pyrobosim.core.locations.ObjectSpawn