diff --git a/predicators/behavior_utils/behavior_utils.py b/predicators/behavior_utils/behavior_utils.py index 403665ea94..4c9613ad50 100644 --- a/predicators/behavior_utils/behavior_utils.py +++ b/predicators/behavior_utils/behavior_utils.py @@ -1341,7 +1341,8 @@ def sample_place_ontop_params(igibson_behavior_env: "BehaviorEnv", obj_to_place_ontop: "URDFObject", rng: np.random.Generator, max_internal_samples=None, - return_failed_samples=False) -> Array: + return_failed_samples=False, + return_distribution_samples=False) -> Array: """Main logic for place ontop param sampler. Implemented in a separate method to enable code reuse in @@ -1431,7 +1432,8 @@ def sample_place_next_to_params(igibson_behavior_env: "BehaviorEnv", obj_to_place_nextto: "URDFObject", rng: np.random.Generator, max_internal_samples=None, - return_failed_samples=False) -> Array: + return_failed_samples=False, + return_distribution_samples=False) -> Array: """Main logic for place next to param sampler. Implemented in a separate method to enable code reuse in @@ -1535,7 +1537,8 @@ def sample_place_under_params(igibson_behavior_env: "BehaviorEnv", obj_to_place_under: "URDFObject", rng: np.random.Generator, max_internal_samples=None, - return_failed_samples=False) -> Array: + return_failed_samples=False, + return_distribution_samples=False) -> Array: """Main logic for place under param sampler. Implemented in a separate method to enable code reuse in diff --git a/predicators/envs/behavior.py b/predicators/envs/behavior.py index f355ec3d15..c338c1325c 100644 --- a/predicators/envs/behavior.py +++ b/predicators/envs/behavior.py @@ -849,7 +849,7 @@ def _reachable_classifier(self, if ig_obj.name == "agent": return False - if isinstance(robot_obj, BehaviorRobot): + if isinstance(robot_obj, BehaviorRobot): robot_x, robot_y, _ = robot_obj.get_position() obj_x, obj_y, _ = ig_obj.get_position() _, _, robot_yaw = p.getEulerFromQuaternion(robot_obj.get_orientation()) diff --git a/predicators/ground_truth_nsrts.py b/predicators/ground_truth_nsrts.py index f2ee1b9a84..6498fd9c9d 100644 --- a/predicators/ground_truth_nsrts.py +++ b/predicators/ground_truth_nsrts.py @@ -3349,7 +3349,8 @@ def place_under_obj_pos_sampler( set(), option, option_vars, - lambda s, g, r, o: sampler( + lambda s, g, r, o, max_internal_samples=None, + return_failed_samples=False, return_distribution_samples=False: sampler( s, g, r, @@ -3357,6 +3358,9 @@ def place_under_obj_pos_sampler( env.object_to_ig_object(o_i) if isinstance(o_i, Object) else o_i for o_i in o ], + max_internal_samples=max_internal_samples, + return_failed_samples=return_failed_samples, + return_distribution_samples=return_distribution_samples, )) nsrts.add(nsrt) # NSRT for grasping an object from inside an object. @@ -3369,7 +3373,8 @@ def place_under_obj_pos_sampler( set(), option, option_vars, - lambda s, g, r, o: sampler( + lambda s, g, r, o, max_internal_samples=None, + return_failed_samples=False, return_distribution_samples=False: sampler( s, g, r, @@ -3377,6 +3382,9 @@ def place_under_obj_pos_sampler( env.object_to_ig_object(o_i) if isinstance(o_i, Object) else o_i for o_i in o ], + max_internal_samples=max_internal_samples, + return_failed_samples=return_failed_samples, + return_distribution_samples=return_distribution_samples, )) nsrts.add(nsrt) diff --git a/predicators/main.py b/predicators/main.py index a731f61ea0..48e8f26c44 100644 --- a/predicators/main.py +++ b/predicators/main.py @@ -180,9 +180,9 @@ def _run_pipeline(env: BaseEnv, logging.info("Reached online_learning_max_transitions, " "terminating") break - logging.warning("CAREFUL!! THIS WILL EXIT RIGHT AFTER COLLECTING INTERACTION REQUESTS") + # logging.warning("CAREFUL!! THIS WILL EXIT RIGHT AFTER COLLECTING INTERACTION REQUESTS") interaction_requests = approach.get_interaction_requests() - exit() + # exit() if not interaction_requests: logging.info("Did not receive any interaction requests, " "terminating")