Skip to content

Commit cbf79e3

Browse files
committed
slight fix
1 parent 547591b commit cbf79e3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

predicators/perception/spot_perceiver.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,10 @@ def _create_state(self) -> State:
451451
# in planning.
452452
assert self._curr_env is not None
453453
preds = self._curr_env.predicates
454-
state_copy = percept_state.copy()
455-
state_copy.simulator_state = simulator_state
454+
# Create a _PartialPerceptionState before abstracting because some
455+
# predicate classifiers (e.g., _surface_wiped_classifier) require it.
456+
state_copy = _PartialPerceptionState(percept_state.data,
457+
simulator_state=simulator_state)
456458
abstract_state = utils.abstract(state_copy, preds)
457459
simulator_state["abstract_state"] = abstract_state
458460
print(f"abstract_state: {abstract_state}")

0 commit comments

Comments
 (0)