Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predicate System Refactor #1855

Merged
merged 28 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ab4381
add draft of prepositional logic query utilities and viewer demo
aclegg3 Jan 19, 2024
047b85c
add util to get contact pairs from contact points
aclegg3 Feb 2, 2024
b2d6b06
Merge remote-tracking branch 'origin/main' into siro-query-utils
aclegg3 Feb 2, 2024
21707ca
add functions: get_obj_from_id, get_obj_from_handle and modifies get_…
aclegg3 Feb 2, 2024
6e1bd63
dbv peek_scene default should be topdown
aclegg3 Feb 2, 2024
f22f7cc
add "below" preposition util
aclegg3 Feb 5, 2024
e19e29d
refactor some prep functions. Add ontop() opterator
aclegg3 Feb 5, 2024
8932444
refactor viewer to test ontop
aclegg3 Feb 5, 2024
d0b5a7f
refactor objectA typing
aclegg3 Feb 5, 2024
5c70f72
regularized_distance, nearby L2 and geodesic drafts, refactors to utils
aclegg3 Feb 7, 2024
63f1b97
fix AO sampling and add floor check prototype
aclegg3 Feb 9, 2024
681299e
minor changes
aclegg3 Feb 12, 2024
3943bdf
clean-up on_floor query and add viewer demo
aclegg3 Feb 12, 2024
00e79ef
include navmesh cell_height in the error threshold for on_floor
aclegg3 Feb 12, 2024
7373d7c
refactor to support region queries
aclegg3 Feb 12, 2024
cbe6ac1
Merge branch 'main' into query-utils-andrew
ASzot Feb 20, 2024
d4fa02e
Refactor PDDL predicates
ASzot Feb 21, 2024
ae83cda
Allow for flexible pddl set and satisfy states
ASzot Mar 1, 2024
219fa61
Cleaned up
ASzot Mar 12, 2024
3c8cedd
Merged
ASzot Mar 12, 2024
06f853a
Merged
ASzot Mar 12, 2024
27a9dbf
More docs
ASzot Mar 12, 2024
696731a
Added another test
ASzot Mar 12, 2024
f03deb9
Addressed PR comments
ASzot Mar 19, 2024
afb5d36
Merge branch 'main' into predicate-refactor
ASzot Apr 2, 2024
e4d1582
Fixed test
ASzot Apr 2, 2024
ad2bcea
Fixed multi-agent test
ASzot Apr 8, 2024
9c8fbdb
Merge branch 'main' into predicate-refactor
ASzot Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,66 @@ constants: {}


predicates:
- name: in
args:
- name: obj
expr_type: obj_type
- name: receptacle
expr_type: art_receptacle_entity_type
set_state:
obj_states:
obj: receptacle

- name: holding
args:
- name: obj
expr_type: movable_entity_type
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
holding: obj
is_valid_fn:
# Function that checks if the predicate is satisfied. See
# `pddl_defined_predicates.py` for the pre-defined instances of these
# functions.
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_hold_match
hold_state: True
set_state_fn:
# Funtion that sets simulator state based on predicate arguments.
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_holding
hold_state: True

- name: in
args:
- name: obj
expr_type: obj_type
- name: recep
expr_type: art_receptacle_entity_type
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_inside

- name: not_holding
args:
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
should_drop: True

is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_hold_match
hold_state: False
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_holding
hold_state: False
- name: robot_at
args:
- name: Y
- name: at_entity
expr_type: static_obj_type
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
pos: Y
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_at_position
dist_thresh: 2.0
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_position
dist_thresh: 2.0

- name: at
akshararai marked this conversation as resolved.
Show resolved Hide resolved
args:
- name: obj
expr_type: obj_type
expr_type: movable_entity_type
- name: at_entity
expr_type: static_obj_type
set_state:
obj_states:
obj: at_entity
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_object_at
dist_thresh: 0.3
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_object_at
akshararai marked this conversation as resolved.
Show resolved Hide resolved

actions:
- name: nav_to_goal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ types:
- cab_type
- fridge_type


constants:
- name: cab_push_point_7
expr_type: cab_type
Expand All @@ -23,100 +22,116 @@ constants:
expr_type: fridge_type

predicates:
- name: in
args:
- name: obj
expr_type: obj_type
- name: receptacle
expr_type: art_receptacle_entity_type
set_state:
obj_states:
obj: receptacle

- name: holding
args:
- name: obj
expr_type: movable_entity_type
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
holding: obj
is_valid_fn:
# Function that checks if the predicate is satisfied. See
# `pddl_defined_predicates.py` for the pre-defined instances of these
# functions.
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_hold_match
hold_state: True
set_state_fn:
# Funtion that sets simulator state based on predicate arguments.
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_holding
hold_state: True

- name: in
args:
- name: obj
expr_type: obj_type
- name: recep
expr_type: art_receptacle_entity_type
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_inside

- name: not_holding
args:
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
should_drop: True
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_hold_match
hold_state: False
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_holding
hold_state: False

- name: opened_cab
args:
- name: cab_id
- name: art_obj
expr_type: cab_type
set_state:
art_states:
cab_id:
value: 0.45
cmp: 'greater'
override_thresh: 0.1
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_articulated_object_at_state
target_val: 0.45
cmp: 'greater'
dist_thresh: 0.1
akshararai marked this conversation as resolved.
Show resolved Hide resolved
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_articulated_object_at_state
target_val: 0.45

- name: closed_cab
args:
- name: cab_id
- name: art_obj
expr_type: cab_type
set_state:
arg_spec:
name_match: "cab"
art_states:
cab_id:
value: 0.0
cmp: 'close'

is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_articulated_object_at_state
target_val: 0.0
cmp: 'close'
akshararai marked this conversation as resolved.
Show resolved Hide resolved
dist_thresh: 0.15
akshararai marked this conversation as resolved.
Show resolved Hide resolved
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_articulated_object_at_state
target_val: 0.0

- name: opened_fridge
args:
- name: fridge_id
- name: art_obj
expr_type: fridge_type
set_state:
art_states:
fridge_id:
value: 1.22
cmp: 'greater'
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_articulated_object_at_state
target_val: 1.22
cmp: 'greater'
dist_thresh: 0.15
akshararai marked this conversation as resolved.
Show resolved Hide resolved
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_articulated_object_at_state
target_val: 1.22

- name: closed_fridge
args:
- name: fridge_id
- name: art_obj
expr_type: fridge_type
set_state:
art_states:
fridge_id:
value: 0.0
cmp: 'close'
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_articulated_object_at_state
target_val: 0.0
cmp: 'close'
dist_thresh: 0.15
akshararai marked this conversation as resolved.
Show resolved Hide resolved

- name: robot_at
args:
- name: Y
- name: at_entity
expr_type: static_obj_type
- name: robot_id
- name: robot
expr_type: robot_entity_type
set_state:
robot_states:
robot_id:
pos: Y
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_robot_at_position
dist_thresh: 2.0
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_robot_position
dist_thresh: 2.0

- name: at
akshararai marked this conversation as resolved.
Show resolved Hide resolved
args:
- name: obj
expr_type: movable_entity_type
- name: at_entity
expr_type: static_obj_type
set_state:
obj_states:
obj: at_entity
is_valid_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.is_object_at
dist_thresh: 0.3
set_state_fn:
_target_: habitat.tasks.rearrange.multi_task.pddl_defined_predicates.set_object_at

actions:
- name: nav
Expand Down
Loading