From 83229fcb0af3dd5aa6f00d555d502611d57015c2 Mon Sep 17 00:00:00 2001 From: Michael Gussert Date: Wed, 9 Oct 2024 16:12:23 -0700 Subject: [PATCH] fixed ray_caster_camera tutorial script to save data --- .../tutorials/04_sensors/run_ray_caster_camera.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/standalone/tutorials/04_sensors/run_ray_caster_camera.py b/source/standalone/tutorials/04_sensors/run_ray_caster_camera.py index a54d9dc6f6..a813bd74ea 100644 --- a/source/standalone/tutorials/04_sensors/run_ray_caster_camera.py +++ b/source/standalone/tutorials/04_sensors/run_ray_caster_camera.py @@ -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)