Unverified Commit 5f813011 authored by Michael Gussert's avatar Michael Gussert Committed by GitHub

Fixes the ray_caster_camera tutorial script when saving the data (#1198)

There was a minor error in the `run_ray_caster_camera.py` tutorial
script that prevented it from saving images.

- [X] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [X] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my
feature works
- [X] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [X] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent c8e6a32a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment