From b6e95503690243f06dc63ddef9359d22903137ea Mon Sep 17 00:00:00 2001 From: Kangrui Wang Date: Fri, 22 Mar 2024 00:28:31 -0500 Subject: [PATCH 1/3] correct metadata key to replay behavior-100 vr demos --- igibson/examples/behavior/behavior_demo_replay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/igibson/examples/behavior/behavior_demo_replay.py b/igibson/examples/behavior/behavior_demo_replay.py index b3c6ad4cd..f731e6154 100644 --- a/igibson/examples/behavior/behavior_demo_replay.py +++ b/igibson/examples/behavior/behavior_demo_replay.py @@ -128,8 +128,8 @@ def replay_demo( vr_settings = VrSettings(config_str=IGLogReader.read_metadata_attr(in_log_path, "/metadata/vr_settings")) vr_settings.set_frame_save_path(frame_save_path) - task = IGLogReader.read_metadata_attr(in_log_path, "/metadata/atus_activity") - task_id = IGLogReader.read_metadata_attr(in_log_path, "/metadata/activity_definition") + task = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_name") + task_id = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_instance") scene = IGLogReader.read_metadata_attr(in_log_path, "/metadata/scene_id") physics_timestep = IGLogReader.read_metadata_attr(in_log_path, "/metadata/physics_timestep") render_timestep = IGLogReader.read_metadata_attr(in_log_path, "/metadata/render_timestep") From 438d77927e00e623555806b5c4af3b6a69cb3891 Mon Sep 17 00:00:00 2001 From: Kangrui Wang Date: Sun, 24 Mar 2024 17:04:56 -0500 Subject: [PATCH 2/3] accomodate both versions of vr demo --- igibson/examples/behavior/behavior_demo_replay.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/igibson/examples/behavior/behavior_demo_replay.py b/igibson/examples/behavior/behavior_demo_replay.py index f731e6154..c8548fef4 100644 --- a/igibson/examples/behavior/behavior_demo_replay.py +++ b/igibson/examples/behavior/behavior_demo_replay.py @@ -128,8 +128,12 @@ def replay_demo( vr_settings = VrSettings(config_str=IGLogReader.read_metadata_attr(in_log_path, "/metadata/vr_settings")) vr_settings.set_frame_save_path(frame_save_path) - task = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_name") - task_id = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_instance") + task = IGLogReader.read_metadata_attr(in_log_path, "/metadata/atus_activity") + if task is None: + task = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_name") + task_id = IGLogReader.read_metadata_attr(in_log_path, "/metadata/activity_definition") + if task_id is None: + task_id = IGLogReader.read_metadata_attr(in_log_path, "/metadata/task_instance") scene = IGLogReader.read_metadata_attr(in_log_path, "/metadata/scene_id") physics_timestep = IGLogReader.read_metadata_attr(in_log_path, "/metadata/physics_timestep") render_timestep = IGLogReader.read_metadata_attr(in_log_path, "/metadata/render_timestep") From 869bbc7c847c3f53244e7bb1fd11a27fd84f72e8 Mon Sep 17 00:00:00 2001 From: Kangrui Wang Date: Sun, 24 Mar 2024 17:05:51 -0500 Subject: [PATCH 3/3] update np.int to np.int32 --- igibson/render/mesh_renderer/mesh_renderer_cpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/igibson/render/mesh_renderer/mesh_renderer_cpu.py b/igibson/render/mesh_renderer/mesh_renderer_cpu.py index af7a056ed..1440d2294 100644 --- a/igibson/render/mesh_renderer/mesh_renderer_cpu.py +++ b/igibson/render/mesh_renderer/mesh_renderer_cpu.py @@ -1915,8 +1915,8 @@ def setup_lidar_param(self): xx = xx.flatten() yy = yy.flatten() - x_samples = (np.tan(xx) / np.cos(yy) * self.height // 2 + self.height // 2).astype(np.int) - y_samples = (np.tan(yy) * self.height // 2 + self.height // 2).astype(np.int) + x_samples = (np.tan(xx) / np.cos(yy) * self.height // 2 + self.height // 2).astype(np.int32) + y_samples = (np.tan(yy) * self.height // 2 + self.height // 2).astype(np.int32) self.x_samples = x_samples.flatten() self.y_samples = y_samples.flatten()