pyrobosim.utils.knowledge.resolve_to_object

pyrobosim.utils.knowledge.resolve_to_object(world: World, category: str | None = None, location: Location | ObjectSpawn | str | None = None, room: Room | str | None = None, resolution_strategy: str = 'first', robot: Robot | None = None, ignore_grasped: bool = True) Object | None

Resolves a category/location/room query to an object.

Parameters:
  • world – World model.

  • category – Object category (e.g. “apple”)

  • location – Location category search in (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.

  • ignore_grasped – If True, ignores the current manipulated object.

Returns:

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