Skip to content

Commit

Permalink
add test to enforce obj2 is fillable when (inside obj1 obj2) is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengshuLi committed Apr 15, 2024
1 parent 675a238 commit 0bc8b20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bddl/activity_definitions/cleaning_parks/problem0.bddl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(?water_bottle.n.01 - water_bottle.n.01)
(inside ?water_bottle.n.01 ?recycling_bin.n.01_1)
)
(inside ?recycling_bin.n.01_1 ?lawn.n.01_1)
(ontop ?recycling_bin.n.01_1 ?lawn.n.01_1)
)
)
)
1 change: 1 addition & 0 deletions bddl/bddl_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def check_synset_predicate_alignment(atom, syns_to_props):
assert ("rigidBody" in syns_to_props[objects[0]]) and ("rigidBody" in syns_to_props[objects[1]]), f"Inapplicable touching: {atom}"
if pred == "inside":
assert ("nonSubstance" in syns_to_props[objects[0]]) and ("rigidBody" in syns_to_props[objects[1]] or "softBody" in syns_to_props[objects[1]]), f"Inapplicable inside: {atom}"
assert "fillable" in syns_to_props[objects[1]], f"Inapplicable inside: {atom}"
if pred == "overlaid":
assert ("drapeable" in syns_to_props[objects[0]]) and ("rigidBody" in syns_to_props[objects[1]]), f"Inapplicable overlaid: {atom}"
if pred == "attached":
Expand Down

0 comments on commit 0bc8b20

Please sign in to comment.