I want to export KITTI format from Synthetic Data Recorder.
https://docs.omniverse.nvidia.com/isaacsim/latest/replicator_tutorials/tutorial_replicator_recorder.html
Synthetic Data Recorder can use custom writer, but I don’t know prepare config file (.json) to use KITTI Writer.
I suppose I can change something from “default_config.json” to do it, but it seems only configure toggle options, not selecting writer.
{
“writer_name”: “BasicWriter”,
“custom_writer_name”: “MyCustomWriter”,
“num_frames”: 0,
“rt_subframes”: 0,
“control_timeline”: false,
“out_dir”: “_out_sdrec”,
“out_write_type”: “OVERWRITE”,
“basic_writer_params”: {
“rgb”: true,
“bounding_box_2d_tight”: false,
…
“skeleton_data”: false
},
“use_s3”: false,
“s3_params”: {
“s3_bucket”: “”,
“s3_region”: “”,
“s3_endpoint”: “”
},
“rp_data”: [
[
“/OmniverseKit_Persp”,
512,
512,
“”
]
]
}
BTW, there is Writer Examples which can call KITTI Writer with using “writer = rep.WriterRegistry.get(“KittiWriter”)”.
https://docs.omniverse.nvidia.com/extensions/latest/ext_replicator/writer_examples.html#kitti-writer
import omni.replicator.core as rep
sequential_pos = [(0, 100, 500),(500, 100, 500),(-500, 100, 500),]
with rep.new_layer():
distance_light = rep.create.light(rotation=(315,0,0), intensity=3000, light_type=“distant”)
cube = rep.create.cube(position=(200, 0, 0), semantics=[(‘class’, ‘cube’)])
sphere = rep.create.sphere(position=(0, 0, 0), semantics=[(‘class’, ‘sphere’)])
cone = rep.create.cone(position=(-200, 0, 0), semantics=[(‘class’, ‘cone’)])
camera = rep.create.camera(position=sequential_pos[0], look_at=(0,0,0))
with rep.trigger.on_frame(num_frames=3):
with camera:
rep.modify.pose(look_at=(0,0,0), position=rep.distribution.sequence(sequential_pos))
render_product = rep.create.render_product(camera, (512, 512))
writer = rep.WriterRegistry.get(“KittiWriter”)
writer.initialize(
output_dir=f"~/replicator_examples/kitti_writer/",
bbox_height_threshold=5,
fully_visible_threshold=0.75,
omit_semantic_type=True
)
writer.attach([render_product])
rep.orchestrator.run()
Then, should I change something in “synthetic_recorder_extension.py” which contains below code?
def _init_recorder(self) -> bool: if self._writer is None: try: self._writer = rep.WriterRegistry.get(self._writer_name) except Exception as e: carb.log_warn(f"Could not create writer {self._writer_name}: {e}") return False
If it is true, how should I change “synthetic_recorder_extension.py”?
I think there are a lot of people who want to use KITTI Writer in Synthetic Data Recorder.
Best regards,
In addition,
There was also example which can use KITTI Writer, offline data generation, but it was expired recently.
Execution command:
./python.sh standalone_examples/replicator/offline_generation/offline_generation.py
–config standalone_examples/replicator/offline_generation/config/config_kitti_writer.yaml
Part of offline_generation.py to set writer:
writer = rep.WriterRegistry.get(config[“writer”])
writer.initialize(**config[“writer_config”])
forklift_rp = rep.create.render_product(top_view_cam, config[“resolution”], name=“TopView”)
driver_rp = rep.create.render_product(driver_cam, config[“resolution”], name=“DriverView”)
pallet_rp = rep.create.render_product(pallet_cam, config[“resolution”], name=“PalletView”)
writer.attach([forklift_rp, driver_rp, pallet_rp])
And config_kitti_writer.yaml:
launch_config:
renderer: RayTracedLighting
headless: true
resolution: [512, 512]
num_frames: 5
clear_previous_semantics: false
writer: KittiWriter
writer_config:
output_dir: _out_kitti
colorize_instance_segmentation: true