habitat.tasks.rearrange.multi_task.pddl_action.PddlAction class

Methods

def apply(self, sim_info: rearrange_pddl.PddlSimInfo) -> None
def apply_if_true(self, sim_info: rearrange_pddl.PddlSimInfo) -> bool
Apply the action post-condition to the simulator if the action pre-condition is true. This will also dynamically select the right entities for the post-condition based on the pre-condition quantifiers.
def are_args_compatible(self, arg_values: typing.List[rearrange_pddl.PddlEntity]) -> bool
def clone(self) -> PddlAction
Clones the action potentially with a new name.
def get_arg_value(self, param_name: str) -> typing.Optional[rearrange_pddl.PddlEntity]
Get the assigned value of a parameter with name param_name. Returns None if the parameter is not yet assigned.
def is_precond_satisfied_from_predicates(self, predicates: typing.List[pddl_predicate.Predicate]) -> bool
def set_param_values(self, param_values: typing.List[rearrange_pddl.PddlEntity]) -> None
Bind the parameters to PDDL entities. An exception is thrown if the arguments don’t match (like different number of arguments or wrong type).
def set_post_cond_search(self, post_cond_search: typing.List[typing.Dict[rearrange_pddl.PddlEntity, rearrange_pddl.PddlEntity]]) -> None
def set_precond(self, new_precond) -> PddlAction
Sets the preconditions for the action.

Special methods

def __init__(self, name: str, parameters: typing.List[rearrange_pddl.PddlEntity], pre_cond: pddl_logical_expr.LogicalExpr, post_cond: typing.List[pddl_predicate.Predicate], post_cond_search: typing.Optional[typing.List[typing.Dict[rearrange_pddl.PddlEntity, rearrange_pddl.PddlEntity]]] = None)
Models the PDDL acton entity.
def __repr__(self)

Properties

compact_str: str get
Display string of the action.
n_args get
name get
param_values: typing.Optional[typing.List[rearrange_pddl.PddlEntity]] get
params: typing.List[rearrange_pddl.PddlEntity] get
post_cond: typing.List[pddl_predicate.Predicate] get
precond get

Method documentation

def habitat.tasks.rearrange.multi_task.pddl_action.PddlAction.__init__(self, name: str, parameters: typing.List[rearrange_pddl.PddlEntity], pre_cond: pddl_logical_expr.LogicalExpr, post_cond: typing.List[pddl_predicate.Predicate], post_cond_search: typing.Optional[typing.List[typing.Dict[rearrange_pddl.PddlEntity, rearrange_pddl.PddlEntity]]] = None)

Models the PDDL acton entity.

Parameters
name
parameters The parameters to the PDDL action in the domain file.
pre_cond The pre condition of the PDDL action.
post_cond The post conditions of the PDDL action.
post_cond_search Mapping expanded quantifier inputs from the pre-condition to ungrounded entities in the post-condition. One mapping per quantifier expansion.