pyrobosim.utils.knowledge.resolve_to_location
- pyrobosim.utils.knowledge.resolve_to_location(world: World, category: str | None = None, room: Room | str | None = None, resolution_strategy: str = 'first', robot: Robot | None = None, expand_locations: bool = False) Location | ObjectSpawn | None
Resolves a category/room query combination to a single specific location.
- Parameters:
world – World model.
category – Location category (e.g. “table”)
room – Room or room name to search in (e.g. “kitchen”)
resolution_strategy – Resolution strategy to apply (see
apply_resolution_strategy())robot – If set to a Robot instance, uses that robot for resolution strategy.
expand_locations – If True, expands location to individual object spawns.
- Returns:
The location or object spawn that meets the category and/or room filters, or None.