| import os |
| from isaacsim import SimulationApp |
| import math |
| simulation_app = SimulationApp({"headless": True}) |
|
|
| import omni.replicator.core as rep |
|
|
| HAND_USD = os.path.abspath("/workspace/IsaacLab/right_arm_only.usd") |
| target_pos = (0.0, -0.25, 0.35) |
| radius = 1.0 |
| cam_positions = [] |
|
|
| |
| for i in range(72): |
| angle = math.radians(i * 5) |
| cx = target_pos[0] + radius * math.cos(angle) |
| cy = target_pos[1] + radius * math.sin(angle) |
| cz = target_pos[2] + 0.1 |
| cam_positions.append((cx, cy, cz)) |
| |
|
|
| with rep.new_layer(): |
| |
| rep.create.light(light_type="dome", intensity=1200) |
| rep.create.light(light_type="distant", intensity=3000, rotation=(315, 45, 0), color=(1.0, 0.95, 0.9)) |
| rep.create.light(light_type="distant", intensity=1000, rotation=(45, -45, 0), color=(0.9, 0.95, 1.0)) |
|
|
| |
| hand = rep.create.from_usd(HAND_USD) |
| |
| |
| camera = rep.create.camera(focal_length=24.0) |
| render_product = rep.create.render_product(camera, (1024, 1024)) |
|
|
| |
| with rep.trigger.on_frame(max_execs=72): |
| |
| with camera: |
| rep.modify.pose( |
| position=rep.distribution.sequence(cam_positions), |
| look_at=target_pos |
| ) |
|
|
| |
| output_dir = os.path.abspath("fourier_hand_renders") |
| writer = rep.WriterRegistry.get("BasicWriter") |
| writer.initialize(output_dir=output_dir, rgb=True) |
| writer.attach([render_product]) |
|
|
| |
| rep.orchestrator.run() |
|
|
| while rep.orchestrator.get_is_started(): |
| simulation_app.update() |
|
|
| simulation_app.close() |