From b2b24f594a9c311d1377927867e7385e9c42a240 Mon Sep 17 00:00:00 2001 From: Kangrui Wang Date: Sun, 7 Apr 2024 23:01:20 -0500 Subject: [PATCH] fixed issues to replay demo --- igibson/envs/behavior_mp_env.py | 2 +- .../examples/behavior/behavior_demo_segmentation_batch.py | 3 +++ .../behavior/behavior_replay_using_motion_primitives.py | 6 +++--- igibson/render/openvr | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/igibson/envs/behavior_mp_env.py b/igibson/envs/behavior_mp_env.py index e920ebc53..b79ec827b 100644 --- a/igibson/envs/behavior_mp_env.py +++ b/igibson/envs/behavior_mp_env.py @@ -90,6 +90,7 @@ def __init__( @param use_motion_planning: Whether motion-planned primitives or magic primitives should be used @param activity_relevant_objects_only: Whether the actions should be parameterized by AROs or all scene objs. """ + self.activity_relevant_objects_only = activity_relevant_objects_only super(BehaviorMPEnv, self).__init__( config_file=config_file, scene_id=scene_id, @@ -104,7 +105,6 @@ def __init__( ) self.use_motion_planning = use_motion_planning - self.activity_relevant_objects_only = activity_relevant_objects_only self.robots[0].initial_z_offset = 0.7 def load_action_space(self): diff --git a/igibson/examples/behavior/behavior_demo_segmentation_batch.py b/igibson/examples/behavior/behavior_demo_segmentation_batch.py index f823dea3a..39ce4f6c6 100644 --- a/igibson/examples/behavior/behavior_demo_segmentation_batch.py +++ b/igibson/examples/behavior/behavior_demo_segmentation_batch.py @@ -37,3 +37,6 @@ def data_callback(): if __name__ == "__main__": main() + + +# python .\igibson\examples\behavior\behavior_demo_segmentation_batch.py .\igibson\data\virtual_reality .\igibson\data\virtual_reality\log_manifest .\igibson\data\virtual_reality_segmentation_results \ No newline at end of file diff --git a/igibson/examples/behavior/behavior_replay_using_motion_primitives.py b/igibson/examples/behavior/behavior_replay_using_motion_primitives.py index 57b4f1e1a..9d33d71eb 100644 --- a/igibson/examples/behavior/behavior_replay_using_motion_primitives.py +++ b/igibson/examples/behavior/behavior_replay_using_motion_primitives.py @@ -198,9 +198,9 @@ def run_demonstration(demo_path, segmentation_path, output_path): def main(): parser = argparse.ArgumentParser() - parser.add_argument("demo_path", type=str, help="Path of the demo hdf5 to replay.") - parser.add_argument("segmentation_path", type=str, help="Path of the segmentation of the demo.") - parser.add_argument("output_path", type=str, help="Path to output result JSON file to.") + parser.add_argument("--demo_path", type=str, help="Path of the demo hdf5 to replay.") + parser.add_argument("--segmentation_path", type=str, help="Path of the segmentation of the demo.") + parser.add_argument("--output_path", type=str, help="Path to output result JSON file to.") args = parser.parse_args() run_demonstration(args.demo_path, args.segmentation_path, args.output_path) diff --git a/igibson/render/openvr b/igibson/render/openvr index 0eb70325a..f51d87ecf 160000 --- a/igibson/render/openvr +++ b/igibson/render/openvr @@ -1 +1 @@ -Subproject commit 0eb70325a4ea3edca2a0ff8aefa631f2529e6eb7 +Subproject commit f51d87ecf8f7903e859b0aa4d617ff1e5f33db5a