Skip to content

Commit

Permalink
Merge pull request #358 from StanfordVL/behavior-replay-vrdemo
Browse files Browse the repository at this point in the history
correct metadata key to replay behavior-100 vr demos
  • Loading branch information
cgokmen authored Apr 3, 2024
2 parents ede9720 + 869bbc7 commit f97fa9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions igibson/examples/behavior/behavior_demo_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def replay_demo(
vr_settings.set_frame_save_path(frame_save_path)

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")
Expand Down
4 changes: 2 additions & 2 deletions igibson/render/mesh_renderer/mesh_renderer_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f97fa9f

Please sign in to comment.