Skip to content

Commit

Permalink
a new goal
Browse files Browse the repository at this point in the history
  • Loading branch information
lf-zhao committed Sep 12, 2024
1 parent 9dce105 commit 94199fd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions predicators/perception/spot_perceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,25 @@ def _create_goal(self, state: State,
GroundAtom(ContainingWaterKnown, [cup]),
GroundAtom(ContainingWater, [cup]),
}
if goal_description == "place empty cup into the box":
# TODO
cup = Object("cup", _container_type)
cardboard_box = Object("cardboard_box", _container_type)
ContainingWaterKnown = pred_name_to_pred["ContainingWaterKnown"]
NotContainingWater = pred_name_to_pred["NotContainingWater"]
Inside = pred_name_to_pred["Inside"]
return {
GroundAtom(ContainingWaterKnown, [cup]),
GroundAtom(NotContainingWater, [cup]),
GroundAtom(Inside, [cup, cardboard_box]),
}
if goal_description == "know container as empty":
cup = Object("cup", _container_type)
ContainingWaterKnownAsFalse = pred_name_to_pred["ContainingWaterKnownAsFalse"]
ContainingWaterKnown = pred_name_to_pred["ContainingWaterKnown"]
NotContainingWater = pred_name_to_pred["NotContainingWater"]
return {
GroundAtom(ContainingWaterKnownAsFalse, [cup]),
GroundAtom(ContainingWaterKnown, [cup]),
GroundAtom(NotContainingWater, [cup]),
}
if goal_description == "put the cup into the cardboard box on floor":
cup = Object("cup", _container_type)
Expand Down

0 comments on commit 94199fd

Please sign in to comment.