Skip to content

Commit

Permalink
update State struct; adding to Spot specific subclass doesn't work, n…
Browse files Browse the repository at this point in the history
…o idea why
  • Loading branch information
lf-zhao committed Apr 30, 2024
1 parent 94e6a4c commit 3ee2ba9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions predicators/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ class State:
# this field is provided.
simulator_state: Optional[Any] = None

# DEBUG Add an additional field to store the previous atoms
prev_atoms: Optional[Sequence[GroundAtom]] = None
prev_step: Optional[Any] = None
visible_objects: Optional[Any] = None

# DEBUG Add an additional field to store Spot images
# TODO subclass can't create new field?
# This would be directly copied from the images in raw Observation
# NOTE: This is only used when using VLM for predicate evaluation
# NOTE: Performance aspect should be considered later
camera_images: Optional[Dict[str, Any]] = None
# TODO: it's still unclear how we select and store useful images!

def __post_init__(self) -> None:
# Check feature vector dimensions.
for obj in self:
Expand Down

0 comments on commit 3ee2ba9

Please sign in to comment.