Skip to content

Commit

Permalink
fixed ray_caster_camera tutorial script to save data
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgussert committed Oct 9, 2024
1 parent f6741f3 commit 83229fc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ def run_simulator(sim: sim_utils.SimulationContext, scene_entities: dict):
single_cam_info = camera.data.info[camera_index]

# Pack data back into replicator format to save them using its writer
rep_output = dict()
rep_output = {"annotators": {}}
for key, data, info in zip(single_cam_data.keys(), single_cam_data.values(), single_cam_info.values()):
if info is not None:
rep_output[key] = {"data": data, "info": info}
rep_output["annotators"][key] = {"render_product": {"data": data, **info}}
else:
rep_output[key] = data
rep_output["annotators"][key] = {"render_product": {"data": data}}
# Save images
rep_output["trigger_outputs"] = {"on_time": camera.frame[camera_index]}
rep_writer.write(rep_output)
Expand Down

0 comments on commit 83229fc

Please sign in to comment.