pyrobosim.utils.knowledge.graph_node_from_entity

pyrobosim.utils.knowledge.graph_node_from_entity(world: World, entity_query: Entity | Node | str, resolution_strategy: str = 'nearest', robot: Robot | None = None) Node | None

Gets a graph node from an entity query, which could be any combination of room, hallway, location, object spawn, or object in the world, as well as their respective categories. For more information on the inputs, refer to the pyrobosim.utils.knowledge.query_to_entity() function.

Parameters:
  • entity_query – The entity from which to get a graph node.

  • resolution_strategy – Resolution strategy to apply

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

Returns:

A graph node for the entity that meets the resolution strategy, or None.