class
PddlSimInfoManages the mapping between the abstract PDDL and the underlying simulator entities. This also provides some helper methods for accessing PDDL entity simulator properties like object position (which could vary per entity type).
Methods
- def check_type_matches(self, entity: PddlEntity, match_name: str) -> bool
- def get_entity_pos(self, entity: PddlEntity) -> numpy.ndarray
- Gets a simulator 3D point for an entity.
- def get_predicate(self, pred_name: str) -> Predicate
- Look up predicate by name.
- def reset_pred_truth_cache(self)
- Task that uses the pred_truth_cache is responsible for calling this.
- def search_for_entity(self, entity: PddlEntity) -> typing.Union[int, str, marker_info.MarkerInfo, datasets.rearrange.samplers.receptacle.Receptacle]
- Returns underlying simulator information associated with a PDDL entity. Helper to match the PDDL entity to something from the simulator.
Special methods
- def __init__(self, obj_ids: typing.Dict[str, int], target_ids: typing.Dict[str, int], art_handles: typing.Dict[str, int], marker_handles: typing.Dict[str, marker_info.MarkerInfo], robot_ids: typing.Dict[str, int], sim: rearrange_sim.RearrangeSim, env: rearrange_task.RearrangeTask, expr_types: typing.Dict[str, ExprType], predicates: typing.Dict[str, typing.Any], all_entities: typing.Dict[str, PddlEntity], receptacles: typing.Dict[str, datasets.rearrange.samplers.receptacle.Receptacle], pred_truth_cache: typing.Optional[typing.Dict[str, bool]] = None) -> None
- def __repr__(self)
Data
- pred_truth_cache: typing.Optional[typing.Dict[str, bool]] = None
- obj_ids: typing.Dict[str, int] = None
- target_ids: typing.Dict[str, int] = None
- art_handles: typing.Dict[str, int] = None
- marker_handles: typing.Dict[str, marker_info.MarkerInfo] = None
- robot_ids: typing.Dict[str, int] = None
- sim: rearrange_sim.RearrangeSim = None
- env: rearrange_task.RearrangeTask = None
- expr_types: typing.Dict[str, ExprType] = None
- predicates: typing.Dict[str, typing.Any] = None
- all_entities: typing.Dict[str, PddlEntity] = None
- receptacles: typing.Dict[str, datasets.rearrange.samplers.receptacle.Receptacle] = None